- Make killall waybar fail silently if waybar isn't already running - Update launch script to run in foreground - Use verbose version of waybar CLI args - Automatically restart waybar if it exits with non 143 (SIGTERM) exit code so random crashes (e.g., when opening LibreOffice or some games) don't persist and bar gets restarted
16 lines
381 B
Bash
Executable File
16 lines
381 B
Bash
Executable File
#!/usr/bin/env bash
|
|
killall waybar || true
|
|
|
|
until /usr/bin/waybar \
|
|
--config $HOME/.config/dwl/waybar/config.jsonc \
|
|
--style $HOME/.config/dwl/waybar/style.css;
|
|
do
|
|
if [ $? -ne 143 ]; then
|
|
echo "Dwl Waybar stopped with exit code $?. Respawning..." >&2;
|
|
sleep 1;
|
|
else
|
|
echo "Dwl Waybar manually killed with SIGTERM";
|
|
break;
|
|
fi
|
|
done
|