Polybar systemd service

This commit is contained in:
2021-02-20 12:07:02 -05:00
parent 90a1de1a10
commit e2e6c46f98
6 changed files with 26 additions and 7 deletions

View File

@ -58,3 +58,4 @@ sh ~/.config/scripts/audio/es8start.sh
sh ~/.config/scripts/audio/es9start.sh
launchi3
systemctl --user restart polybar

View File

@ -0,0 +1,13 @@
#!/bin/bash
# Stop all polybar instances
killall -q polybar
while pgrep -x polybar >/dev/null; do sleep 0.1; done
for monitor in $(xrandr -q | grep -e "\sconnected\s" | cut -d' ' -f1); do
if [ $monitor == 'DVI-D-0' ] || [ $monitor == 'LVDS-1' ]; then
MONITOR=$monitor polybar aqua &
fi
done