forked from DustVoice/dotfiles
Add battery-monitor alias
This commit is contained in:
parent
3698682b85
commit
2b630ca4de
1 changed files with 6 additions and 0 deletions
|
@ -106,6 +106,12 @@ function check-iommu-func() {
|
||||||
}
|
}
|
||||||
|
|
||||||
alias check-iommu='check-iommu-func'
|
alias check-iommu='check-iommu-func'
|
||||||
|
|
||||||
|
function battery-monitor-func() {
|
||||||
|
watch -t -n 60 '( if [ $(cat /sys/class/power_supply/ACAD/online) == "1" ]; then printf "Power connected\n"; else print "Power disconnected\n"; fi; printf "\nBattery capacity: "; cat /sys/class/power_supply/BAT1/capacity; printf "\n(Updated every 60s)"; )';
|
||||||
|
}
|
||||||
|
|
||||||
|
alias battery-monitor='battery-monitor-func'
|
||||||
# ===
|
# ===
|
||||||
|
|
||||||
# ===
|
# ===
|
||||||
|
|
Loading…
Reference in a new issue