diff --git a/system/.config/polybar/config b/system/.config/polybar/config index 9033de2..d4330b7 100644 --- a/system/.config/polybar/config +++ b/system/.config/polybar/config @@ -191,7 +191,7 @@ interval = 60 [module/battery] type = internal/battery full-at = 99 -battery = BAT0 +battery = ${env:POLYBAR_BATTERY} adapter = AC time-format = %H:%M diff --git a/system/.config/polybar/launch b/system/.config/polybar/launch index 1851fc9..e5afca7 100755 --- a/system/.config/polybar/launch +++ b/system/.config/polybar/launch @@ -18,6 +18,11 @@ killall -q polybar # Wait until the processes have been shut down while pgrep -x polybar >/dev/null; do sleep 1; done +if [ "${IS_WORK}" = "1" ]; then + POLYBAR_BATTERY="BAT1" +else + POLYBAR_BATTERY="BAT0" +fi # Launch bar1 and bar2 polybar top &