diff options
Diffstat (limited to '.a/sys/on-wm-logout.sh')
| -rwxr-xr-x | .a/sys/on-wm-logout.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/.a/sys/on-wm-logout.sh b/.a/sys/on-wm-logout.sh index 963578d..7462981 100755 --- a/.a/sys/on-wm-logout.sh +++ b/.a/sys/on-wm-logout.sh @@ -1,10 +1,18 @@ #!/bin/bash # Gracefully close certain programs -grace=(brave) +grace=() +gui=(brave firefox) for app in $grace; do timeout 5 pkill -TERM $app done +for app in $gui; do + wmctrl -c $app + while [ -n "$(pidof $app)" ]; do + sleep 1 + done +done + exit 0 |
