Browse Source

combine xinitrc to be one

cuu 5 years ago
parent
commit
6b866f940e
3 changed files with 21 additions and 10 deletions
  1. 2 2
      .cpirc
  2. 19 4
      .xinitrc
  3. 0 4
      .xinitrc_320

+ 2 - 2
.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

+ 19 - 4
.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
+

+ 0 - 4
.xinitrc_320

@@ -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