From 53b55b4b10ef6344a882402d5dcaf11d87b78d3f Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Sat, 19 Mar 2022 19:27:36 +0100 Subject: Initial commit --- bin/sxs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 bin/sxs (limited to 'bin/sxs') 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 -- cgit v1.2.3