river: focus-view and swap by spatial direction
This commit is contained in:
@ -59,7 +59,8 @@ function __riverctl_completion ()
|
||||
elif [ "${COMP_CWORD}" -eq 2 ]
|
||||
then
|
||||
case "${COMP_WORDS[1]}" in
|
||||
"focus-output"|"focus-view"|"send-to-output"|"swap") OPTS="next previous" ;;
|
||||
"focus-output"|"send-to-output") OPTS="next previous" ;;
|
||||
"focus-view"|"swap") OPTS="next previous up down left right" ;;
|
||||
"move"|"snap") OPTS="up down left right" ;;
|
||||
"resize") OPTS="horizontal vertical" ;;
|
||||
"rule-add"|"rule-del") OPTS="float no-float ssd csd tag" ;;
|
||||
|
@ -72,12 +72,12 @@ complete -c riverctl -x -n '__fish_riverctl_complete_arg 1' -a 'keyboard-layout'
|
||||
|
||||
# Subcommands
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from focus-output' -a 'next previous'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from focus-view' -a 'next previous'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from focus-view' -a 'next previous up down left right'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from move' -a 'up down left right'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from resize' -a 'horizontal vertical'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from snap' -a 'up down left right'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from send-to-output' -a 'next previous'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from swap' -a 'next previous'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from swap' -a 'next previous up down left right'
|
||||
complete -c riverctl -x -n '__fish_seen_subcommand_from map' -a '-release -repeat -layout'
|
||||
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'
|
||||
|
@ -170,13 +170,13 @@ _riverctl()
|
||||
args)
|
||||
case "$words[1]" in
|
||||
focus-output) _alternative 'arguments:args:(next previous)' ;;
|
||||
focus-view) _alternative 'arguments:args:(next previous)' ;;
|
||||
focus-view) _alternative 'arguments:args:(next previous up down left right)' ;;
|
||||
input) _riverctl_input ;;
|
||||
move) _alternative 'arguments:args:(up down left right)' ;;
|
||||
resize) _alternative 'arguments:args:(horizontal vertical)' ;;
|
||||
snap) _alternative 'arguments:args:(up down left right)' ;;
|
||||
send-to-output) _alternative 'arguments:args:(next previous)' ;;
|
||||
swap) _alternative 'arguments:args:(next previous)' ;;
|
||||
swap) _alternative 'arguments:args:(next previous up down left right)' ;;
|
||||
map) _alternative 'arguments:optional:(-release -repeat -layout)' ;;
|
||||
unmap) _alternative 'arguments:optional:(-release)' ;;
|
||||
attach-mode) _alternative 'arguments:args:(top bottom)' ;;
|
||||
|
Reference in New Issue
Block a user