add bash completion for input commands
This commit is contained in:
parent
a267262a17
commit
1fd8d4d828
1 changed files with 38 additions and 1 deletions
|
@ -8,6 +8,9 @@ function __riverctl_completion ()
|
||||||
float-filter-add \
|
float-filter-add \
|
||||||
focus-output \
|
focus-output \
|
||||||
focus-view \
|
focus-view \
|
||||||
|
input \
|
||||||
|
list-inputs \
|
||||||
|
list-input-configs \
|
||||||
move \
|
move \
|
||||||
resize \
|
resize \
|
||||||
snap \
|
snap \
|
||||||
|
@ -40,7 +43,7 @@ function __riverctl_completion ()
|
||||||
focus-follow-cursor \
|
focus-follow-cursor \
|
||||||
opacity \
|
opacity \
|
||||||
set-repeat \
|
set-repeat \
|
||||||
xcursor-theme
|
xcursor-theme"
|
||||||
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[1]}"))
|
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[1]}"))
|
||||||
elif [ "${COMP_CWORD}" -eq 2 ]
|
elif [ "${COMP_CWORD}" -eq 2 ]
|
||||||
then
|
then
|
||||||
|
@ -54,6 +57,40 @@ function __riverctl_completion ()
|
||||||
*) return ;;
|
*) return ;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[2]}"))
|
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[2]}"))
|
||||||
|
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
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue