[SCM] Debian Live application startscripts branch, master, updated. c55810c170092c50e5dbe17fc921e8826e971642
Daniel Baumann
daniel at debian.org
Sat Nov 29 23:25:26 UTC 2008
The following commit has been merged in the master branch:
commit c55810c170092c50e5dbe17fc921e8826e971642
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Nov 30 00:22:55 2008 +0100
Making resolution variables internal.
diff --git a/contrib/live_bolzplatz b/contrib/live_bolzplatz
index b6836a8..932af2f 100755
--- a/contrib/live_bolzplatz
+++ b/contrib/live_bolzplatz
@@ -1,7 +1,7 @@
. $(dirname $0)/start_tools.sh
-Replace "<width>.*<\/width>" "<width>${RESX}<\/width>" /opt/bolzplatz2006/data/config/video.xml
-Replace "<height>.*<\/height>" "<height>${RESY}<\/height>" /opt/bolzplatz2006/data/config/video.xml
+Replace "<width>.*<\/width>" "<width>${_RESOLUTION_X}<\/width>" /opt/bolzplatz2006/data/config/video.xml
+Replace "<height>.*<\/height>" "<height>${_RESOLUTION_Y}<\/height>" /opt/bolzplatz2006/data/config/video.xml
cd /opt/bolzplatz2006/
./bolzplatz2006.sh
diff --git a/functions/resolution.sh b/functions/resolution.sh
index 097ec2c..673c81d 100755
--- a/functions/resolution.sh
+++ b/functions/resolution.sh
@@ -1,9 +1,9 @@
#!/bin/sh
-RESOLUTION="$(xrandr)"
+_RESOLUTION="$(xrandr)"
-read x x x x x x x RESOLUTION_X x RESOLUTION_Y x << EOF
-${RESOLUTION}
+read x x x x x x x _RESOLUTION_X x _RESOLUTION_Y x << EOF
+${_RESOLUTION}
EOF
-RESOLUTION_Y="${RESOLUTION_Y%,}"
+_RESOLUTION_Y="${_RESOLUTION_Y%,}"
diff --git a/scripts/live_armagetronad b/scripts/live_armagetronad
index 0970163..ab40ecf 100755
--- a/scripts/live_armagetronad
+++ b/scripts/live_armagetronad
@@ -1,7 +1,7 @@
. $(dirname $0)/start_tools.sh
Replace "ARMAGETRON_SCREENMODE .*" "ARMAGETRON_SCREENMODE -1" ~/.armagetronad/var/user.cfg
-Replace "ARMAGETRON_SCREENMODE_W .*" "ARMAGETRON_SCREENMODE_W ${RESX}" ~/.armagetronad/var/user.cfg
-Replace "ARMAGETRON_SCREENMODE_H .*" "ARMAGETRON_SCREENMODE_H ${RESY}" ~/.armagetronad/var/user.cfg
+Replace "ARMAGETRON_SCREENMODE_W .*" "ARMAGETRON_SCREENMODE_W ${_RESOLUTION_X}" ~/.armagetronad/var/user.cfg
+Replace "ARMAGETRON_SCREENMODE_H .*" "ARMAGETRON_SCREENMODE_H ${_RESOLUTION_Y}" ~/.armagetronad/var/user.cfg
armagetronad
diff --git a/scripts/live_billardgl b/scripts/live_billardgl
index 65eeb90..d955931 100755
--- a/scripts/live_billardgl
+++ b/scripts/live_billardgl
@@ -1,13 +1,13 @@
. $(dirname $0)/start_tools.sh
# keep a 4:3 ratio
-if [ $(($RESX*3/4)) -le $RESY ]; then
+if [ $((${_RESOLUTION_X}*3/4)) -le ${_RESOLUTION_Y} ]; then
# normal or rotated screen
- WIDTH=$RESX
+ WIDTH="${_RESOLUTION_X}"
else
# widescreen
# must reduce the with a bit because of kicker and window decoration
- WIDTH=$(($RESY*4/3-106))
+ WIDTH=$((${_RESOLUTION_Y}*4/3-106))
fi
sed -i -e "8s/.*/${WIDTH}/" ~/.BillardGL.conf.v7
diff --git a/scripts/live_chromium b/scripts/live_chromium
index 1b82e98..3a9f866 100755
--- a/scripts/live_chromium
+++ b/scripts/live_chromium
@@ -1,10 +1,10 @@
. $(dirname $0)/start_tools.sh
SCREEN_SIZE=0
-[ $RESX -ge 640 -a $RESY -ge 480 ] && SCREEN_SIZE=1
-[ $RESX -ge 800 -a $RESY -ge 600 ] && SCREEN_SIZE=2
-[ $RESX -ge 1024 -a $RESY -ge 768 ] && SCREEN_SIZE=3
-[ $RESX -ge 1280 -a $RESY -ge 960 ] && SCREEN_SIZE=4
+[ ${_RESOLUTION_X} -ge 640 -a ${_RESOLUTION_Y} -ge 480 ] && SCREEN_SIZE=1
+[ ${_RESOLUTION_X} -ge 800 -a ${_RESOLUTION_Y} -ge 600 ] && SCREEN_SIZE=2
+[ ${_RESOLUTION_X} -ge 1024 -a ${_RESOLUTION_Y} -ge 768 ] && SCREEN_SIZE=3
+[ ${_RESOLUTION_X} -ge 1280 -a ${_RESOLUTION_Y} -ge 960 ] && SCREEN_SIZE=4
Replace "screenSize .*" "screenSize $SCREEN_SIZE" ~/.chromium
chromium
diff --git a/scripts/live_enigma b/scripts/live_enigma
index 6473de5..98a419e 100755
--- a/scripts/live_enigma
+++ b/scripts/live_enigma
@@ -1,7 +1,7 @@
. $(dirname $0)/start_tools.sh
# fullscreen or window?
-if [ $(($RESX*3/4)) -eq $RESY -o $(($RESX*4/5)) -eq $RESY ]; then
+if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} -o $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]; then
# we have a 4:3 or a 5:4 resolution
# we can go fullscreen
Replace "FullScreen\" value=\".*\"" "FullScreen\" value=\"1\"" ~/.enigmarc.xml
@@ -11,13 +11,13 @@ else
# start in window mode
Replace "FullScreen\" value=\".*\"" "FullScreen\" value=\"0\"" ~/.enigmarc.xml
# leave some space for kicker and window decoration
- RESY=$(($RESY-76))
+ {_RESOLUTION_Y}=$((${_RESOLUTION_Y}-76))
fi
# search for the largest possible resolution
SCREEN_SIZE=0
-[ $RESX -ge 800 -a $RESY -ge 600 ] && SCREEN_SIZE=2
-[ $RESX -ge 1024 -a $RESY -ge 768 ] && SCREEN_SIZE=3
+[ ${_RESOLUTION_X} -ge 800 -a ${_RESOLUTION_Y} -ge 600 ] && SCREEN_SIZE=2
+[ ${_RESOLUTION_X} -ge 1024 -a ${_RESOLUTION_Y} -ge 768 ] && SCREEN_SIZE=3
Replace "VideoMode\" value=\".*\"" "VideoMode\" value=\"$SCREEN_SIZE\"" ~/.enigmarc.xml
enigma
diff --git a/scripts/live_foobillard b/scripts/live_foobillard
index d8d68d5..89f6753 100755
--- a/scripts/live_foobillard
+++ b/scripts/live_foobillard
@@ -1,5 +1,5 @@
. $(dirname $0)/start_tools.sh
-Replace "geometry=.*" "geometry=${RESX}x${RESY}" ~/.foobillardrc
+Replace "geometry=.*" "geometry=${_RESOLUTION_X}x${_RESOLUTION_Y}" ~/.foobillardrc
foobillard
diff --git a/scripts/live_gcompris b/scripts/live_gcompris
index e7fa885..acb44ec 100755
--- a/scripts/live_gcompris
+++ b/scripts/live_gcompris
@@ -1,7 +1,7 @@
. $(dirname $0)/start_tools.sh
# fullscreen or window?
-if [ $(($RESX*3/4)) -eq $RESY -o $(($RESX*4/5)) -eq $RESY ]; then
+if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} -o $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]; then
# we have a 4:3 or a 5:4 resolution
# we can go fullscreen
gcompris -f --nolockcheck
diff --git a/scripts/live_glest b/scripts/live_glest
index e813224..af846a9 100755
--- a/scripts/live_glest
+++ b/scripts/live_glest
@@ -1,6 +1,6 @@
. $(dirname $0)/start_tools.sh
-Replace "ScreenWidth=.*" "ScreenWidth=${RESX}" ~/.glest/glest.ini
-Replace "ScreenHeight=.*" "ScreenHeight=${RESY}" ~/.glest/glest.ini
+Replace "ScreenWidth=.*" "ScreenWidth=${_RESOLUTION_X}" ~/.glest/glest.ini
+Replace "ScreenHeight=.*" "ScreenHeight=${_RESOLUTION_Y}" ~/.glest/glest.ini
glest
diff --git a/scripts/live_neverball b/scripts/live_neverball
index dd2008a..9c37621 100755
--- a/scripts/live_neverball
+++ b/scripts/live_neverball
@@ -1,6 +1,6 @@
. $(dirname $0)/start_tools.sh
-Replace "width .*" "width ${RESX}" ~/.neverball/neverballrc
-Replace "height .*" "height ${RESY}" ~/.neverball/neverballrc
+Replace "width .*" "width ${_RESOLUTION_X}" ~/.neverball/neverballrc
+Replace "height .*" "height ${_RESOLUTION_Y}" ~/.neverball/neverballrc
neverball
diff --git a/scripts/live_neverputt b/scripts/live_neverputt
index cdc8b2d..56d26d1 100755
--- a/scripts/live_neverputt
+++ b/scripts/live_neverputt
@@ -1,6 +1,6 @@
. $(dirname $0)/start_tools.sh
-Replace "width .*" "width ${RESX}" ~/.neverball/neverballrc
-Replace "height .*" "height ${RESY}" ~/.neverball/neverballrc
+Replace "width .*" "width ${_RESOLUTION_X}" ~/.neverball/neverballrc
+Replace "height .*" "height ${_RESOLUTION_Y}" ~/.neverball/neverballrc
neverputt
diff --git a/scripts/live_pathological b/scripts/live_pathological
index 533129a..e51277c 100755
--- a/scripts/live_pathological
+++ b/scripts/live_pathological
@@ -1,7 +1,7 @@
. $(dirname $0)/start_tools.sh
# fullscreen or window?
-if [ $(($RESX*3/4)) -eq $RESY -o $(($RESX*4/5)) -eq $RESY ]; then
+if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} -o $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]; then
# we have a 4:3 or a 5:4 resolution
# we can go fullscreen
pathological -f
diff --git a/scripts/live_pingus b/scripts/live_pingus
index bc26e9a..845f4eb 100755
--- a/scripts/live_pingus
+++ b/scripts/live_pingus
@@ -1,3 +1,3 @@
. $(dirname $0)/start_tools.sh
-pingus -f --geometry=${RESX}x${RESY}
+pingus -f --geometry=${_RESOLUTION_X}x${_RESOLUTION_Y}
diff --git a/scripts/live_ppracer b/scripts/live_ppracer
index 25927e4..4c5b9a3 100755
--- a/scripts/live_ppracer
+++ b/scripts/live_ppracer
@@ -1,6 +1,6 @@
. $(dirname $0)/start_tools.sh
-Replace "^set x_resolution .*" "set x_resolution ${RESX}" ~/.ppracer/options
-Replace "^set y_resolution .*" "set y_resolution ${RESY}" ~/.ppracer/options
+Replace "^set x_resolution .*" "set x_resolution ${_RESOLUTION_X}" ~/.ppracer/options
+Replace "^set y_resolution .*" "set y_resolution ${_RESOLUTION_Y}" ~/.ppracer/options
ppracer
diff --git a/scripts/live_tomatoes b/scripts/live_tomatoes
index 08d4822..003874f 100755
--- a/scripts/live_tomatoes
+++ b/scripts/live_tomatoes
@@ -1,5 +1,5 @@
. $(dirname $0)/start_tools.sh
-Replace "video_mode .*" "video_mode = ${RESX} x ${RESY}" ~/.tomatoes/config.cfg
+Replace "video_mode .*" "video_mode = ${_RESOLUTION_X} x ${_RESOLUTION_Y}" ~/.tomatoes/config.cfg
tomatoes
diff --git a/scripts/live_trigger b/scripts/live_trigger
index fc8d221..551d4dd 100755
--- a/scripts/live_trigger
+++ b/scripts/live_trigger
@@ -1,6 +1,6 @@
. $(dirname $0)/start_tools.sh
-Replace "width=.*" "width=\"${RESX}\"" ~/.trigger/trigger.config
-Replace "height=.*" "height=\"${RESY}\"" ~/.trigger/trigger.config
+Replace "width=.*" "width=\"${_RESOLUTION_X}\"" ~/.trigger/trigger.config
+Replace "height=.*" "height=\"${_RESOLUTION_Y}\"" ~/.trigger/trigger.config
trigger
diff --git a/scripts/live_wesnoth b/scripts/live_wesnoth
index b90ae43..9aea753 100755
--- a/scripts/live_wesnoth
+++ b/scripts/live_wesnoth
@@ -1,6 +1,6 @@
. $(dirname $0)/start_tools.sh
-Replace "xresolution=.*" "xresolution=\"${RESX}\"" ~/.wesnoth/preferences
-Replace "yresolution=.*" "yresolution=\"${RESY}\"" ~/.wesnoth/preferences
+Replace "xresolution=.*" "xresolution=\"${_RESOLUTION_X}\"" ~/.wesnoth/preferences
+Replace "yresolution=.*" "yresolution=\"${_RESOLUTION_Y}\"" ~/.wesnoth/preferences
wesnoth-nolog
diff --git a/scripts/live_xmoto b/scripts/live_xmoto
index ab1a1fd..5989aed 100755
--- a/scripts/live_xmoto
+++ b/scripts/live_xmoto
@@ -1,6 +1,6 @@
. $(dirname $0)/start_tools.sh
-Replace "DisplayWidth.*" "DisplayWidth\" value=\"${RESX}\"\/\>" ~/.xmoto/config.dat
-Replace "DisplayHeight.*" "DisplayHeight\" value=\"${RESY}\"\/\>" ~/.xmoto/config.dat
+Replace "DisplayWidth.*" "DisplayWidth\" value=\"${_RESOLUTION_X}\"\/\>" ~/.xmoto/config.dat
+Replace "DisplayHeight.*" "DisplayHeight\" value=\"${_RESOLUTION_Y}\"\/\>" ~/.xmoto/config.dat
xmoto
--
Debian Live application startscripts
More information about the debian-live-changes
mailing list