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 {{{
37 # deteremine installed window managers {{{
38 print_available_wm() {
39 . /etc/grml/script-functions
43 for key value in ${(kv)wms} ; do
44 if check4progs $value >/dev/null ; then
45 available[$key]=$value
46 # test if word could be added to current line
47 if [ $((${(c)#value} + $LEN)) -ge $(($MAXLEN-9)) ] ; then
52 line+="$(highlight_char $value $key) "
53 LEN=$((${(c)#value} + $LEN))
60 # heading for wm menu {{{
63 print_line "Select a window manager (unsorted list):"
64 print_line "Press any other key to return to the main menu."
69 # print windowm manager loop {{{
73 for line in ${output} ; do
82 run su grml -c "grml-x ${available[$INPUT]}"
90 ## END OF FILE #################################################################
91 # vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=3