voidrice/.local/bin/launch_polybar
anntnzrb 636c35a126 Use pkill instead of killall
The `killall` command doesn't come shipped in all distributions (Void
Linux as an example), on the other hand `pkill` does.

Unsure what the exact intention on each call is but the `-9` signal can be
replaced with `-x` if the intention is not to end all instances.

Also note that I left `pkill -x Xorg` without the `-9` signal because
for some reason it won't function as expected and end up halting the
system (at least on Void Linux).
2020-07-31 12:25:28 -05:00

10 lines
255 B
Bash
Executable File

#!/bin/sh
# Terminate already running bar instances
pkill -9 -q polybar
# Wait until the processes have been shut down
while pidof polybar >/dev/null; do sleep 1; done
for i in $(polybar -m | awk -F: '{print $1}'); do MONITOR=$i polybar default & done