river-options: rework, bump to v2
Options are now all global but may be overridden per-output. If an output local value is requested but none has been set, the global value is provided instead. This makes for much better ergonomics when configuring layout related options in particular.
This commit is contained in:
@ -45,6 +45,7 @@ function __riverctl_completion ()
|
||||
declare-option \
|
||||
get-option \
|
||||
set-option \
|
||||
unset-option \
|
||||
mod-option"
|
||||
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[1]}"))
|
||||
elif [ "${COMP_CWORD}" -eq 2 ]
|
||||
@ -56,7 +57,7 @@ function __riverctl_completion ()
|
||||
"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" ;;
|
||||
"get-option"|"set-option"|"unset-option"|"mod-option") OPTS="-output -focused-output" ;;
|
||||
*) return ;;
|
||||
esac
|
||||
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[2]}"))
|
||||
@ -66,4 +67,3 @@ function __riverctl_completion ()
|
||||
}
|
||||
|
||||
complete -F __riverctl_completion riverctl
|
||||
|
||||
|
Reference in New Issue
Block a user