From 6b866f940ef25b1729c12bede0e2b7f010d9a4d8 Mon Sep 17 00:00:00 2001 From: cuu Date: Tue, 25 Dec 2018 14:58:32 +0000 Subject: [PATCH] combine xinitrc to be one --- .cpirc | 4 ++-- .xinitrc | 23 +++++++++++++++++++---- .xinitrc_320 | 4 ---- 3 files changed, 21 insertions(+), 10 deletions(-) delete mode 100644 .xinitrc_320 diff --git a/.cpirc b/.cpirc index ceb4374..ec599da 100644 --- a/.cpirc +++ b/.cpirc @@ -5,8 +5,8 @@ then mpd ~/.mpd.conf if [[ $SCREEN =~ .*320.* ]] then - startx /home/cpi/launcher/.xinitrc_320 -- -nocursor > /tmp/x.log 2>&1 + startx /home/cpi/launcher/.xinitrc -- -nocursor > /tmp/x.log 2>&1 else - startx /home/cpi/launcher/.xinitrc > /tmp/x.log 2>&1 + startx /home/cpi/launcher/.xinitrc hdmi > /tmp/x.log 2>&1 fi fi diff --git a/.xinitrc b/.xinitrc index 1c89549..0a43e59 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,4 +1,19 @@ -feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/desktopbg.jpg -exec ~/launcher/load.sh & -exec ~/launcher/sys.py/gsnotify/gsnotify-arm daemon& -exec /usr/bin/twm -f ~/launcher/.twmrc +session=${1:-gameshell} + +case $session in +hdmi ) + feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/desktopbg.jpg + exec ~/launcher/load.sh & + exec ~/launcher/sys.py/gsnotify/gsnotify-arm daemon & + exec /usr/bin/twm -f ~/launcher/.twmrc + ;; +gameshell ) + feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/loading.png + exec ~/launcher/load.sh & + exec ~/launcher/sys.py/gsnotify/gsnotify-arm & + exec awesome -c ~/launcher/awesome/rc.lua + ;; +*) + exec $1;; +esac + diff --git a/.xinitrc_320 b/.xinitrc_320 deleted file mode 100644 index 083c61f..0000000 --- a/.xinitrc_320 +++ /dev/null @@ -1,4 +0,0 @@ -feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/loading.png -exec ~/launcher/load.sh & -exec ~/launcher/sys.py/gsnotify/gsnotify-arm & -exec awesome -c ~/launcher/awesome/rc.lua