1 # window manager module for grml-quickconfig
2 LINE='print_line "Start ${HIGHLIGHT}x${NORMAL} (${HIGHLIGHT_NAME}grml-x${NORMAL})"'
10 # variable definition {{{
16 # window manager definition {{{
38 # deteremine installed window managers {{{
39 print_available_wm() {
40 . /etc/grml/script-functions
44 for key value in ${(kv)wms} ; do
45 if check4progs $value >/dev/null ; then
46 available[$key]=$value
47 # test if word could be added to current line
48 if [ $((${(c)#value} + $LEN)) -ge $(($MAXLEN-9)) ] ; then
53 line+="$(highlight_char $value $key) "
54 LEN=$((${(c)#value} + $LEN))
61 # heading for wm menu {{{
64 print_line "Select a window manager (unsorted list):"
65 print_line "Press any other key to return to the main menu."
70 # print windowm manager loop {{{
74 for line in ${output} ; do
83 run su grml -c "grml-x ${available[$INPUT]}"
91 ## END OF FILE #################################################################
92 # vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=3