From d5020bc16a120c29469c77b58302710304dbc8d6 Mon Sep 17 00:00:00 2001 From: cuu Date: Tue, 25 Dec 2018 23:08:43 +0800 Subject: [PATCH] combine .xinitrcs to be one --- .cpirc | 4 ++-- .xinitrc | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.cpirc b/.cpirc index f06146e..5ed1a86 100644 --- a/.cpirc +++ b/.cpirc @@ -5,8 +5,8 @@ then mpd ~/.mpd.conf if [[ $SCREEN =~ .*320.* ]] then - startx /home/cpi/launchergo/.xinitrc_320 -- -nocursor > /tmp/x.log 2>&1 + startx /home/cpi/launchergo/.xinitrc -- -nocursor > /tmp/x.log 2>&1 else - startx /home/cpi/launchergo/.xinitrc > /tmp/x.log 2>&1 + startx /home/cpi/launchergo/.xinitrc hdmi > /tmp/x.log 2>&1 fi fi diff --git a/.xinitrc b/.xinitrc index 33ab519..28c2d05 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,4 +1,19 @@ -feh --bg-center ~/launchergo/sysgo/gameshell/wallpaper/desktopbg.jpg -exec ~/launchergo/load.sh & -exec ~/launcher/sys.py/gsnotify/gsnotify-arm daemon& -exec /usr/bin/twm -f ~/launchergo/.twmrc +session=${1:-gameshell} + +case $session in +hdmi ) + feh --bg-center ~/launchergo/sysgo/gameshell/wallpaper/desktopbg.jpg + exec ~/launchergo/load.sh & + exec ~/launcher/sys.py/gsnotify/gsnotify-arm daemon & + exec /usr/bin/twm -f ~/launchergo/.twmrc + ;; +gameshell ) + feh --bg-center ~/launchergo/sysgo/gameshell/wallpaper/loading.png + exec ~/launchergo/load.sh & + exec ~/launcher/sys.py/gsnotify/gsnotify-arm & + exec awesome -c ~/launchergo/awesome/rc.lua + ;; +*) + exec $1;; +esac +