Files
dots/configs/polybar_g/Lenovox1Gen5/launch.sh
2024-08-22 19:44:26 -07:00

14 lines
452 B
Bash
Executable File

#!/usr/bin/env bash
# Terminate already running bar instances
# If all your bars have ipc enabled, you can use
polybar-msg cmd quit
# Otherwise you can use the nuclear option:
# killall -q polybar
# Launch bar on each monitor, tray on primary
polybar --list-monitors | while IFS=$'\n' read line; do
monitor=$(echo $line | cut -d':' -f1)
primary=$(echo $line | cut -d' ' -f3)
MONITOR=$monitor polybar --reload "top${primary:+"-primary"}" &
done