Commit Graph

44 Commits

Author SHA1 Message Date
bf4154007d river: add outputs rule 2023-10-19 12:58:11 +02:00
ad1e0aa752 completions/zsh: Fix incomplete input names
Input name with ':' in it were not suggested entirely.
2023-10-18 13:23:47 +02:00
de5f21cbb4 completions: Rewrite zsh
- Fix some completions that never really worked correctly, e.g `riverctl
  input` didn't take the input name into account. Same with rule that
  didn't take into account glob.

- Add a lot of documentation to help people adding new commands.

- Add new rule-[add|del] order.

- `riverctl input` now autocomplete input name from `riverctl
  list-inputs`
2023-10-18 12:17:10 +02:00
d73ef51c89 riverctl: rule-{add,del}: reorder parameters
Previous order was (action, conditions, action argument), current is
(conditions, action, action argument). The old one was an expansion of
(action, conditions), which itself most likely came from the separate
<action>-filter-add commands. On the other hand, the new order keeps
action and its argument together and is in line with the logical flow
(check conditions, apply action).

On shell completions: only bash absolutely needed to be updated. fish
and zsh slightly misbehave regardless of the order.
2023-10-16 17:04:40 +00:00
b35d779122 river: focus-view and swap by spatial direction 2023-07-09 23:20:06 +02:00
0b142bd16b river: add tags rule 2023-06-28 15:38:32 +02:00
b2b2c9ed13 river: add rules system
This is a breaking change and replaces the previous
csd-filter-add/remove and float-filter-add/remove commands.

See the riverctl(1) man page for documentation on the new system.
2023-03-12 16:44:19 +01:00
701d16c2ea completions: add keyboard-layout 2023-01-06 16:36:00 +01:00
8036ae2bd1 Cursor: add on-focus-change option
Warp the cursor to the center of the focused view if the cursor is not
in the bounding box of that view already. This helps the user to keep
track of their cursor when they mostly use the keyboard and the cursor
becomes hidden most of the time, also helps trackpad/trackpoint users.
2022-12-01 14:23:02 +01:00
cacc986166 map-pointer: allow running arbitrary commands 2022-11-25 14:05:36 +01:00
e35c147cd5 river: refactor keyboard groups implementation
This reduces the impact of keyboard groups on the Keyboard.zig
implementation and otherwise improves consistency with patterns used
elsewhere in rivers code.

There are also two small changes to the riverctl interface:

- keyboard-group-add-keyboard is renamed to keyboard-group-add
- keyboard-group-remove is added to support removing keyboards from a
group.
2022-09-18 15:53:45 +02:00
01f49bbbc1 river: add keyboard groups 2022-09-12 04:12:21 +02:00
50c9e3d81b 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.
2022-06-03 12:03:08 +02:00
44aaee3a51 command/map: layout-pinned mappings
e.g. `riverctl map -layout 0 normal Super Y spawn foot`

When this mapping is checked against a pressed key, layout 0 will be used to translate the pressed key instead of the currently active layout.

The number denotes to an index of the layouts set with
`XKB_DEFAULT_LAYOUT`.
2022-04-27 18:31:08 +02:00
8f59075bc5 completions: fish: new completions for the ‘hide-cursor’ command 2022-04-20 20:33:55 +02:00
3979dd5cf9 completions: bash: new completions for the ‘hide-cursor’ command 2022-04-20 20:33:50 +02:00
790de95726 completions: zsh: new completions for the ‘hide-cursor’ command 2022-04-20 19:00:26 +02:00
60fdefc3fd input: add map-switch/unmap-switch commands
This allows running a command on a laptop's lid being opened/closed
or a tablet's button/switch being pressed/toggled.
2022-04-14 12:49:47 +02:00
363fd3f6a4 completions/fish: simplify 2021-11-01 18:27:41 +07:00
c9de08fa10 docs: update URLs for migration to riverwm github org 2021-11-01 11:28:43 +01:00
8757644b2a docs: standardize on "layout generator"
This is likely more clear than "layout client" to most users.
2021-10-31 22:32:59 +01:00
81d103d425 river: add send-to-previous-tags command 2021-09-14 22:57:17 +02:00
e59c2a73d7 river: implement xdg-activation-v1
- add a new "urgent" border color
- add a new event to river-status-unstable-v1

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
2021-08-19 12:58:52 +00:00
2bdf9e20a5 command: support repeating keyboard mappings
Repeating mappings are created using the -repeat option to the map
command:

    % riverctl map normal $mod+Mod1 K -repeat move up 10

- repeating is only supported for key press (not -release) mappings
- unlike -release, -repeat does not create distinct mappings: mapping a
  key with -repeat will replace an existing bare mapping and vice-versa

Resolves #306
2021-08-15 14:49:11 +02:00
879046ef83 completions: Remove strict in focus-follows-cursor 2021-07-29 17:19:06 +00:00
22251fa7ed completions: Update for river-layout-v3 2021-07-20 10:48:48 +02:00
96e1082156 river: remove opacity command
This code is complex and increases maintenance burden but doesn't
add any functionality, only eye-candy.

Futhermore, neither I nor any of the core contributors use it.

There may be a place in river for such eye-candy down the line, in which
case this code could be revived. Currently river is early enough in its
development that our focus should be on core functionality instead.
2021-07-20 08:47:02 +00:00
28fc8792d7 river: add focus-previous-tags command 2021-07-15 12:00:22 +00:00
ba6a38f491 completions: typo
focus-follows-cursor instead of focus-follow-cursor
2021-07-02 19:11:36 +02:00
df492f83e6 completions: add set-cursor-warp for zsh/fish 2021-06-26 19:03:49 +02:00
61829d82fe completions: Add bash completion for set-cursor-warp commands 2021-06-26 19:03:49 +02:00
12c12c4b6c completions: add fish completion for input command 2021-06-16 09:59:37 -07:00
db35f700a8 completions/zsh: add input commands 2021-06-16 09:54:07 -07:00
1fd8d4d828 add bash completion for input commands 2021-06-13 10:37:36 -07:00
2e7c1dbe6a config: make attach-mode global 2021-06-08 18:26:36 +00:00
e80b883a47 river-layout: update to v2
This implements the changes to the river-layout protocol proposed
in the previous commit removing river-options.
2021-04-27 00:10:20 +02:00
871fc7c8de river-options: remove protocol
This protocol involves far too much accidental complexity. The original
motivating use-case was to provide a convenient way to send arbitrary
data to layout clients at runtime in order to avoid layout clients
needing to implement their own IPC and do this over a side-channel.
Instead of implementing a quite complex but still rigid options protocol
and storing this state in the compositor, instead we will simply add
events to the layout protocol to support this use case.

Consider the status quo event sequence:

1. send get_option_handle request (riverctl)
2. roundtrip waiting for first event (riverctl)
3. send set_foo_value request (riverctl)
4. receive set_foo_value request (river)
5. send foo_value event to all current handles (river)
6. receive foo_value event (rivertile)
7. send parameters_changed request (rivertile)
8. receive parameters_changed request (river)
9. send layout_demand (river)

And compare with the event sequence after the proposed change:

1. send set_foo_value request (riverctl)
2. receive set_foo_value request (river)
3. send set_foo_value event (river)
4. send layout_demand (river)

This requires *much* less back and forth between the server and clients
and is clearly much simpler.
2021-04-27 00:10:20 +02:00
891eb38b33 completions: delete more removed commands 2021-04-21 16:51:53 +02:00
967b274c01 completions: Remove completions for removed subcommand "layout" 2021-04-21 16:47:27 +02:00
d08032d685 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.
2021-04-20 18:27:03 +02:00
8627a2feff riverctl: add fish completion 2021-03-16 17:38:21 +01:00
bd604b0f47 Fix existing typos 2021-03-16 17:38:21 +01:00
c9a4dde331 completions: add zsh completion for riverctl 2021-03-14 17:31:59 +01:00
eb1dd401f8 Add bash completion for riverctl 2021-03-14 17:06:43 +01:00