summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/set_windowmanager.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-23 15:27:45 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-23 15:27:45 (GMT)
commitbda151df1659f3c706385b2b8455c6ab44a1a9e3 (patch)
tree55ac8caa9ce1e33526b40de5e1f09f067e9b0411 /abs/core/LinHES-system/set_windowmanager.sh
parent5b64c7e5eecd283b25cf6f60cd801436ba29fc4e (diff)
downloadlinhes_pkgbuild-bda151df1659f3c706385b2b8455c6ab44a1a9e3.zip
linhes_pkgbuild-bda151df1659f3c706385b2b8455c6ab44a1a9e3.tar.gz
linhes_pkgbuild-bda151df1659f3c706385b2b8455c6ab44a1a9e3.tar.bz2
LinHES-config/LinHES-system: set_windowmanager.sh rename mythvantage style to enhanced.
add checks to set_windowmanager to check that the wm is valid and that the style is valid
Diffstat (limited to 'abs/core/LinHES-system/set_windowmanager.sh')
-rw-r--r--abs/core/LinHES-system/set_windowmanager.sh114
1 files changed, 72 insertions, 42 deletions
diff --git a/abs/core/LinHES-system/set_windowmanager.sh b/abs/core/LinHES-system/set_windowmanager.sh
index 3d0cdb2..105a1e6 100644
--- a/abs/core/LinHES-system/set_windowmanager.sh
+++ b/abs/core/LinHES-system/set_windowmanager.sh
@@ -16,6 +16,64 @@ function stylemsg(){
echo "Startup path will use $1 style"
}
+function set_wm(){
+ case ${windowmanager} in
+
+ default)
+ outmsg "default/fluxbox"
+ outline="fluxbox"
+ echo "" > /etc/X11/WINDOWMANAGER
+ exit 0
+ ;;
+
+ enlightenment)
+ outmsg "enlightenment"
+ outline="e16 -P /data/e16_config_dir/"
+ ;;
+
+ windowmaker)
+ outmsg "window maker"
+ outline_2="export GNUSTEP_USER_ROOT=/data/GNUstep"
+ outline="wmaker"
+ ;;
+
+ *)
+ outline=$windowmanager
+ outmsg "$outline"
+ ;;
+
+ esac
+
+
+
+ case ${style} in
+
+ enhanced)
+ STYLE="enhanced"
+ stylemsg enhanced
+ ;;
+
+ *)
+ if [ x$style != x ]
+ then
+ stylemsg "** Unknown style..using default"
+ STYLE=""
+ else
+ STYLE="$style"
+ stylemsg "Default"
+ fi
+
+ ;;
+ esac
+
+ echo WM=\"${outline}\" > /etc/X11/WINDOWMANAGER
+ echo "STARTUP_STYLE=$STYLE" >> /etc/X11/WINDOWMANAGER
+ echo ${outline_2} >> /etc/X11/WINDOWMANAGER
+
+
+ }
+
+
if [ x$windowmanager = x ]
then
echo
@@ -31,12 +89,12 @@ then
echo
echo "Valid STARTUP_STYLE options are:"
echo " default"
- echo " mythvantage"
+ echo " enhanced"
echo
echo "If STARTUP_STYLE is not given, then the default will be used."
echo
echo "Example: "
- echo " set_windowmanager.sh enlightenment mythvantage"
+ echo " set_windowmanager.sh enlightenment enhanced"
echo
echo " "
echo "if using enlightenment or windowmaker, please ensure that the alt_wm group is installed"
@@ -45,55 +103,27 @@ then
exit 0
fi
+set_wm
-case ${windowmanager} in
-
- default)
- outmsg "default/fluxbox"
- outline="fluxbox"
- echo "" > /etc/X11/WINDOWMANAGER
- exit 0
- ;;
-
- enlightenment)
- outmsg "enlightenment"
- outline="e16 -P /data/e16_config_dir/"
- ;;
-
- windowmaker)
- outmsg "window maker"
- outline_2="export GNUSTEP_USER_ROOT=/data/GNUstep"
-
- outline="wmaker"
- ;;
-
- *)
- outline=$windowmanager
- outmsg "$outline"
- ;;
-
-esac
+WM_CHECK=`echo $outline|cut -d" " -f1 |tr -dc '[:alnum:]'`
+which $WM_CHECK 2>/dev/null
+rc=$?
+if [ $rc != 0 ]
+then
+ echo " ***Window manager $WM_CHECK does not look like it is present"
+ echo " ***setting windowmanger to windowmaker"
+ echo " "
+ windowmanager="windowmaker"
+ set_wm
+fi
-case ${style} in
- mythvantage)
- STYLE="mythvantage"
- stylemsg MythVantage
- ;;
- *)
- STYLE="$style"
- stylemsg "Default"
- ;;
-esac
-echo WM=\"${outline}\" > /etc/X11/WINDOWMANAGER
-echo "STARTUP_STYLE=$STYLE" >> /etc/X11/WINDOWMANAGER
-echo ${outline_2} >> /etc/X11/WINDOWMANAGER