feat: added polybar config

This commit is contained in:
oxypomme
2023-10-09 14:35:45 +02:00
parent b19acae9be
commit 5627c6fd64
3 changed files with 681 additions and 0 deletions

18
polybar/launch.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
primary=$(xrandr | awk '/ primary / {print $1}')
# Launch Polybar, using default config location ~/.config/polybar/config
for m in $(polybar -m | cut -d":" -f1); do
bar="secondary";
if [ "$m" = "$primary" ]; then bar="primary"; fi
MONITOR=$m polybar -r $bar &
MONITOR=$m polybar -r top &
done
echo "Polybar launched..."