git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/bin/sxs
diff options
context:
space:
mode:
authormail_redacted_for_web 2022-03-19 19:27:36 +0100
committermail_redacted_for_web 2022-03-19 19:27:36 +0100
commit53b55b4b10ef6344a882402d5dcaf11d87b78d3f (patch)
treea4c8f2248fe0ef17d2c7cd98a62adfc5f0a2a7ca /bin/sxs
downloaddotfiles-53b55b4b10ef6344a882402d5dcaf11d87b78d3f.tar.bz2
Initial commit
Diffstat (limited to 'bin/sxs')
-rwxr-xr-xbin/sxs35
1 files changed, 35 insertions, 0 deletions
diff --git a/bin/sxs b/bin/sxs
new file mode 100755
index 0000000..7e544ef
--- /dev/null
+++ b/bin/sxs
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+pidof -s xinit && exit 0
+
+[ -z "$STXTARG" ] && STXTARG="$1"
+
+if [ -z "$STXTARG" ];then
+ read -p "Start: e16, xmonad, gnome or kde? " STXTARG
+ [ -z "$STXTARG" ] && STXTARG="xmonad"
+fi
+
+case "$STXTARG" in
+ e16)
+ diff ~/.xsession-e16 ~/.xsession &> /dev/null
+ [ "$?" -ne 0 ] && ln -sf .xsession-e16 ~/.xsession
+ ;;
+ xmonad)
+ diff ~/.xsession-xmonad ~/.xsession &> /dev/null
+ [ "$?" -ne 0 ] && ln -sf .xsession-xmonad ~/.xsession
+ ;;
+ gnome)
+ diff ~/.xsession-gnome ~/.xsession &> /dev/null
+ [ "$?" -ne 0 ] && ln -sf .xsession-gnome ~/.xsession
+ ;;
+ kde)
+ diff ~/.xsession-kde ~/.xsession &> /dev/null
+ [ "$?" -ne 0 ] && ln -sf .xsession-kde ~/.xsession
+ ;;
+ *)
+ echo "Sorry, I don't know $STXTARG as window manager."
+ exit 1
+ ;;
+esac
+
+startx