1
0
Fork 0

rework background killing

This commit is contained in:
Luca Bilke 2024-02-04 11:47:19 +01:00
parent 44b38cb71d
commit 30eadb8039
2 changed files with 6 additions and 4 deletions

View File

@ -14,7 +14,5 @@ echo "Starting DWM"
dwm dwm
echo "Exited DWM, Killing $(jobs -p | awk "{print \$3}")" echo "Exited DWM"
kill $(jobs -p | awk "{print \$3}")
' '

View File

@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
# This script is executed by DWM on start. # This script is executed by DWM on start.
SIGINT=2 SIGTERM=15
trap 'trap - SIGTERM && kill -- -$$' $SIGINT $SIGTERM EXIT
start() { start() {
pidof -sx "$1" || "$@" & pidof -sx "$1" || "$@" &
} }
@ -32,9 +35,10 @@ remaps -qd
start unclutter -noevents & start unclutter -noevents &
start gpgconf --launch gpg-agent start gpgconf --launch gpg-agent
start env PATH="$HOME/.local/libexec/statusbar:$PATH" dwmblocks
start picom start picom
start pipewire start pipewire
start dunst start dunst
start checkup start checkup
start syncthingtray start syncthingtray
killall dwmblocks; env PATH="$HOME/.local/libexec/statusbar:$PATH" dwmblocks &