Move kill from i3 config to lemonbar.sh

This commit is contained in:
Riyyi
2019-05-05 03:27:42 +02:00
parent db7529c727
commit 790e717ca7
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ set $mod2 Mod1
floating_modifier $mod floating_modifier $mod
# Application startup # Application startup
exec_always --no-startup-id "pkill lemonbar.sh; $HOME/.scripts/panel/lemonbar.sh &" exec_always --no-startup-id $HOME/.scripts/panel/lemonbar.sh &
exec_always --no-startup-id $HOME/.scripts/wm/wallpaper.sh & exec_always --no-startup-id $HOME/.scripts/wm/wallpaper.sh &
exec --no-startup-id firefox exec --no-startup-id firefox
exec --no-startup-id urxvt exec --no-startup-id urxvt
+4 -5
View File
@@ -36,11 +36,10 @@ bar() {
} }
start() { start() {
# Exit if panel is already running # Kill existing panel
if [ "$(pgrep lemonbar | awk 'END {print FNR}')" -gt "2" ]; then while [ "$(pgrep -cx lemonbar.sh)" -gt 1 ]; do
printf "%s\n" "The panel is already running." >&2 pkill -ox -9 lemonbar.sh;
exit 1 done
fi
# Trap all subshells # Trap all subshells
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT trap 'trap - TERM; kill 0' INT TERM QUIT EXIT