Browse Source

clean bar script

siduck76 3 năm trước cách đây
mục cha
commit
1aaa76b31d
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      .dwm/bars/gruvchad.sh

+ 2 - 2
.dwm/bars/gruvchad.sh

@@ -27,8 +27,8 @@ pkg_updates() {
 
 # battery
 batt() {
-  printf "^c#6f8faf^  "
-  printf "^c#6f8faf^ $(acpi | sed "s/,//g" | awk '{if ($3 == "Discharging"){print $4; exit} else {print $4""}}' | tr -d "\n")"
+  get_capacity="$(cat /sys/class/power_supply/BAT1/capacity)"
+  printf "^c#6f8faf^   $get_capacity"
 }
 
 brightness() {