blob: bb9fbad10c9fee019cf3be53054ea5cd83bdfe40 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
function __riverctl_completion ()
{
if [ "${COMP_CWORD}" -eq 1 ]
then
OPTS=" \
csd-filter-add \
exit \
float-filter-add \
focus-output \
focus-view \
mod-main-count \
mod-main-factor \
move \
resize \
snap \
send-to-output \
spawn \
swap \
toggle-float \
toggle-fullscreen \
zoom \
set-focused-tags \
set-view-tags \
toggle-focused-tags \
toggle-view-tags \
spawn-tagmask \
declare-mode \
enter-mode \
map \
map-pointer \
unmap \
unmap-pointer \
attach-mode \
background-color \
border-color-focused \
border-color-unfocused \
border-width \
focus-follow-cursor \
opacity \
outer-padding \
set-repeat \
view-padding \
xcursor-theme \
declare-option \
get-option \
set-option \
unset-option \
mod-option"
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[1]}"))
elif [ "${COMP_CWORD}" -eq 2 ]
then
case "${COMP_WORDS[1]}" in
"focus-output"|"focus-view"|"send-to-output"|"swap") OPTS="next previous" ;;
"move"|"snap") OPTS="up down left right" ;;
"resize") OPTS="horizontal vertical" ;;
"map"|"unmap") OPTS="-release" ;;
"attach-mode") OPTS="top bottom" ;;
"focus-follows-cursor") OPTS="disabled normal strict" ;;
"get-option"|"set-option"|"unset-option"|"mod-option") OPTS="-output -focused-output" ;;
*) return ;;
esac
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[2]}"))
else
return
fi
}
complete -F __riverctl_completion riverctl
|