2021-03-13 08:54:15 -08:00
|
|
|
function __riverctl_completion ()
|
|
|
|
{
|
|
|
|
if [ "${COMP_CWORD}" -eq 1 ]
|
|
|
|
then
|
|
|
|
OPTS=" \
|
|
|
|
csd-filter-add \
|
|
|
|
exit \
|
|
|
|
float-filter-add \
|
|
|
|
focus-output \
|
|
|
|
focus-view \
|
2021-06-13 02:20:57 -07:00
|
|
|
input \
|
|
|
|
list-inputs \
|
|
|
|
list-input-configs \
|
2021-03-13 08:54:15 -08:00
|
|
|
move \
|
|
|
|
resize \
|
|
|
|
snap \
|
|
|
|
send-to-output \
|
|
|
|
spawn \
|
|
|
|
swap \
|
|
|
|
toggle-float \
|
|
|
|
toggle-fullscreen \
|
|
|
|
zoom \
|
2021-04-26 12:03:04 -07:00
|
|
|
default-layout \
|
|
|
|
output-layout \
|
2021-07-15 06:35:56 -07:00
|
|
|
send-layout-cmd \
|
2021-03-13 08:54:15 -08:00
|
|
|
set-focused-tags \
|
2021-07-06 23:51:00 -07:00
|
|
|
focus-previous-tags \
|
2021-03-13 08:54:15 -08:00
|
|
|
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 \
|
2021-07-02 09:28:26 -07:00
|
|
|
focus-follows-cursor \
|
2021-03-13 08:54:15 -08:00
|
|
|
set-repeat \
|
2021-06-22 06:53:22 -07:00
|
|
|
set-cursor-warp \
|
2021-06-13 02:20:57 -07:00
|
|
|
xcursor-theme"
|
2021-03-13 08:54:15 -08:00
|
|
|
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" ;;
|
2021-07-29 09:57:55 -07:00
|
|
|
"focus-follows-cursor") OPTS="disabled normal" ;;
|
2021-06-22 06:53:22 -07:00
|
|
|
"set-cursor-warp") OPTS="disabled on-output-change" ;;
|
2021-03-13 08:54:15 -08:00
|
|
|
*) return ;;
|
|
|
|
esac
|
|
|
|
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[2]}"))
|
2021-06-13 02:20:57 -07:00
|
|
|
elif [ "${COMP_CWORD}" -eq 3 ]
|
|
|
|
then
|
|
|
|
if [ "${COMP_WORDS[1]}" == "input" ]
|
|
|
|
then
|
|
|
|
OPTS="events \
|
|
|
|
accel-profile \
|
|
|
|
pointer-accel \
|
|
|
|
click-method \
|
|
|
|
drag \
|
|
|
|
drag-lock \
|
|
|
|
disable-while-typing \
|
|
|
|
middle-emulation \
|
|
|
|
natural-scroll \
|
|
|
|
left-handed \
|
|
|
|
tap \
|
|
|
|
tap-button-map \
|
|
|
|
scroll-method \
|
|
|
|
scroll-button"
|
|
|
|
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[2]}"))
|
|
|
|
fi
|
|
|
|
elif [ "${COMP_CWORD}" -eq 4 ]
|
|
|
|
then
|
|
|
|
if [ "${COMP_WORDS[1]}" == "input" ]
|
|
|
|
then
|
|
|
|
case "${COMP_WORDS[3]}" in
|
|
|
|
"events") OPTS="enabled disabled disabled-on-external-mouse" ;;
|
|
|
|
"accel-profile") OPTS="none flat adaptive" ;;
|
|
|
|
"click-method") OPTS="none button-areas clickfinger" ;;
|
|
|
|
"drag"|"drag-lock"|"disable-while-typing"|"middle-emulation"|"left-handed"|"tap") OPTS="enabled disabled" ;;
|
|
|
|
"tap-button-map") OPTS="left-right-middle left-middle-right" ;;
|
|
|
|
"scroll-method") OPTS="none two-finger edge button" ;;
|
|
|
|
*) return ;;
|
|
|
|
esac
|
|
|
|
fi
|
2021-03-13 08:54:15 -08:00
|
|
|
else
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
complete -F __riverctl_completion riverctl
|