feat: sbar auto choose battery
This commit is contained in:
parent
b4ebf3e70e
commit
4fc13d3504
BIN
bin/crypto
BIN
bin/crypto
Binary file not shown.
5
bin/sbar
5
bin/sbar
@ -17,8 +17,9 @@ update_memory() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_bat() {
|
update_bat() {
|
||||||
bat="$(grep -q Charging /sys/class/power_supply/BAT0/status && printf '' || printf '')"
|
local dir="$(echo /sys/class/power_supply/BAT* | sort -n | tail -n1)"
|
||||||
bat="$bat $(cat /sys/class/power_supply/BAT0/capacity)%"
|
bat="$(grep -q Charging "$dir/status" && printf '' || printf '')"
|
||||||
|
bat="$bat $(cat "$dir/capacity")%"
|
||||||
}
|
}
|
||||||
|
|
||||||
update_vol() {
|
update_vol() {
|
||||||
|
Loading…
Reference in New Issue
Block a user