Cursor: revive 'always' focus-follows-cursor mode

This was removed a while back because it was buggy and I didn't know
of anyone using it. Since refactoring it is now trivial to implement
and I know of at least one person using it, so I don't mind reviving it.
This commit is contained in:
Isaac Freund
2022-06-03 11:09:18 +02:00
parent 2df2151afa
commit 50c9e3d81b
6 changed files with 12 additions and 6 deletions

View File

@ -59,7 +59,7 @@ function __riverctl_completion ()
"map") OPTS="-release -repeat -layout" ;;
"unmap") OPTS="-release" ;;
"attach-mode") OPTS="top bottom" ;;
"focus-follows-cursor") OPTS="disabled normal" ;;
"focus-follows-cursor") OPTS="disabled normal always" ;;
"set-cursor-warp") OPTS="disabled on-output-change" ;;
"hide-cursor") OPTS="timeout when-typing" ;;
*) return ;;

View File

@ -73,7 +73,7 @@ complete -c riverctl -x -n '__fish_seen_subcommand_from swap' -a
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'
complete -c riverctl -x -n '__fish_seen_subcommand_from focus-follows-cursor' -a 'disabled normal'
complete -c riverctl -x -n '__fish_seen_subcommand_from focus-follows-cursor' -a 'disabled normal always'
complete -c riverctl -x -n '__fish_seen_subcommand_from set-cursor-warp' -a 'disabled on-output-change'
# Subcommands for 'input'

View File

@ -172,7 +172,7 @@ _riverctl()
map) _alternative 'arguments:optional:(-release -repeat -layout)' ;;
unmap) _alternative 'arguments:optional:(-release)' ;;
attach-mode) _alternative 'arguments:args:(top bottom)' ;;
focus-follows-cursor) _alternative 'arguments:args:(disabled normal)' ;;
focus-follows-cursor) _alternative 'arguments:args:(disabled normal always)' ;;
set-cursor-warp) _alternative 'arguments:args:(disabled on-output-change)' ;;
hide-cursor) _riverctl_hide_cursor ;;
*) return 0 ;;