voidrice/.local/bin/launch_polybar
anntnzrb e78420475e Use SIGTERM instead of SIGKILL
After proper research, `SIGKILL` should be prevented if possible;
Use `SIGTERM` instead

Source:
[In what order should I send signals to gracefully shutdown processes?](https://stackoverflow.com/a/37692419)
2020-08-04 12:56:25 -05:00

10 lines
256 B
Bash
Executable File

#!/bin/sh
# Terminate already running bar instances
pkill -15 -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