Commit Graph

105 Commits

Author SHA1 Message Date
Orfeas
6a71fc65b0
attach-mode: implement after <N> 2024-01-13 12:29:09 -06:00
Leon Henrik Plickat
dd9933b6a1
keyboard-groups: use globber for identifier matching 2024-01-07 12:37:03 -06:00
István Donkó
927dceb071
keyboard: add the ability to load layout from file 2023-11-09 13:23:07 +01:00
Isaac Freund
c4fe1e1a3f
rules: rename "tag" action to "tags"
This rule action accepts and assigns a set of 32 tags represented as a
32 bit integer just like all of river's other commands handling tags.

Using the singular here is potentially misleading and is also
inconsistent with set-view-tags, etc. which all use the plural.

Sorry about the breaking change for those who use master branch, ideally
I would have caught this before merging but at least I noticed before a
release.

This commit also does a bit of internal refactoring/cleanup of the rules
system.
2023-11-08 11:33:27 +01:00
polykernel
2b463c9e4d
river: add fullscreen rule
This commit adds a fullscreen rule for configuring
whether the view should be drawn fullscreen on start up.

The actions "fullscreen" and "no-fullscreen" map to the two
possible state of a view and semantically operate on the same
rule list. The behavior of adding, deleting and listing rules
follows that of float and ssd.
2023-11-08 00:46:56 -05:00
polykernel
a0ea456ab2
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.
2023-11-08 00:46:55 -05:00
tiosgz
ddc7997d2f riverctl(1): add a section on terminology
It is not unusual to see people coming to river directly from X11,
confused by some things being renamed (and by river having tags). Give
them some basic help for reading the manpage and understanding our talk.
2023-10-30 13:53:01 +00:00
Isaac Freund
3fa44d8509
docs: explain unknown info in output identifiers 2023-10-21 12:01:42 +02:00
Doclic
bf4154007d river: add outputs rule 2023-10-19 12:58:11 +02:00
tiosgz
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
Leon Henrik Plickat
b35d779122 river: focus-view and swap by spatial direction 2023-07-09 23:20:06 +02:00
Leon Henrik Plickat
0b142bd16b river: add tags rule 2023-06-28 15:38:32 +02:00
Leon Henrik Plickat
a98de941d0 river: change order of colums in list-rules command
This will make it easier to extend the command later for new rules
2023-06-27 10:47:44 +02:00
Pablo Ovelleiro Corral
b369815070
command/send-to-output: add -current-tags flag 2023-03-25 14:32:31 +01:00
Isaac Freund
0355b654af
doc: fix typo in riverctl man page 2023-03-13 10:04:46 +01:00
Isaac Freund
fe3c3b5246
docs: fix typo in riverctl man page 2023-03-12 17:14:57 +01:00
Isaac Freund
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
Isaac Freund
345d6b737a
docs: fix typos in riverctl man page 2023-02-03 18:18:21 +01:00
Isaac Freund
39104ae9e3
command/spawn-tagmask: apply globally
Currently the spawn-tagmask applies to the currently focused output.
This however means that it is lost if the monitor is unplugged and makes
it hard to set for all outputs.

Change this to make the command apply to all outputs.

This is a breaking change.
2023-01-02 00:58:25 +01:00
Isaac Freund
eed7d94557
docs: improve keyboard layout documentation
- Remove recommendation of XKB_* environment variables in river(1) as we
  now have a dedicated riverctl keyboard-layout command.

- Give an example of how to use and switch between multiple layouts in
  the riverctl(1) man page.
2022-12-28 20:43:54 +01:00
Isaac Freund
0cb6b3f81d
command/keyboard-layout: use flags.zig, cleanup 2022-12-28 20:21:23 +01:00
Leon Henrik Plickat
ad1dbb1180
river: add keyboard-layout command
This allows switching river's keyboard layout at runtime.
2022-12-28 20:20:36 +01:00
shironeko
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
Alexander Courtis
cacc986166
map-pointer: allow running arbitrary commands 2022-11-25 14:05:36 +01:00
Isaac Freund
33187e0b09
ext-session-lock: implement protocol 2022-11-13 16:45:18 +01:00
Isaac Freund
78a46c316a
input-inhibit: remove support for protocol
The only valid use-case for this as far as I'm concerned is lockscreens,
which will now be supported through ext-session-lock-v1.
2022-11-13 16:45:18 +01:00
Isaac Freund
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
Leon Henrik Plickat
01f49bbbc1 river: add keyboard groups 2022-09-12 04:12:21 +02:00
tiosgz
b58bd829c2
docs: better connect 'index' to -layout in riverctl(1) 2022-07-02 21:46:12 +02:00
Isaac Freund
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
Peter Kaplan
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
Duncan Overbruck
0b8758a422
Cursor: Add a hide-cursor command
From the riverctl.1 man page:

*hide-cursor* *timeout* _timeout_
    Hide the cursor if it wasn't moved in the last _timeout_
    milliseconds until it is moved again.
    The default value is 0, which disables automatically hiding the
    cursor. Show the cursor again on any movement.

*hide-cursor* *when-typing* *enabled*|*disabled*
    Hide the cursor when pressing any non-modifier key. Show the cursor
    again on any movement.
2022-04-14 13:37:31 +02:00
Peter Kaplan
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
pmkap
ca47b8a54e
command: allow targeting outputs by name
This extends focus-output and send-to-output to allow targeting
outputs by name instead of relative position.
2022-02-06 15:41:40 +01:00
Leon Henrik Plickat
422cd3e01f
input: Improve input device name format
The name now includes the type, for the case of a physical device
advertising more than one logical device.
2022-02-05 18:52:46 +01:00
Isaac Freund
f79c784e84
command/map: add Alt/Super as aliases for Mod1/Mod4
I personally made the mistake of using Alt instead of Mod1 when messing
with my config. This change makes things a bit more user
friendly/intuitive.
2022-01-17 12:38:41 +01:00
Isaac Freund
0cbe2b9fc3
docs: remove reference to /etc/river/init
We used to look in /etc/river/init if no init at ~/.config/river/init
or $XDG_CONFIG_HOME/river/init was found but this feature was
removed. It seems that we forgot to remove this mention of the old
behavior however.
2021-11-11 16:07:19 +01:00
Isaac Freund
c9de08fa10
docs: update URLs for migration to riverwm github org 2021-11-01 11:28:43 +01:00
Isaac Freund
f2cf4b9455
common: use -h instead of -help
This doesn't really matter that much as unrecognized options will still
trigger a help message to be printed, but -h is much more standard so
lets make the predictable choice here while sticking to only single '-'
flags.
2021-11-01 00:34:15 +01:00
Isaac Freund
4cee1fb881
docs: assorted fixes/cleanups 2021-11-01 00:29:06 +01:00
Isaac Freund
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
Euro20179
102a0b7cf5
docs: change Enter to Return
xkbcommon uses `Return` to indicate this key, `Enter` isn't a valid keysym name.
Co-authored-by: Euro <no>
2021-10-04 11:10:20 +02:00
Isaac Freund
e0784247b6
doc: update my (Isaac's) email address 2021-10-02 13:01:58 +02:00
Peter Rice
81d103d425 river: add send-to-previous-tags command 2021-09-14 22:57:17 +02:00
Ben Fiedler
5f6428bafe river: Allow applying CSD based on window titles
This extends the `csd-filter-add` command to allow matching on window
titles as well, using a `csd-filter-add kind pattern` syntax. The
following kinds are supported:

  * `title`, which matches window titles
  * `app-id`, which matches app ids

Only exact matches are considered.

As an example following configuration applies client-side decorations to
all windows with the title 'asdf with spaces'.

    riverctl csd-filter-add title 'asdf with spaces'
2021-09-07 12:30:53 +00:00
Ben Fiedler
546252aecf river: Allow floating based on window titles
This extends the `float-filter-add` command to allow matching on window
titles as well, using a `float-filter-add kind pattern` syntax. The
following kinds are supported:

  * `title`, which matches window titles
  * `app-id`, which matches app ids

Only exact matches are considered.

As an example following configuration floats all windows with the title
'asdf with spaces'.

    riverctl float-filter-add title 'asdf with spaces'
2021-09-06 12:44:25 +00:00
novakane
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
Keith Hubbard
e9bfc5251e docs: default keyboard mapping mode is "normal" 2021-08-18 20:21:50 +00:00
Keith Hubbard
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
Isaac Freund
00f51e00b4
cursor: remove strict focus-follows-cursor mode
This is pretty much unusable after recent improvements to the cursor
code, and was totally broken causing a stack overflow as soon as the
cursor was moved over any surface until the previous commit.

Furthermore, none of the core contributors or people active on IRC seem
to use it.
2021-07-29 14:05:17 +02:00