1 # window manager module for grml-quickconfig
2 LINE='print_line "Start ^x (/grml-x/)"'
7 . /etc/grml/script-functions
8 check4progs grml-x >/dev/null
12 # variable definition {{{
18 # window manager definition {{{
40 # deteremine installed window managers {{{
41 print_available_wm() {
42 . /etc/grml/script-functions
46 for key value in ${(kv)wms} ; do
47 if check4progs $value >/dev/null ; then
48 available[$key]=$value
49 # test if word could be added to current line
50 if [ $((${(c)#value} + $LEN)) -ge $(($MAXLEN-9)) ] ; then
55 line+="$(highlight_char $value $key) "
56 LEN=$((${(c)#value} + $LEN))
63 # heading for wm menu {{{
66 print_line "Select a window manager (unsorted list):"
67 print_line "Press any other key to return to the main menu."
72 # print windowm manager loop {{{
76 for line in ${output} ; do
85 run su grml -c "grml-x ${available[$INPUT]}"
93 ## END OF FILE #################################################################
94 # vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=3