RIVERCTL(1)
π RIVERCTL(1) β General Commands Manual π
Okay bestie, this is the General Commands Manual for riverctl, and we are keeping every single flag, every argument, every example, and every warning. No cap. π
πΈ NAME πΈ
riverctl β command-line interface for controlling river. It's literally the remote control for your compositor. π
β¨ SYNOPSIS β¨
riverctl [options] command [command specific arguments]
π¦ DESCRIPTION π¦
riverctl is a command-line utility used to control and configure river over the Wayland protocol. That's the whole vibe: you say stuff, river listens. π
π OPTIONS π
-hβ Print a help message and exit. Short, sweet, helpful.-versionβ Print the version number and exit. For when you need to know exactly which era of riverctl you're in.
π§ TERMINOLOGY π§
This manual uses terms that some may find confusing, coming mostly from their usage among other Wayland projects. Don't worry, we're decoding the group chat.
The compositor, display server, Wayland server etc. are ways to refer to river itself. Same energy, different labels.
A view (or toplevel) is what most call a window. Yes bestie, a window by any other name.
An output is a synonym for a screen or monitor. Your display, your stage, your main character rectangle.
Tags are river's way of dividing views of an output into groups (not necessarily disjunct), an analogy to workspaces. Think workspace vibes, but with more flexibility. π¦
π COMMANDS π
This is the command menu, and it is stacked. Let's go. π₯
π₯ ACTIONS π₯
closeβ Close the focused view. Bye bestie.exitβ Exit the compositor, terminating the Wayland session. This is the big red button, fr fr.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. Move your attention like it's a vibe check.focus-view [-skip-floating] next|previous|up|down|left|rightβ Focus the next or previous view in the stack or the closest view in any direction.-skip-floatingβ Skip floating views, only focusing tiled ones. Floaters can wait their turn.
move up|down|left|right deltaβ Move the focused view in the specified direction bydeltalogical pixels. The view will be set to floating. Nudge nudge.resize horizontal|vertical deltaβ Resize the focused view along the given axis bydeltalogical pixels. The view will be set to floating. Stretch era.snap up|down|left|rightβ Snap the focused view to the specified screen edge. The view will be set to floating. Magnetic energy.send-to-output [-current-tags] next|previous|up|right|down|left|nameβ Send the focused view to the next or previous output, the closest output in any direction or to an output by name.-current-tagsβ Assign the currently focused tags of the destination output to the view. Tag handoff, slay.
spawn shell_commandβ Runshell_commandusing/bin/sh -c shell_command. Note thatspawnonly takes a single argument. To spawn a command taking multiple arguments, wrapping the command in quotes is recommended. Quote it or regret it, bestie.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. Trade places, no cap.toggle-floatβ Toggle the floating state of the focused view. Float on, float off.toggle-fullscreenβ Toggle the fullscreen state of the focused view. Main character full-screen mode.zoomβ 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. Priorities, bestie.default-layout namespaceβ Set the layout namespace to be used by all outputs by default. Default setting, iconic.output-layout namespaceβ Set the layout namespace of currently focused output, overriding the value set withdefault-layoutif any. This output said "my layout, my rules."send-layout-cmd namespace commandβ Sendcommandto the layout generator on the currently focused output with the givennamespace, if any. What commands a layout generator understands depends on the layout generator. Forrivertile, see the documentation in therivertile(1)man page. Layout generator communication era.
π·οΈ TAG MANAGEMENT π·οΈ
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. It's giving binary baddie. π
When a view spawns it is assigned the currently focused tags of the output. New view, current tags, that's the rule.
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. Important caveat bestie β river just ignores those operations.
set-focused-tags tagsβ Show views with tags corresponding to the set bits oftagson the currently focused output. Focus set, slay.set-view-tags tagsβ Assign the currently focused view the tags corresponding to the set bits oftags. Tag assignment era.toggle-focused-tags tagsβ Toggle visibility of views with tags corresponding to the set bits oftagson the currently focused output. Toggle toggle.toggle-view-tags tagsβ Toggle the tags of the currently focused view corresponding to the set bits oftags. Flip the tag bits.spawn-tagmask tagmaskβ 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 tags000011111are focused and the spawn tagmask is111110001, a new view will be assigned the tags000010001. If no tags would remain after filtering, the tagmask is ignored. This is the filter, and yes the example is exact.focus-previous-tagsβ Sets tags to their previous value on the currently focused output, allowing jumping back and forth between 2 tag setups. Jump back, jump forth.send-to-previous-tagsβ Assign the currently focused view the previous tags of the currently focused output. Send it back to the previous tag setup.
π±οΈ MAPPINGS π±οΈ
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. Important: locked mode cannot be entered or exited manually, periodt.
The following modifiers are available for use in mappings:
ShiftControlMod1(Alt)Mod3Mod4(Super)Mod5None
Alt and Super are aliases for Mod1 and Mod4 respectively. None allows creating a mapping without modifiers. Aliases and no-modifier moves, iykyk.
Keys are specified by their XKB keysym name. See /usr/include/xkbcommon/xkbcommon-keysyms.h for the complete list. That path is exact, bestie.
Mouse buttons are specified by Linux input event code names. The most commonly used values are:
BTN_LEFT- left mouse buttonBTN_RIGHT- right mouse buttonBTN_MIDDLE- middle mouse button
A complete list may be found in /usr/include/linux/input-event-codes.h Keep that path exactly as-is.
declare-mode nameβ Create a new mode calledname. New mode just dropped.enter-mode nameβ Switch to given mode if it exists. Mode switch, but only if it exists.map [-release|-repeat|-layout index] mode modifiers key commandβ Runcommandwhenkeyis pressed whilemodifiersare held down and in the specifiedmode.-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. When the mapping is checked against a pressed key, this layout is used to translate the key independent of the active layoutindexβ zero-based index of a layout set with thekeyboard-layoutcommand. If the index is out of range, the-layoutoption will have no effect
modeβ name of the mode for which to create the mappingmodifiersβ one or more of the modifiers listed above, separated by a plus sign (+).keyβ an XKB keysym name as described abovecommandβ any command that may be run withriverctl
map-pointer mode modifiers button action|commandβ Move or resize views or runcommandwhenbuttonandmodifiersare held down while in the specifiedmode. The view under the cursor will be focused.modeβ name of the mode for which to create the mappingmodifiersβ one or more of the modifiers listed above, separated by a plus sign (+).buttonβ the name of a Linux input event code as described aboveactionβ one of the following values:move-viewresize-view
commandβ any command that may be run withriverctl
map-switch mode lid|tablet state commandβ Runcommandwhen river receives a certain switch event.modeβ name of the mode for which to create the mappinglid|tabletβ 'lid switch' and 'tablet mode switch' are supportedstate:- possible states for lid:
closeopen
- possible states for tablet:
onoff
- possible states for lid:
commandβ any command that may be run withriverctl
unmap [-release] mode modifiers keyβ Remove the mapping defined by the arguments:-releaseβ if passed unmap the key release instead of the key pressmodeβ name of the mode for which to remove the mappingmodifiersβ 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 mappingmodifiersβ one or more of the modifiers listed above, separated by a plus sign (+).buttonβ the name of a Linux input event code as described above
unmap-switch mode lid|tablet stateβ Remove the switch mapping defined by the arguments:modeβ name of the mode for which to remove the mappinglid|tabletβ the switch for which to remove the mappingstateβ a state as listed above
πͺ RULES πͺ
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. Glob matching, but make it fashion.
For example, abc is matched by a*, *a*, *b, *c, abc, and * but not matched by *a, b*, *b, c*, or ab. Note that * matches everything while ** and the empty string are invalid. Exact examples, exact invalids β no guessing.
rule-add [-app-id glob|-title glob] action [arguments]β Add a rule that applies an action to views withapp-idandtitlematched by the respective glob. Omitting-app-idor-titleis equivalent to passing-app-id *or-title *. Some actions require one or more arguments. Rule added, main character behavior installed.
The supported action types are:
floatβ makes the view float. Only applies to new views, bestie β¨no-floatβ don't make the view float. Only applies 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.tagsβ sets the initial tags of the view. Needs the tags as an argument. Only applies to new views π·οΈoutputβ sets the initial output of the view. Needs the output as an argument. Only applies to new views. You can name the output by connector name (likeHDMI-A-1, orDP-2), or by identifier in the formMAKE MODEL SERIALβ for example, for an output with make:HP Inc., model:HP 22w, and serial:CNC93720WF, the identifier would be:HP Inc. HP 22w CNC93720WF. If the make, model, or serial is unknown, the word"Unknown"is used instead. πpositionβ sets the initial position of the view, clamping to the bounds of the output. Needs x and y coordinates of the view as arguments, both of which must be non-negative. Only applies to new views.dimensionsβ sets the initial dimensions of the view, clamping to the constraints of the view. Needs width and height of the view as arguments, both of which must be non-negative. Only applies to new views.fullscreenβ makes the view fullscreen. Only applies to new views πno-fullscreenβ doesn't make the view fullscreen. Only applies to new views.tearingβ lets the view tear when fullscreen regardless of the view's preference. Applies to new and existing views.no-tearingβ disables tearing for the view regardless of the view's preference. Applies to new and existing views.
Okay so real talk: float and no-float rules both land in the same list, which means adding a no-float rule with the same arguments as a float rule will straight-up overwrite it π. Same energy for ssd and csd, fullscreen and no-fullscreen, tearing and no-tearing rules.
If multiple rules in a list match a given view, the most specific rule wins. Like, watch:
app-id title action
foo bar ssd
foo * csd
* bar csd
* baz ssd
A view with app-id 'foo' and title 'bar' would get ssd despite matching two csd rules, because the first rule is most specific π₯. And a view with app-id 'foo' and title 'baz' would get csd despite matching the last rule in the list β because app-id specificity takes priority over title specificity. iykyk π
If a view isn't 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 πͺβ¨
Heads up bestie: if a view is started fullscreen or is not floating, thenpositionanddimensionsrules will have no effect. A view must be matched by afloatrule in order for them to take effect. No cap.
rule-del [-app-id glob|-title glob] actionβ deletes a rule that was created usingrule-addwith the given arguments. Gone. Poof. Blocked. π«list-rules float|ssd|tags|position|dimensions|fullscreenβ prints out the specified rule list π. The output is ordered from most specific to least specific β literally 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.
πΈ CONFIGURATION πΈ
default-attach-mode top|bottom|above|below|after <N>β sets the attach mode that all outputs use by default.
Possible values, bestie:
topβ prepends the newly spawned view at the top of the stack.bottomβ appends the newly spawned view at the bottom of the stack.aboveβ inserts the newly spawned view above the currently focused view.belowβ inserts the newly spawned view below the currently focused view.after <N>β inserts the newly spawned view after N views in the stack.
Ngl, the deprecatedattach-modecommand is aliased todefault-attach-modefor backwards compatibility. Old news but it still slays π«Ά
output-attach-mode top|bottom|above|below|after <N>β sets the attach mode of the currently focused output, overriding the value ofdefault-attach-modeif there is one.allow-tearing enabled|disabledβ allows fullscreen views to tear if the view requests it. See also thetearingrule to force-enable tearing for specific views.background-color 0xRRGGBB|0xRRGGBBAAβ sets the background color π¨border-color-focused 0xRRGGBB|0xRRGGBBAAβ sets the border color of focused views.border-color-unfocused 0xRRGGBB|0xRRGGBBAAβ sets the border color of unfocused views.border-color-urgent 0xRRGGBB|0xRRGGBBAAβ sets the border color of urgent views π¨border-width pixelsβ sets the border width to pixels.focus-follows-cursor disabled|normal|alwaysβ there are three available modes:disabledβ moving the cursor does not affect focus. This is the default.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.alwaysβ moving the cursor will always focus whatever view is under the cursor.
If the view to be focused is on an output that doesn't have focus, focus is switched to that output. Cursor main character energy, fr fr π±οΈπ
hide-cursor timeout timeoutβ hides the cursor if it wasn't moved in the last timeout milliseconds, until it's moved again. The default value is0, which disables automatically hiding the cursor. The cursor shows up again on any movement β¨hide-cursor when-typing enabled|disabledβ hides the cursor when pressing any non-modifier key. Shows it again on any movement.set-cursor-warp disabled|on-output-change|on-focus-changeβ sets the cursor warp mode. The page says there are two available modes and then lists three β we love a little plot twist π anyway:disabledβ the 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.on-focus-changeβ when a different view/output is focused, the cursor will be warped to its center.
set-repeat rate delayβ sets the keyboard repeat rate to rate key repeats per second and the repeat delay to delay milliseconds. The default is a rate of25repeats per second and a delay of600ms. Typing go brrr β¨οΈπ₯xcursor-theme theme_name [size]β sets the xcursor theme to theme_name and optionally sets the size. The theme of the default seat determines the default for Xwayland and is made available through theXCURSOR_THEMEandXCURSOR_SIZEenvironment variables π
π INPUT CONFIGURATION π
list-inputsβ lists all input devices.list-input-configsβ lists all input configurations.keyboard-layout [-rules rules] [-model model] [-variant variant] [-options options] layoutβ sets the XKB layout for all keyboards. Defaults from libxkbcommon are used for everything left unspecified. Note that layout may be a comma separated list 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"). Seexkeyboard-config(7)for possible values and more info π§keyboard-layout-file pathβ sets 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
So the input command is what you use to create a configuration rule for an input device identified by its name. The name of an input device consists of its type, its decimal vendor id, its decimal product id and finally its self-advertised name, separated by -. Simple globbing patterns are supported β see the rules section for more on globs π¦
A list of all the device properties you can configure is below π but bestie, note that not every input device supports every property.
input name events enabled|disabled|disabled-on-external-mouseβ configures whether the input device's events will be used by river.input name accel-profile none|flat|adaptiveβ sets the pointer acceleration profile of the input device.input name pointer-accel factorβ sets the pointer acceleration factor of the input device. Needs a float between-1.0and1.0.input name click-method none|button-areas|clickfingerβ sets the click method of the input device.input name drag enabled|disabledβ enables or disables the tap-and-drag functionality of the input device.input name drag-lock enabled|disabledβ enables or disables the drag lock functionality of the input device πinput name disable-while-typing enabled|disabledβ enables or disables the disable-while-typing functionality of the input device.input name disable-while-trackpointing enabled|disabledβ enables or disables the disable-while-trackpointing functionality of the input device.input name middle-emulation enabled|disabledβ enables or disables the middle click emulation functionality of the input device.input name natural-scroll enabled|disabledβ enables or disables the natural scroll functionality of the input device. If active, the scroll direction is inverted πinput name scroll-factor factorβ sets the scroll factor of the input device. Accepts a postive value greater than0. For example, a factor of0.5will make scrolling twice as slow while a factor of3will make scrolling 3 times as fast.input name left-handed enabled|disabledβ enables or disables the left handed mode of the input device.input name tap enabled|disabledβ enables or disables the tap functionality of the input device πinput name tap-button-map left-right-middle|left-middle-rightβ configures 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β sets the scroll method of the input device.noneβ no scrolling, zero, nada, the pointer just vibes πΈtwo-fingerβ scroll by swiping with two fingers at the same time β¨ (yes, both. together. slay)edgeβ scroll by swiping along the edge, very demure, very mindful πbuttonβ scroll with pointer movement while you hold a button down π±οΈ
inputnamescroll-buttonbutton β sets the scroll button of an input device. button is the name of a Linux input event code, so type it exactly, bestie, no improvising πinputnamescroll-button-lockenabled|disabledβ turns the scroll button lock functionality of the input device on or off. When it's active, you don't have to keep the button held down β like, one press and the button is considered held down, and a second press releases it. Two taps and you're free, it's giving toggle πinputnamemap-to-outputoutput|disabledβ maps the input to a given output. And the cute part? This is valid even if the output isn't currently active β it'll just lead to the device being mapped once it's connected. Future-proofing, we love to see it π₯
π EXAMPLES π
Bind Super+Return in normal mode to spawn a foot(1) terminal β the classic, the icon, the main character move:
riverctl map normal Mod4 Return spawn 'foot --app-id=foobar'
Bind Super+Shift+J to swap the focused view with the next visible view:
riverctl map normal Mod4+Shift J swap next
π AUTHORS π
Maintained by Isaac Freund <mail@isaacfreund.com> who is assisted by open source contributors π«Ά. For more information about river's development, see <https://isaacfreund.com/software/river>.
π¦ SEE ALSO π¦
k that's the whole page, bestie β go forth and configure π This one's from the 2026-09-11 edition of RIVERCTL(1), and no cap, you just read all of it. Periodt. π
β¨
π¦ where this page comes from
- arch rolling: river-classic 0.3.17-2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms