2021-11-01 03:28:43 -07:00
|
|
|
RIVERCTL(1) "github.com/riverwm/river" "General Commands Manual"
|
2020-12-12 15:51:51 -08:00
|
|
|
|
2020-06-15 00:51:23 -07:00
|
|
|
# NAME
|
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
riverctl - command-line interface for controlling river
|
2020-06-15 00:51:23 -07:00
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
2021-07-24 10:42:34 -07:00
|
|
|
*riverctl* [_options_] _command_ [_command specific arguments_]
|
2020-06-15 00:51:23 -07:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
*riverctl* is a command-line utility used to control and configure river
|
|
|
|
over the Wayland protocol.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2021-07-24 10:42:34 -07:00
|
|
|
# OPTIONS
|
|
|
|
|
2021-10-31 16:34:15 -07:00
|
|
|
*-h*
|
2021-07-24 10:42:34 -07:00
|
|
|
Print a help message and exit.
|
|
|
|
|
|
|
|
*-version*
|
|
|
|
Print the version number and exit.
|
|
|
|
|
2023-10-30 06:45:30 -07:00
|
|
|
# TERMINOLOGY
|
|
|
|
|
|
|
|
This manual uses terms that some may find confusing, coming mostly from their
|
|
|
|
usage among other Wayland projects.
|
|
|
|
|
|
|
|
The *compositor*, display server, Wayland server etc. are ways to refer to river
|
|
|
|
itself.
|
|
|
|
|
|
|
|
A *view* (or *toplevel*) is what most call a window.
|
|
|
|
|
|
|
|
An *output* is a synonym for a screen or monitor.
|
|
|
|
|
|
|
|
*Tags* are river's way of dividing views of an output into groups (not
|
|
|
|
necessarily disjunct), an analogy to workspaces.
|
|
|
|
|
2020-06-15 00:51:23 -07:00
|
|
|
# COMMANDS
|
|
|
|
|
|
|
|
## ACTIONS
|
|
|
|
|
|
|
|
*close*
|
|
|
|
Close the focused view.
|
|
|
|
|
|
|
|
*exit*
|
|
|
|
Exit the compositor, terminating the Wayland session.
|
|
|
|
|
2022-02-06 06:41:40 -08:00
|
|
|
*focus-output* *next*|*previous*|*up*|*right*|*down*|*left*|_name_
|
|
|
|
Focus the next or previous output, the closest output in any direction
|
|
|
|
or an output by name.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2023-07-07 21:30:27 -07:00
|
|
|
*focus-view* *next*|*previous*|*up*|*down*|*left*|*right*
|
|
|
|
Focus the next or previous view in the stack or the closest view in
|
|
|
|
any direction.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-10-06 18:00:57 -07:00
|
|
|
*move* *up*|*down*|*left*|*right* _delta_
|
2020-12-30 14:10:41 -08:00
|
|
|
Move the focused view in the specified direction by _delta_ logical
|
|
|
|
pixels. The view will be set to floating.
|
2020-10-06 18:00:57 -07:00
|
|
|
|
|
|
|
*resize* *horizontal*|*vertical* _delta_
|
2020-12-30 14:10:41 -08:00
|
|
|
Resize the focused view along the given axis by _delta_ logical
|
|
|
|
pixels. The view will be set to floating.
|
2020-10-06 18:00:57 -07:00
|
|
|
|
|
|
|
*snap* *up*|*down*|*left*|*right*
|
2020-12-30 14:10:41 -08:00
|
|
|
Snap the focused view to the specified screen edge. The view will
|
|
|
|
be set to floating.
|
2020-10-06 18:00:57 -07:00
|
|
|
|
2023-03-23 03:56:56 -07:00
|
|
|
*send-to-output* [*-current-tags*] *next*|*previous*|*up*|*right*|*down*|*left*|_name_
|
2022-02-06 06:41:40 -08:00
|
|
|
Send the focused view to the next or previous output, the closest
|
|
|
|
output in any direction or to an output by name.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2023-03-23 03:56:56 -07:00
|
|
|
- *-current-tags*: Assign the currently focused tags of the destination
|
|
|
|
output to the view.
|
|
|
|
|
2020-06-15 00:51:23 -07:00
|
|
|
*spawn* _shell_command_
|
2021-07-15 15:00:28 -07:00
|
|
|
Run _shell_command_ using `/bin/sh -c _shell_command_`. Note that
|
|
|
|
*spawn* only takes a single argument. To spawn a command taking
|
|
|
|
multiple arguments, wrapping the command in quotes is recommended.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2023-07-07 21:30:27 -07:00
|
|
|
*swap* *next*|*previous*|*up*|*down*|*left*|*right*
|
|
|
|
Swap the focused view with the next or previous non-floating view in the
|
|
|
|
stack or the closest non-floating view in any direction.
|
2020-10-25 04:41:19 -07:00
|
|
|
|
2020-06-15 00:51:23 -07:00
|
|
|
*toggle-float*
|
2020-12-30 14:10:41 -08:00
|
|
|
Toggle the floating state of the focused view.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-06-28 16:50:26 -07:00
|
|
|
*toggle-fullscreen*
|
|
|
|
Toggle the fullscreen state of the focused view.
|
|
|
|
|
2020-06-15 00:51:23 -07:00
|
|
|
*zoom*
|
2020-12-30 14:10:41 -08:00
|
|
|
Bump the focused view to the top of the layout stack. If the top
|
|
|
|
view in the stack is already focused, bump the second view.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2021-04-26 07:35:26 -07:00
|
|
|
*default-layout* _namespace_
|
|
|
|
Set the layout namespace to be used by all outputs by default.
|
|
|
|
|
|
|
|
*output-layout* _namespace_
|
|
|
|
Set the layout namespace of currently focused output, overriding
|
|
|
|
the value set with *default-layout* if any.
|
|
|
|
|
2021-07-15 04:22:37 -07:00
|
|
|
*send-layout-cmd* _namespace_ _command_
|
2021-10-31 14:32:59 -07:00
|
|
|
Send _command_ to the layout generator on the currently focused output
|
|
|
|
with the given _namespace_, if any. What commands a layout generator
|
|
|
|
understands depends on the layout generator. For rivertile, see the
|
2021-07-15 04:22:37 -07:00
|
|
|
documentation in the *rivertile*(1) man page.
|
2021-04-26 12:03:28 -07:00
|
|
|
|
2020-12-30 05:25:37 -08:00
|
|
|
## TAG MANAGEMENT
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-12-30 05:25:37 -08:00
|
|
|
Tags are similar to workspaces but more flexible. You can assign views multiple
|
|
|
|
tags and focus multiple tags simultaneously. Bitfields are used to describe
|
|
|
|
sets of tags when interfacing with river. As such, the following commands
|
|
|
|
take a normal base 10 number as their argument but the semantics are best
|
|
|
|
understood in binary. The binary number 000000001 represents a set containing
|
|
|
|
only tag 1 while 100001101 represents a set containing tags 1, 3, 4, and 9.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2021-01-02 00:43:53 -08:00
|
|
|
When a view spawns it is assigned the currently focused tags of the output.
|
|
|
|
|
2020-12-30 05:25:37 -08:00
|
|
|
At least one tag must always be focused and each view must be assigned at
|
|
|
|
least one tag. Operations that would violate either of these requirements
|
|
|
|
are ignored by river.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-12-30 05:25:37 -08:00
|
|
|
*set-focused-tags* _tags_
|
|
|
|
Show views with tags corresponding to the set bits of _tags_ on the
|
|
|
|
currently focused output.
|
|
|
|
|
|
|
|
*set-view-tags* _tags_
|
|
|
|
Assign the currently focused view the tags corresponding to the set
|
|
|
|
bits of _tags_.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-12-30 05:25:37 -08:00
|
|
|
*toggle-focused-tags* _tags_
|
|
|
|
Toggle visibility of views with tags corresponding to the set bits
|
|
|
|
of _tags_ on the currently focused output.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-12-30 05:25:37 -08:00
|
|
|
*toggle-view-tags* _tags_
|
|
|
|
Toggle the tags of the currently focused view corresponding to the
|
|
|
|
set bits of _tags_.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2021-01-02 00:43:53 -08:00
|
|
|
*spawn-tagmask* _tagmask_
|
2023-01-01 15:54:53 -08:00
|
|
|
Set a _tagmask_ to filter the tags assigned to newly spawned views. This mask
|
|
|
|
will be applied to the tags of new views with a bitwise and. If, for example,
|
|
|
|
the tags 000011111 are focused and the spawn _tagmask_ is 111110001, a
|
|
|
|
new view will be assigned the tags 000010001. If no tags would remain after
|
2021-01-02 00:43:53 -08:00
|
|
|
filtering, the _tagmask_ is ignored.
|
|
|
|
|
2021-07-06 23:51:00 -07:00
|
|
|
*focus-previous-tags*
|
|
|
|
Sets tags to their previous value on the currently focused output,
|
|
|
|
allowing jumping back and forth between 2 tag setups.
|
|
|
|
|
2021-09-11 13:21:48 -07:00
|
|
|
*send-to-previous-tags*
|
|
|
|
Assign the currently focused view the previous tags of the currently
|
|
|
|
focused output.
|
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
## MAPPINGS
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2021-12-29 20:27:50 -08:00
|
|
|
Mappings are modal in river. Each mapping is associated with a mode and
|
|
|
|
is only active while in that mode. There are two special modes: "normal"
|
|
|
|
and "locked". The normal mode is the initial mode on startup. The locked
|
|
|
|
mode is automatically entered while the session is locked (e.g. due to
|
|
|
|
a screenlocker). It cannot be entered or exited manually.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
The following modifiers are available for use in mappings:
|
2020-06-15 00:51:23 -07:00
|
|
|
|
|
|
|
- Shift
|
2022-01-17 03:38:41 -08:00
|
|
|
- Lock
|
|
|
|
- Control
|
2020-06-17 01:39:48 -07:00
|
|
|
- Mod1 (Alt)
|
2020-06-15 00:51:23 -07:00
|
|
|
- Mod2
|
|
|
|
- Mod3
|
2022-01-17 03:38:41 -08:00
|
|
|
- Mod4 (Super)
|
2020-06-15 00:51:23 -07:00
|
|
|
- Mod5
|
2022-01-17 03:38:41 -08:00
|
|
|
- None
|
|
|
|
|
|
|
|
Alt and Super are aliases for Mod1 and Mod4 respectively. None allows creating
|
|
|
|
a mapping without modifiers
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
Keys are specified by their XKB keysym name. See
|
|
|
|
_/usr/include/xkbcommon/xkbcommon-keysyms.h_ for the complete list.
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2023-02-03 09:18:21 -08:00
|
|
|
Mouse buttons are specified by Linux input event code names. The most commonly
|
2020-12-30 14:10:41 -08:00
|
|
|
used values are:
|
2020-08-24 05:52:47 -07:00
|
|
|
|
|
|
|
- BTN_LEFT - left mouse button
|
|
|
|
- BTN_RIGHT - right mouse button
|
|
|
|
- BTN_MIDDLE - middle mouse button
|
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
A complete list may be found in _/usr/include/linux/input-event-codes.h_
|
2020-08-24 05:52:47 -07:00
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
*declare-mode* _name_
|
|
|
|
Create a new mode called _name_.
|
2020-08-24 05:52:47 -07:00
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
*enter-mode* _name_
|
2021-03-16 08:16:06 -07:00
|
|
|
Switch to given mode if it exists.
|
2020-08-24 05:52:47 -07:00
|
|
|
|
2023-03-12 07:40:42 -07:00
|
|
|
*map* [*-release*|*-repeat*|*-layout* _index_] _mode_ _modifiers_ _key_ _command_
|
2020-12-30 14:10:41 -08:00
|
|
|
Run _command_ when _key_ is pressed while _modifiers_ are held down
|
|
|
|
and in the specified _mode_.
|
2020-10-03 13:09:15 -07:00
|
|
|
|
2023-03-12 07:40:42 -07:00
|
|
|
- *-release*: if passed activate on key release instead of key press
|
|
|
|
- *-repeat*: if passed activate repeatedly until key release; may not
|
|
|
|
be used with *-release*
|
|
|
|
- *-layout*: if passed, a specific layout is pinned to the mapping.
|
2022-04-20 06:38:18 -07:00
|
|
|
When the mapping is checked against a pressed key, this layout is
|
|
|
|
used to translate the key independent of the active layout
|
2022-12-28 11:43:54 -08:00
|
|
|
- _index_: zero-based index of a layout set with the *keyboard-layout*
|
2023-03-12 07:40:42 -07:00
|
|
|
command. If the index is out of range, the *-layout* option will
|
2022-12-28 11:43:54 -08:00
|
|
|
have no effect
|
2020-12-30 14:10:41 -08:00
|
|
|
- _mode_: name of the mode for which to create the mapping
|
|
|
|
- _modifiers_: one or more of the modifiers listed above, separated
|
|
|
|
by a plus sign (+).
|
|
|
|
- _key_: an XKB keysym name as described above
|
|
|
|
- _command_: any command that may be run with riverctl
|
2020-10-03 13:09:15 -07:00
|
|
|
|
2022-09-12 19:05:21 -07:00
|
|
|
*map-pointer* _mode_ _modifiers_ _button_ _action_|_command_
|
|
|
|
Move or resize views or run _command_ when _button_ and _modifiers_ are held
|
|
|
|
down while in the specified _mode_. The view under the cursor will be
|
|
|
|
focused.
|
2020-12-30 14:10:41 -08:00
|
|
|
|
|
|
|
- _mode_: name of the mode for which to create the mapping
|
|
|
|
- _modifiers_: one or more of the modifiers listed above, separated
|
|
|
|
by a plus sign (+).
|
2023-02-03 09:18:21 -08:00
|
|
|
- _button_: the name of a Linux input event code as described above
|
2020-12-30 14:10:41 -08:00
|
|
|
- _action_: one of the following values:
|
|
|
|
- move-view
|
|
|
|
- resize-view
|
2022-09-12 19:05:21 -07:00
|
|
|
- _command_: any command that may be run with riverctl
|
2020-12-30 14:10:41 -08:00
|
|
|
|
2022-02-07 05:51:23 -08:00
|
|
|
*map-switch* _mode_ *lid*|*tablet* _state_ _command_
|
|
|
|
Run _command_ when river receives a certain switch event.
|
|
|
|
|
|
|
|
- _mode_: name of the mode for which to create the mapping
|
|
|
|
- _lid_|_tablet_: 'lid switch' and 'tablet mode switch' are supported
|
|
|
|
- _state_:
|
|
|
|
- possible states for _lid_:
|
|
|
|
- close
|
|
|
|
- open
|
|
|
|
- possible states for _tablet_:
|
|
|
|
- on
|
|
|
|
- off
|
|
|
|
- _command_: any command that may be run with riverctl
|
|
|
|
|
2023-03-12 07:40:42 -07:00
|
|
|
*unmap* [*-release*] _mode_ _modifiers_ _key_
|
2020-12-30 14:10:41 -08:00
|
|
|
Remove the mapping defined by the arguments:
|
|
|
|
|
2023-03-12 07:40:42 -07:00
|
|
|
- *-release*: if passed unmap the key release instead of the key press
|
2020-12-30 14:10:41 -08:00
|
|
|
- _mode_: name of the mode for which to remove the mapping
|
|
|
|
- _modifiers_: one or more of the modifiers listed above, separated
|
|
|
|
by a plus sign (+).
|
|
|
|
- _key_: an XKB keysym name as described above
|
|
|
|
|
|
|
|
*unmap-pointer* _mode_ _modifiers_ _button_
|
|
|
|
Remove the pointer mapping defined by the arguments:
|
|
|
|
|
|
|
|
- _mode_: name of the mode for which to remove the mapping
|
|
|
|
- _modifiers_: one or more of the modifiers listed above, separated
|
|
|
|
by a plus sign (+).
|
2023-02-03 09:18:21 -08:00
|
|
|
- _button_: the name of a Linux input event code as described above
|
2020-12-30 14:10:41 -08:00
|
|
|
|
2022-02-07 05:51:23 -08:00
|
|
|
*unmap-switch* _mode_ *lid*|*tablet* _state_
|
|
|
|
Remove the switch mapping defined by the arguments:
|
|
|
|
|
|
|
|
- _mode_: name of the mode for which to remove the mapping
|
|
|
|
- _lid_|_tablet_: the switch for which to remove the mapping
|
|
|
|
- _state_: a state as listed above
|
|
|
|
|
2023-03-12 07:40:42 -07:00
|
|
|
## RULES
|
|
|
|
|
2023-03-12 09:14:57 -07:00
|
|
|
Rules match the app-id and title of views against a _glob_ pattern. A _glob_
|
|
|
|
is a string that may optionally have an _\*_ at the beginning and/or end. An
|
|
|
|
_\*_ in a _glob_ matches zero or more arbitrary characters in the app-id
|
|
|
|
or title.
|
2023-03-12 07:40:42 -07:00
|
|
|
|
|
|
|
For example, _abc_ is matched by _a\*_, _\*a\*_, _\*b\*_, _\*c_, _abc_, and
|
2023-03-13 02:04:46 -07:00
|
|
|
_\*_ but not matched by _\*a_, _b\*_, _\*b_, _c\*_, or _ab_. Note that _\*_
|
2023-03-12 07:40:42 -07:00
|
|
|
matches everything while _\*\*_ and the empty string are invalid.
|
|
|
|
|
2023-08-29 14:54:13 -07:00
|
|
|
*rule-add* [*-app-id* _glob_|*-title* _glob_] _action_ [_arguments_]
|
2023-03-12 07:40:42 -07:00
|
|
|
Add a rule that applies an _action_ to views with *app-id* and *title*
|
|
|
|
matched by the respective _glob_. Omitting *-app-id* or *-title*
|
|
|
|
is equivalent to passing *-app-id* _\*_ or *-title* _\*_.
|
2023-08-29 14:54:13 -07:00
|
|
|
Some actions require one or more _arguments_.
|
2023-03-12 07:40:42 -07:00
|
|
|
|
|
|
|
The supported _action_ types are:
|
|
|
|
|
|
|
|
- *float*: Make the view floating. Applies only to new views.
|
|
|
|
- *no-float*: Don't make the view floating. Applies only to
|
|
|
|
new views.
|
|
|
|
- *ssd*: Use server-side decorations for the view. Applies to new
|
|
|
|
and existing views.
|
|
|
|
- *csd*: Use client-side decorations for the view. Applies to new
|
|
|
|
and existing views.
|
2023-11-08 02:28:06 -08:00
|
|
|
- *tags*: Set the initial tags of the view. Requires the tags as
|
2023-06-26 17:11:13 -07:00
|
|
|
an argument. Applies only to new views.
|
2023-10-19 03:58:11 -07:00
|
|
|
- *output*: Set the initial output of the view. Requires the output
|
|
|
|
as an argument. Applies only to new views. The output can be specified
|
|
|
|
either by connector name (such as _HDMI-A-1_, or _DP-2_), or by
|
|
|
|
identifier in the form of _MAKE MODEL SERIAL_, for example for an output
|
|
|
|
with make: _HP Inc._, model: _HP 22w_, and serial: _CNC93720WF_, the
|
2023-10-21 03:01:42 -07:00
|
|
|
identifier would be: _HP Inc. HP 22w CNC93720WF_. If the make, model, or
|
|
|
|
serial is unknown, the word "Unknown" is used instead.
|
2023-08-29 14:54:13 -07:00
|
|
|
- *position*: Set the initial position of the view, clamping to the
|
|
|
|
bounds of the output. Requires x and y coordinates of the view as
|
|
|
|
arguments, both of which must be non-negative. Applies only to new views.
|
|
|
|
- *dimensions*: Set the initial dimensions of the view, clamping to the
|
|
|
|
constraints of the view. Requires width and height of the view as
|
|
|
|
arguments, both of which must be non-negative. Applies only to new views.
|
|
|
|
- *fullscreen*: Make the view fullscreen. Applies only to new views.
|
|
|
|
- *no-fullscreen*: Don't make the view fullscreen. Applies only to
|
|
|
|
new views.
|
2023-03-12 07:40:42 -07:00
|
|
|
|
|
|
|
Both *float* and *no-float* rules are added to the same list,
|
|
|
|
which means that adding a *no-float* rule with the same arguments
|
|
|
|
as a *float* rule will overwrite it. The same holds for *ssd* and
|
2023-11-06 07:53:44 -08:00
|
|
|
*csd*, *fullscreen* and *no-fullscreen* rules.
|
2023-03-12 07:40:42 -07:00
|
|
|
|
|
|
|
If multiple rules in a list match a given view the most specific
|
|
|
|
rule will be applied. For example with the following rules
|
|
|
|
```
|
2023-06-26 17:01:27 -07:00
|
|
|
app-id title action
|
|
|
|
foo bar ssd
|
|
|
|
foo * csd
|
|
|
|
* bar csd
|
|
|
|
* baz ssd
|
2023-03-12 07:40:42 -07:00
|
|
|
```
|
|
|
|
a view with app-id 'foo' and title 'bar' would get ssd despite matching
|
|
|
|
two csd rules as the first rule is most specific. Furthermore a view
|
|
|
|
with app-id 'foo' and title 'baz' would get csd despite matching the
|
|
|
|
last rule in the list since app-id specificity takes priority over
|
|
|
|
title specificity.
|
|
|
|
|
|
|
|
If a view is not matched by any rule, river will respect the csd/ssd
|
|
|
|
wishes of the client and may start the view floating based on simple
|
|
|
|
heuristics intended to catch popup-like views.
|
|
|
|
|
2023-08-29 14:54:13 -07:00
|
|
|
If a view is started fullscreen or is not floating, then *position* and
|
|
|
|
*dimensions* rules will have no effect A view must be matched by a *float*
|
|
|
|
rule in order for them to take effect.
|
|
|
|
|
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-01 08:49:21 -07:00
|
|
|
*rule-del* [*-app-id* _glob_|*-title* _glob_] _action_
|
2023-03-12 07:40:42 -07:00
|
|
|
Delete a rule created using *rule-add* with the given arguments.
|
|
|
|
|
2023-11-08 02:28:06 -08:00
|
|
|
*list-rules* *float*|*ssd*|*tags*|*position*|*dimensions*|*fullscreen*
|
2023-03-12 07:40:42 -07:00
|
|
|
Print the specified rule list. The output is ordered from most specific
|
|
|
|
to least specific, the same order in which views are checked against
|
|
|
|
when searching for a match. Only the first matching rule in the list
|
|
|
|
has an effect on a given view.
|
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
## CONFIGURATION
|
|
|
|
|
2024-01-13 10:27:14 -08:00
|
|
|
*default-attach-mode* *top*|*bottom*|*after <N>*
|
2024-01-03 06:33:13 -08:00
|
|
|
Set the attach mode to be used by all outputs by default.
|
|
|
|
|
|
|
|
Possible values:
|
|
|
|
- top: Prepends the newly spawned view at the top of the stack.
|
|
|
|
- bottom: Appends the newly spawned view at the bottom of the stack.
|
|
|
|
- after <N>: Inserts the newly spawned view after N views in the stack.
|
|
|
|
|
2024-01-13 10:27:14 -08:00
|
|
|
Note that the deprecated *attach-mode* command is aliased to
|
|
|
|
*default-attach-mode* for backwards compatibility.
|
2024-01-03 06:33:13 -08:00
|
|
|
|
|
|
|
*output-attach-mode* *top*|*bottom*|*after <N>*
|
|
|
|
Set the attach mode of the currently focused output, overriding the value of
|
|
|
|
default-attach-mode if any.
|
2020-12-30 14:10:41 -08:00
|
|
|
|
2021-07-26 11:36:46 -07:00
|
|
|
*background-color* _0xRRGGBB_|_0xRRGGBBAA_
|
2020-12-30 14:10:41 -08:00
|
|
|
Set the background color.
|
|
|
|
|
2021-07-26 11:36:46 -07:00
|
|
|
*border-color-focused* _0xRRGGBB_|_0xRRGGBBAA_
|
2020-12-30 14:10:41 -08:00
|
|
|
Set the border color of focused views.
|
|
|
|
|
2021-07-26 11:36:46 -07:00
|
|
|
*border-color-unfocused* _0xRRGGBB_|_0xRRGGBBAA_
|
2020-12-30 14:10:41 -08:00
|
|
|
Set the border color of unfocused views.
|
|
|
|
|
2021-08-12 07:16:23 -07:00
|
|
|
*border-color-urgent* _0xRRGGBB_|_0xRRGGBBAA_
|
|
|
|
Set the border color of urgent views.
|
|
|
|
|
2020-12-30 14:10:41 -08:00
|
|
|
*border-width* _pixels_
|
|
|
|
Set the border width to _pixels_.
|
|
|
|
|
2022-06-03 02:09:18 -07:00
|
|
|
*focus-follows-cursor* *disabled*|*normal*|*always*
|
|
|
|
There are three available modes:
|
2020-12-30 14:10:41 -08:00
|
|
|
|
|
|
|
- _disabled_: Moving the cursor does not affect focus. This is
|
2021-05-06 18:46:26 -07:00
|
|
|
the default.
|
2020-12-30 14:10:41 -08:00
|
|
|
- _normal_: Moving the cursor over a view will focus that view.
|
|
|
|
Moving the cursor within a view will not re-focus that view if
|
|
|
|
focus has moved elsewhere.
|
2022-06-03 02:09:18 -07:00
|
|
|
- _always_: Moving the cursor will always focus whatever view is
|
|
|
|
under the cursor.
|
2020-12-30 14:10:41 -08:00
|
|
|
|
|
|
|
If the view to be focused is on an output that does not have focus,
|
|
|
|
focus is switched to that output.
|
|
|
|
|
2022-02-27 15:39:10 -08:00
|
|
|
*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-08-01 17:31:50 -07:00
|
|
|
*set-cursor-warp* *disabled*|*on-output-change*|*on-focus-change*
|
2021-05-06 18:46:26 -07:00
|
|
|
Set the cursor warp mode. There are two available modes:
|
|
|
|
|
|
|
|
- _disabled_: Cursor will not be warped. This is the default.
|
|
|
|
- _on-output-change_: When a different output is focused, the cursor will be
|
|
|
|
warped to its center.
|
2022-08-01 17:31:50 -07:00
|
|
|
- _on-focus-change_: When a different view/output is focused, the cursor will be
|
|
|
|
warped to its center.
|
2021-05-06 18:46:26 -07:00
|
|
|
|
2020-11-18 06:28:33 -08:00
|
|
|
*set-repeat* _rate_ _delay_
|
|
|
|
Set the keyboard repeat rate to _rate_ key repeats per second and
|
|
|
|
repeat delay to _delay_ milliseconds.
|
|
|
|
|
2020-07-14 08:34:29 -07:00
|
|
|
*xcursor-theme* _theme_name_ [_size_]
|
2020-12-12 15:51:51 -08:00
|
|
|
Set the xcursor theme to _theme_name_ and optionally set the _size_.
|
2020-12-30 14:10:41 -08:00
|
|
|
The theme of the default seat determines the default for Xwayland
|
|
|
|
and is made available through the _XCURSOR_THEME_ and _XCURSOR_SIZE_
|
2020-12-12 15:51:51 -08:00
|
|
|
environment variables.
|
2020-07-14 08:34:29 -07:00
|
|
|
|
2021-06-08 08:53:40 -07:00
|
|
|
## INPUT CONFIGURATION
|
|
|
|
|
2021-06-10 00:38:17 -07:00
|
|
|
*list-inputs*
|
|
|
|
List all input devices.
|
|
|
|
|
2021-06-12 04:58:58 -07:00
|
|
|
*list-input-configs*
|
|
|
|
List all input configurations.
|
|
|
|
|
2022-12-28 11:19:25 -08:00
|
|
|
*keyboard-layout* [-rules _rules_] [-model _model_] [-variant _variant_] \
|
|
|
|
[-options _options_] _layout_
|
2022-12-28 11:43:54 -08:00
|
|
|
Set the XKB layout for all keyboards. Defaults from libxkbcommon are used for
|
2023-02-03 09:18:21 -08:00
|
|
|
everything left unspecified. Note that _layout_ may be a comma separated list
|
2022-12-28 11:43:54 -08:00
|
|
|
of layouts (e.g. "us,de") which may be switched between using various key
|
|
|
|
combinations configured through the options argument (e.g. -options
|
|
|
|
"grp:ctrl_space_toggle"). See *xkeyboard-config*(7) for possible values and
|
|
|
|
more information.
|
2022-10-16 12:49:40 -07:00
|
|
|
|
2023-08-12 12:30:55 -07:00
|
|
|
*keyboard-layout-file* _path_
|
|
|
|
Set the XKB layout for all keyboards from an XKB keymap file at the provided
|
|
|
|
path. Documentation for the XKB keymap file format can be found at the
|
|
|
|
following URL:
|
|
|
|
https://xkbcommon.org/doc/current/keymap-text-format-v1.html
|
|
|
|
|
2022-09-17 02:26:45 -07:00
|
|
|
*keyboard-group-create* _group_name_
|
2022-08-30 06:26:35 -07:00
|
|
|
Create a keyboard group. A keyboard group collects multiple keyboards in
|
|
|
|
a single logical keyboard. This means that all state, like the active
|
|
|
|
modifiers, is shared between the keyboards in a group.
|
|
|
|
|
2022-09-17 02:26:45 -07:00
|
|
|
*keyboard-group-destroy* _group_name_
|
|
|
|
Destroy the keyboard group with the given name. All attached keyboards
|
2023-02-03 09:18:21 -08:00
|
|
|
will be released, making them act as separate devices again.
|
2022-08-30 06:26:35 -07:00
|
|
|
|
2022-09-17 02:26:45 -07:00
|
|
|
*keyboard-group-add* _group_name_ _input_device_name_
|
|
|
|
Add a keyboard to a keyboard group, identified by the keyboard's
|
|
|
|
input device name. Any currently connected and future keyboards with
|
2024-01-03 12:30:46 -08:00
|
|
|
the given name will be added to the group. Simple globbing patterns are
|
|
|
|
supported, see the rules section for further information on globs.
|
2022-09-17 02:26:45 -07:00
|
|
|
|
|
|
|
*keyboard-group-remove* _group_name_ _input_device_name_
|
|
|
|
Remove a keyboard from a keyboard group, identified by the keyboard's
|
|
|
|
input device name.
|
2022-08-30 06:26:35 -07:00
|
|
|
|
2021-06-08 08:53:40 -07:00
|
|
|
The _input_ command can be used to create a configuration rule for an input
|
|
|
|
device identified by its _name_.
|
2022-02-03 02:39:20 -08:00
|
|
|
The _name_ of an input device consists of its type, its numerical vendor id,
|
|
|
|
its numerical product id and finally its self-advertised name, separated by -.
|
2021-06-08 08:53:40 -07:00
|
|
|
|
2022-09-17 02:26:45 -07:00
|
|
|
A list of all device properties that can be configured may be found below.
|
2021-06-08 08:53:40 -07:00
|
|
|
However note that not every input device supports every property.
|
|
|
|
|
|
|
|
*input* _name_ *events* *enabled*|*disabled*|*disabled-on-external-mouse*
|
|
|
|
Configure whether the input devices events will be used by river.
|
|
|
|
|
|
|
|
*input* _name_ *accel-profile* *none*|*flat*|*adaptive*
|
|
|
|
Set the pointer acceleration profile of the input device.
|
|
|
|
|
|
|
|
*input* _name_ *pointer-accel* _factor_
|
|
|
|
Set the pointer acceleration factor of the input device. Needs a float
|
|
|
|
between -1.0 and 1.0.
|
|
|
|
|
|
|
|
*input* _name_ *click-method* *none*|*button-areas*|*clickfinger*
|
|
|
|
Set the click method of the input device.
|
|
|
|
|
|
|
|
*input* _name_ *drag* *enabled*|*disabled*
|
|
|
|
Enable or disable the tap-and-drag functionality of the input device.
|
|
|
|
|
|
|
|
*input* _name_ *drag-lock* *enabled*|*disabled*
|
|
|
|
Enable or disable the drag lock functionality of the input device.
|
|
|
|
|
|
|
|
*input* _name_ *disable-while-typing* *enabled*|*disabled*
|
|
|
|
Enable or disable the disable-while-typing functionality of the input device.
|
|
|
|
|
|
|
|
*input* _name_ *middle-emulation* *enabled*|*disabled*
|
|
|
|
Enable or disable the middle click emulation functionality of the input device.
|
|
|
|
|
|
|
|
*input* _name_ *natural-scroll* *enabled*|*disabled*
|
|
|
|
Enable or disable the natural scroll functionality of the input device. If
|
|
|
|
active, the scroll direction is inverted.
|
|
|
|
|
|
|
|
*input* _name_ *left-handed* *enabled*|*disabled*
|
|
|
|
Enable or disable the left handed mode of the input device.
|
|
|
|
|
|
|
|
*input* _name_ *tap* *enabled*|*disabled*
|
|
|
|
Enable or disable the tap functionality of the input device.
|
|
|
|
|
|
|
|
*input* _name_ *tap-button-map* *left-right-middle*|*left-middle-right*
|
|
|
|
Configure the button mapping for tapping.
|
|
|
|
|
|
|
|
- _left-right-middle_: 1 finger tap equals left click, 2 finger tap equals
|
|
|
|
right click, 3 finger tap equals middle click.
|
|
|
|
- _left-middle-right_: 1 finger tap equals left click, 2 finger tap equals
|
|
|
|
middle click, 3 finger tap equals right click.
|
|
|
|
|
|
|
|
*input* _name_ *scroll-method* *none*|*two-finger*|*edge*|*button*
|
|
|
|
Set the scroll method of the input device.
|
|
|
|
|
|
|
|
- _none_: No scrolling
|
|
|
|
- _two-finger_: Scroll by swiping with two fingers simultaneously
|
|
|
|
- _edge_: Scroll by swiping along the edge
|
|
|
|
- _button_: Scroll with pointer movement while holding down a button
|
|
|
|
|
|
|
|
*input* _name_ *scroll-button* _button_
|
2023-02-03 09:18:21 -08:00
|
|
|
Set the scroll button of an input device. _button_ is the name of a Linux
|
2021-06-08 08:53:40 -07:00
|
|
|
input event code.
|
|
|
|
|
2020-06-15 00:51:23 -07:00
|
|
|
# EXAMPLES
|
|
|
|
|
2021-10-04 02:10:20 -07:00
|
|
|
Bind Super+Return in normal mode to spawn a *foot*(1) terminal:
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2021-10-04 02:10:20 -07:00
|
|
|
riverctl map normal Mod4 Return spawn 'foot --app-id=foobar'
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2021-11-11 07:07:19 -08:00
|
|
|
Bind Super+Shift+J to swap the focused view with the next visible view:
|
|
|
|
|
|
|
|
riverctl map normal Mod4+Shift J swap next
|
2020-06-15 00:51:23 -07:00
|
|
|
|
2020-11-11 11:44:41 -08:00
|
|
|
# AUTHORS
|
|
|
|
|
2021-10-02 04:01:58 -07:00
|
|
|
Maintained by Isaac Freund <mail@isaacfreund.com> who is assisted by open
|
2020-11-11 11:44:41 -08:00
|
|
|
source contributors. For more information about river's development, see
|
2021-11-01 03:28:43 -07:00
|
|
|
<https://github.com/riverwm/river>.
|
2020-11-11 11:44:41 -08:00
|
|
|
|
2020-06-15 00:51:23 -07:00
|
|
|
# SEE ALSO
|
|
|
|
|
2020-10-02 06:53:08 -07:00
|
|
|
*river*(1), *rivertile*(1)
|