commit 8fa514ce15cb30e1fd315ed331d118064e0b0fff
parent 749400ae07e3d97998acebc51dbe83a893065004
Author: Chris Bracken <chris@bracken.jp>
Date: Fri, 23 Jul 2021 15:35:59 -0700
sway: clean up exit_check.sh
Adds a check for dmenu. If not installed, bail out immediately.
Also fixes up a typo in the XMODIFIERS bug URL and where I refer to sway
as i3.
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/.config/sway/exit_check.sh b/.config/sway/exit_check.sh
@@ -1,9 +1,14 @@
#!/bin/sh
-# Use dmenu to check if the user wants to exit i3.
+# Use dmenu to check if the user wants to exit sway.
+
+# If dmenu isn't installed, bail out immediately.
+if [ ! -e /usr/local/bin/dmenu ]; then
+ swaymsg exit
+fi
# Work around dmenu crasher when XOpenIM() returns NULL.
-# See: https://bugs.archlinux.com/task/61673
+# See: https://bugs.archlinux.org/task/61673
unset XMODIFIERS
while [ "$choice" != "no" ] && [ "$choice" != "yes" ]; do