diff options
| author | Leon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de> | 2021-06-13 09:20:57 +0000 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-06-13 10:37:36 -0700 |
| commit | 1fd8d4d828eda4edb7843d1ce4bbec10e566b3dd (patch) | |
| tree | 60a5af9d7184429e179471036ed9c2719706bab4 /completions | |
| parent | a267262a17f4a50b9fa2a8caaff1c2ef30e7c35b (diff) | |
| download | river-1fd8d4d828eda4edb7843d1ce4bbec10e566b3dd.tar.gz river-1fd8d4d828eda4edb7843d1ce4bbec10e566b3dd.tar.xz | |
add bash completion for input commands
Diffstat (limited to 'completions')
| -rw-r--r-- | completions/bash/riverctl | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/completions/bash/riverctl b/completions/bash/riverctl index e0000b7..83708c0 100644 --- a/completions/bash/riverctl +++ b/completions/bash/riverctl @@ -8,6 +8,9 @@ function __riverctl_completion () float-filter-add \ focus-output \ focus-view \ + input \ + list-inputs \ + list-input-configs \ move \ resize \ snap \ @@ -40,7 +43,7 @@ function __riverctl_completion () focus-follow-cursor \ opacity \ set-repeat \ - xcursor-theme + xcursor-theme" COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[1]}")) elif [ "${COMP_CWORD}" -eq 2 ] then @@ -54,6 +57,40 @@ function __riverctl_completion () *) return ;; esac 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 return fi |
