Refactored and cleaned up the wm entry
[grml-quickconfig.git] / quickconfig / 005-language.sh
1 # language module for grml-quickconfig
2 LINE='print_line "Set keyboard layout (${HIGHLIGHT_NAME}grml-lang${NORMAL}): \
3 ${HIGHLIGHT}d${NORMAL}e ${HIGHLIGHT}a${NORMAL}t ${HIGHLIGHT}c${NORMAL}h e${HIGHLIGHT}s${NORMAL} ${HIGHLIGHT}u${NORMAL}s"'
4
5 typeset -A lang_mapping
6
7 # map keys to language
8 lang_mapping=(
9     d de
10     a at
11     c ch
12     s es
13     u us
14 )
15
16 # get all keys from assoc array
17 KEY=(${(k)lang_mapping})
18
19 # $INPUT is the user input
20 FUNCTION='run grml-lang ${lang_mapping[$INPUT]}'
21
22 # always display entry
23 display_entry() {
24     return 0
25 }
26
27 ## END OF FILE #################################################################
28 # vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=3