summaryrefslogtreecommitdiff
path: root/.a
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2023-02-25 12:38:39 +0200
committerSyndamia <kamen@syndamia.com>2023-02-25 12:39:13 +0200
commitca9f7dd9e4627122d6e773a227931312ffc31465 (patch)
treedd4668a6337cae3d8a3bb289e551ee04a079f76d /.a
parentef8a237d05150a5e5efb5a99c1e617723e1059f7 (diff)
downloaddotfiles-ca9f7dd9e4627122d6e773a227931312ffc31465.tar
dotfiles-ca9f7dd9e4627122d6e773a227931312ffc31465.tar.gz
dotfiles-ca9f7dd9e4627122d6e773a227931312ffc31465.zip
[.a/sys/owl] Graceful closure of gui apps now properly waits for the application to end
Diffstat (limited to '.a')
-rwxr-xr-x.a/sys/on-wm-logout.sh10
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