]> git.lizzy.rs Git - bspwm.git/blob - bash_completion
Cosmetic improvements
[bspwm.git] / bash_completion
1 _bspc()
2 {
3     local messages='window desktop monitor query pointer rule restore control config quit'
4
5     local settings='focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color urgent_border_color border_width window_gap split_ratio wm_name borderless_monocle gapless_monocle focus_follows_pointer pointer_follows_monitor adaptative_raise apply_shadow_property auto_alternate auto_cancel history_aware_focus'
6
7     COMPREPLY=()
8
9     if [[ $COMP_CWORD -ge 1 ]] ; then
10         local current_word="${COMP_WORDS[COMP_CWORD]}"
11         if [[ $COMP_CWORD -eq 1 ]] ; then
12             COMPREPLY=( $(compgen -W "$messages" -- "$current_word") )
13             return 0
14         else
15             local second_word=${COMP_WORDS[1]}
16             case $second_word in
17                 config)
18                     if [[ $COMP_CWORD -eq 2 ]] ; then
19                         COMPREPLY=( $(compgen -W "$settings" -- "$current_word") )
20                     fi
21                     ;;
22             esac
23         fi
24     fi
25 }
26
27 complete -F _bspc bspc
28
29 # vim: set ft=sh: