fix
This commit is contained in:
+1
-11
@@ -82,17 +82,7 @@ label {
|
||||
# -- battery view --
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] bash -c '
|
||||
bat=$(find /sys/class/power_supply -maxdepth 1 -type d -name "BAT*" | head -n1)
|
||||
[ -n "$bat" ] || exit 0
|
||||
|
||||
cap=$(cat "$bat/capacity")
|
||||
stat=$(cat "$bat/status")
|
||||
|
||||
[ "$stat" = "Charging" ] &&
|
||||
printf " %s%%" "$cap" ||
|
||||
printf " %s%%" "$cap"
|
||||
'
|
||||
text = cmd[update:1000] bash -c 'cap=$(< /sys/class/power_supply/BAT0/capacity); stat=$(< /sys/class/power_supply/BAT0/status); if [ "$stat" = "Charging" ]; then printf " %s%%" "$cap"; else printf " %s%%" "$cap"; fi'
|
||||
color = 0xFF{{ colors.surface_tint.default.hex_stripped }}
|
||||
font_size = 14
|
||||
font_family = JetBrains Mono
|
||||
|
||||
Reference in New Issue
Block a user