completions: add set-cursor-warp for zsh/fish

This commit is contained in:
Isaac Freund 2021-06-26 19:00:16 +02:00
parent 61829d82fe
commit df492f83e6
2 changed files with 5 additions and 2 deletions

View file

@ -4,7 +4,7 @@ end
function __fish_riverctl_complete_no_subcommand
for i in (commandline -opc)
if contains -- $i close csd-filter-add exit float-filter-add focus-output focus-view input list-inputs list-input-configs move resize snap send-to-output spawn swap toggle-float toggle-fullscreen zoom default-layout output-layout set-layout-value mod-layout-value 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-follows-cursor opacity set-repeat xcursor-theme
if contains -- $i close csd-filter-add exit float-filter-add focus-output focus-view input list-inputs list-input-configs move resize snap send-to-output spawn swap toggle-float toggle-fullscreen zoom default-layout output-layout set-layout-value mod-layout-value 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-follows-cursor opacity set-repeat set-cursor-warp xcursor-theme
return 1
end
end
@ -80,6 +80,7 @@ complete -c riverctl -x -n '__fish_riverctl_complete_no_subcommand' -a border-wi
complete -c riverctl -x -n '__fish_riverctl_complete_no_subcommand' -a focus-follows-cursor -d 'Configure the focus behavior when moving cursor'
complete -c riverctl -x -n '__fish_riverctl_complete_no_subcommand' -a opacity -d 'Configure server-side opacity of views'
complete -c riverctl -x -n '__fish_riverctl_complete_no_subcommand' -a set-repeat -d 'Set the keyboard repeat rate and repeat delay'
complete -c riverctl -x -n '__fish_riverctl_complete_no_subcommand' -a set-cursor-warp -d 'Set the cursor warp mode.'
complete -c riverctl -x -n '__fish_riverctl_complete_no_subcommand' -a xcursor-theme -d 'Set the xcursor theme'
# Subcommands
@ -94,6 +95,7 @@ complete -c riverctl -x -n '__fish_seen_subcommand_from map' -a
complete -c riverctl -x -n '__fish_seen_subcommand_from unmap' -a '-release'
complete -c riverctl -x -n '__fish_seen_subcommand_from attach-mode' -a 'top bottom'
complete -c riverctl -x -n '__fish_seen_subcommand_from focus-follows-cursor' -a 'disabled normal strict'
complete -c riverctl -x -n '__fish_seen_subcommand_from set-cursor-warp' -a 'disabled on-output-change'
# Subcommands for 'input'
complete -c riverctl -x -n '__fish_seen_subcommand_from input; and __fish_riverctl_complete_from_input' -a "(__riverctl_list_input_devices)"

View file

@ -49,6 +49,7 @@ _riverctl_subcommands()
'focus-follows-cursor:Configure the focus behavior when moving cursor'
'opacity:Configure server-side opacity of views'
'set-repeat:Set the keyboard repeat rate and repeat delay'
'set-cursor-warp:Set the cursor warp mode.'
'xcursor-theme:Set the xcursor theme'
# Input
'input:Configure input devices'
@ -137,6 +138,7 @@ _riverctl()
unmap) _alternative 'arguments:optional:(-release)' ;;
attach-mode) _alternative 'arguments:args:(top bottom)' ;;
focus-follows-cursor) _alternative 'arguments:args:(disabled normal strict)' ;;
set-cursor-warp) _alternative 'arguments:args:(disabled on-output-change)' ;;
*) return 0 ;;
esac
;;
@ -144,4 +146,3 @@ _riverctl()
}
_riverctl "$@"