summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/set_windowmanager.sh
blob: 5c1150d60ba41118fda1ce04c3d26c62b1ef23b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/bash
#  Script to change the windowmanger used when starting the frontend.
#  If a style is given, it will change  which & how programs will start.
#
#
windowmanager="$1"
style="$2"


function outmsg(){
    echo
    echo "Changing windowmanger to $1"
    }

function stylemsg(){
    echo "Startup path will use $1 style"
    }

if [ x$windowmanager = x ]
then
    echo
    echo "Usage: "
    echo "    set_windowmanger.sh  WINDOWMANAGER STARTUP_STYLE"
    echo
    echo "Valid WINDOWMANAGER options are:"
    echo "      default"
    echo "      enlightenment"
    echo "      fluxbox"
    echo "      windowmaker"
    echo "      place_custom_startup_here"
    echo
    echo "Valid STARTUP_STYLE options are:"
    echo "      default"
    echo "      mythvantage"
    echo
    echo "If STARTUP_STYLE is not given, then the default will be used."
    echo
    echo "Example:    "
    echo "    set_windowmanger.sh  enlightenment mythvantage"
    echo


    exit 0
fi


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

    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