Fix polybar battery module
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
aecc51028f
commit
c94d46b9ef
2 changed files with 6 additions and 1 deletions
|
@ -191,7 +191,7 @@ interval = 60
|
||||||
[module/battery]
|
[module/battery]
|
||||||
type = internal/battery
|
type = internal/battery
|
||||||
full-at = 99
|
full-at = 99
|
||||||
battery = BAT0
|
battery = ${env:POLYBAR_BATTERY}
|
||||||
adapter = AC
|
adapter = AC
|
||||||
time-format = %H:%M
|
time-format = %H:%M
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,11 @@ killall -q polybar
|
||||||
# Wait until the processes have been shut down
|
# Wait until the processes have been shut down
|
||||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
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
|
# Launch bar1 and bar2
|
||||||
polybar top &
|
polybar top &
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue