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() {
|
||||
bat="$(grep -q Charging /sys/class/power_supply/BAT0/status && printf '' || printf '')"
|
||||
bat="$bat $(cat /sys/class/power_supply/BAT0/capacity)%"
|
||||
local dir="$(echo /sys/class/power_supply/BAT* | sort -n | tail -n1)"
|
||||
bat="$(grep -q Charging "$dir/status" && printf '' || printf '')"
|
||||
bat="$bat $(cat "$dir/capacity")%"
|
||||
}
|
||||
|
||||
update_vol() {
|
||||
|
Loading…
Reference in New Issue
Block a user