]> git.donarmstrong.com Git - x_base.git/commitdiff
simplify the window manager fallback code
authorDon Armstrong <don@donarmstrong.com>
Fri, 11 Aug 2017 22:33:11 +0000 (15:33 -0700)
committerDon Armstrong <don@donarmstrong.com>
Fri, 11 Aug 2017 22:33:11 +0000 (15:33 -0700)
.xsession

index 1904d13f027e6bee5d392190ab6a1ca5edb08fc5..b402817caebf2ff4dec895fd30c4a219d5843894 100755 (executable)
--- a/.xsession
+++ b/.xsession
@@ -71,19 +71,10 @@ if [ -x /usr/bin/i3 ]; then
         ~/.config/i3/build_config.sh;
     fi;
     exec /usr/bin/i3;
-elif [ -x /usr/bin/awesome ]; then
-    exec /usr/bin/awesome;
-elif [ -x /usr/bin/ion3 ]; then
-    exec /usr/bin/ion3;
-elif [ -x /usr/bin/openbox ]; then
-        exec /usr/bin/openbox;
-elif [ -x /usr/bin/rxvt ]; then
-        exec /usr/bin/rxvt;
-elif [ -x /usr/bin/rxvt-unicode ]; then
-        exec /usr/bin/rxvt-unicode;
-elif [ -x /usr/bin/xterm ]; then
-        exec /usr/bin/xterm;
 else
-     # we're screwed.
-     sleep 2s;
+    for prog in awesome ion3 openbox stterm st rxvt rxvt-unicode xterm; do
+        if which $prog >/dev/null 2>&1; then
+            exec $(which $prog)
+        fi
+    done;
 fi;