diff options
| author | polykernel <81340136+polykernel@users.noreply.github.com> | 2023-08-29 17:54:13 -0400 |
|---|---|---|
| committer | polykernel <81340136+polykernel@users.noreply.github.com> | 2023-11-08 00:46:55 -0500 |
| commit | a0ea456ab2c8ea40232d920c2837cd6222c8c0c3 (patch) | |
| tree | 977688c38a13b6d6870390c76f7a0124d15c66fe /completions | |
| parent | 18a440b6063db07604fa8626fda893cc77d841dc (diff) | |
| download | river-a0ea456ab2c8ea40232d920c2837cd6222c8c0c3.tar.gz river-a0ea456ab2c8ea40232d920c2837cd6222c8c0c3.tar.xz | |
river: add position and dimensions rules
This commit adds position and dimensions rules for configuring
the initial position and dimensions of views.
When a view is not matched by any position rules, it is centered
in the avaliable output space matching the current behavior. If
the provided position rule places the view outside of the output,
the view's position is clamped to the output bounds (with respect
to borders).
When a view is not matched by any dimensions rules, no default
dimensions is set by the server. If the provided dimensions rule
exceeds the minimum or maximum width/height constraints of the view,
the view's width/height is clamped to the constraints.
Position and dimensions rules have no effect if a view is started
fullscreen or is not floating. A view must be matched by a float
rule in order for them to take effect.
Diffstat (limited to 'completions')
| -rw-r--r-- | completions/bash/riverctl | 4 | ||||
| -rw-r--r-- | completions/fish/riverctl.fish | 4 | ||||
| -rw-r--r-- | completions/zsh/_riverctl | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/completions/bash/riverctl b/completions/bash/riverctl index 4b19d4c..c92e001 100644 --- a/completions/bash/riverctl +++ b/completions/bash/riverctl @@ -1,6 +1,6 @@ function __riverctl_completion () { - local rule_actions="float no-float ssd csd tag output" + local rule_actions="float no-float ssd csd tag output position dimensions" if [ "${COMP_CWORD}" -eq 1 ] then OPTS=" \ @@ -66,7 +66,7 @@ function __riverctl_completion () "move"|"snap") OPTS="up down left right" ;; "resize") OPTS="horizontal vertical" ;; "rule-add"|"rule-del") OPTS="-app-id -title $rule_actions" ;; - "list-rules") OPTS="float ssd tag output" ;; + "list-rules") OPTS="float ssd tag output position dimensions" ;; "map") OPTS="-release -repeat -layout" ;; "unmap") OPTS="-release" ;; "attach-mode") OPTS="top bottom" ;; diff --git a/completions/fish/riverctl.fish b/completions/fish/riverctl.fish index c69b232..5f596b9 100644 --- a/completions/fish/riverctl.fish +++ b/completions/fish/riverctl.fish @@ -88,10 +88,10 @@ complete -c riverctl -n '__fish_seen_subcommand_from unmap' complete -c riverctl -n '__fish_seen_subcommand_from attach-mode' -n '__fish_riverctl_complete_arg 2' -a 'top bottom' complete -c riverctl -n '__fish_seen_subcommand_from focus-follows-cursor' -n '__fish_riverctl_complete_arg 2' -a 'disabled normal always' complete -c riverctl -n '__fish_seen_subcommand_from set-cursor-warp' -n '__fish_riverctl_complete_arg 2' -a 'disabled on-output-change on-focus-change' -complete -c riverctl -n '__fish_seen_subcommand_from list-rules' -n '__fish_riverctl_complete_arg 2' -a 'float ssd tag output' +complete -c riverctl -n '__fish_seen_subcommand_from list-rules' -n '__fish_riverctl_complete_arg 2' -a 'float ssd tag output position dimensions' # Options and subcommands for 'rule-add' and 'rule-del' -set -l rule_actions float no-float ssd csd tag output +set -l rule_actions float no-float ssd csd tag output position dimensions complete -c riverctl -n '__fish_seen_subcommand_from rule-add rule-del' -n "not __fish_seen_subcommand_from $rule_actions" -n 'not __fish_seen_argument -o app-id' -o 'app-id' -r complete -c riverctl -n '__fish_seen_subcommand_from rule-add rule-del' -n "not __fish_seen_subcommand_from $rule_actions" -n 'not __fish_seen_argument -o title' -o 'title' -r complete -c riverctl -n '__fish_seen_subcommand_from rule-add rule-del' -n "not __fish_seen_subcommand_from $rule_actions" -n 'test (math (count (commandline -opc)) % 2) -eq 0' -a "$rule_actions" diff --git a/completions/zsh/_riverctl b/completions/zsh/_riverctl index d2cf8ee..2a50abd 100644 --- a/completions/zsh/_riverctl +++ b/completions/zsh/_riverctl @@ -183,9 +183,9 @@ _riverctl() # In case of a new rule added in river, we just need # to add it to the third option between '()', # i.e (float no-float <new-option>) - _arguments '1: :(-app-id -title)' '2: : ' ':: :(float no-float ssd csd tag output)' + _arguments '1: :(-app-id -title)' '2: : ' ':: :(float no-float ssd csd tag output position dimensions)' ;; - list-rules) _alternative 'arguments:args:(float ssd tag output)' ;; + list-rules) _alternative 'arguments:args:(float ssd tag output position dimensions)' ;; *) return 0 ;; esac ;; |
