diff options
| author | Leon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de> | 2021-03-13 17:54:15 +0100 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-03-14 17:06:43 +0100 |
| commit | eb1dd401f894199d7e9ddaec15da1c7635402eaf (patch) | |
| tree | 82b66e5b8f882c67f996e40def11b56ec6b156e6 /completions/bash/riverctl | |
| parent | 27cac16ced8ec4a93ac6dec224a4ccabd70f4659 (diff) | |
| download | river-eb1dd401f894199d7e9ddaec15da1c7635402eaf.tar.gz river-eb1dd401f894199d7e9ddaec15da1c7635402eaf.tar.xz | |
Add bash completion for riverctl
Diffstat (limited to 'completions/bash/riverctl')
| -rw-r--r-- | completions/bash/riverctl | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/completions/bash/riverctl b/completions/bash/riverctl new file mode 100644 index 0000000..e744cd1 --- /dev/null +++ b/completions/bash/riverctl @@ -0,0 +1,69 @@ +function __riverctl_completion () +{ + if [ "${COMP_CWORD}" -eq 1 ] + then + OPTS=" \ + csd-filter-add \ + exit \ + float-filter-add \ + focus-output \ + focus-view \ + layout \ + 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 \ + 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" ;; + "declare-option"|"get-option"|"set-option"|"mod-option") OPTS="-output -focused-output" ;; + *) return ;; + esac + COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[2]}")) + else + return + fi +} + +complete -F __riverctl_completion riverctl + |
