bspwm/contrib/bash_completion
Bastien Dejean a0b9199df5 Stack in terms of relative actions
This rewrite is based on a TODO comment for the *stack_refresh*
function of *awesome*:
    It might be worth stopping to restack everyone and only stack `c'
    relatively to the first matching in the list.

And on the concept of relative stacking (via XDG_CONFIG_WINDOW_SIBLING).

Additionally the `adaptative_raise` setting was removed because it
became obsolete when the choice was made of not raising windows when
focusing via `focus_follows_pointer`.

Windows of type *desktop* are now supported (but not managed).
2013-09-12 16:26:01 +02:00

29 lines
1.1 KiB
Bash

_bspc() {
local commands='window desktop monitor query pointer rule restore control config quit'
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 borderless_monocle gapless_monocle focus_follows_pointer pointer_follows_monitor apply_floating_atom auto_alternate auto_cancel history_aware_focus'
COMPREPLY=()
if [[ $COMP_CWORD -ge 1 ]] ; then
local current_word="${COMP_WORDS[COMP_CWORD]}"
if [[ $COMP_CWORD -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "$commands" -- "$current_word") )
return 0
else
local second_word=${COMP_WORDS[1]}
case $second_word in
config)
if [[ $COMP_CWORD -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "$settings" -- "$current_word") )
return 0
fi
;;
esac
fi
fi
}
complete -F _bspc bspc
# vim: set ft=sh: