-
-
Notifications
You must be signed in to change notification settings - Fork 33
Config
This document details the configuration of rift. Copy the example configuration from rift.default.toml into ~/.config/rift/config.toml (or $HOME/.config/rift/config.toml) and adjust to taste.
The default configuration is available here and that is a great example in addition to the reference below.
-
animate(boolean)- Master switch for window animations.
true/false.
- Master switch for window animations.
-
animation_duration(float)- Seconds per animation. Typical values:
0.15–0.35.0.0disables duration but keepanimate = falseto fully disable.
- Seconds per animation. Typical values:
-
animation_fps(float)- Frames per second for animations. Values > 0. Recommend 60–120.
Example:
[settings]
animate = true
animation_duration = 0.2
animation_fps = 100.0
-
default_disable(boolean)- Controls whether newly-created macOS spaces are managed by rift by default.
- If
true, spaces start out disabled and must be activated; iffalse, spaces are managed by default and you can disable specific ones.
-
mouse_follows_focus(boolean)- If
true, when focus changes rift will move the mouse pointer to the focused window.
- If
-
mouse_hides_on_focus(boolean)- If
true, hide the mouse pointer after focusing a window.
- If
-
focus_follows_mouse(boolean)- If
true, moving the mouse into a window focuses it.
- If
-
focus_follows_mouse_disable_hotkey(Hotkey/object)- Optional: a hotkey which, while held, temporarily disables
focus_follows_mouse. (Serialize as the same hotkey shape used in keybindings.)
- Optional: a hotkey which, while held, temporarily disables
-
auto_focus_blacklist(array of strings)- Application bundle IDs (e.g.
"com.apple.Spotlight") that should not trigger automatic workspace switching or steal focus behavior.
- Application bundle IDs (e.g.
-
run_on_start(array of strings)- Shell commands rift will run on startup. Useful for external integrations or launching helper scripts. When used with
rift-cli subscribe, rift can send event data via environment variables available to those commands.
- Shell commands rift will run on startup. Useful for external integrations or launching helper scripts. When used with
-
hot_reload(boolean)- When
true, rift will watch the configuration file and reload automatically when it changes.
- When
Layout system and layout-specific options.
-
mode(string)-
"traditional"(container-based like i3/sway) or"bsp"(binary space partitioning). Defaults to"traditional"if omitted.
-
-
stack_offset(float)- How much stacked windows stick out (px).
0.0means windows fully overlap. Typical 30–50 for visible stacked edges.
- How much stacked windows stick out (px).
-
default_orientation(string / enum)- Controls default stack orientation. Options:
-
"perpendicular"(default): choose orientation perpendicular to parent split -
"same": use the same orientation as the parent split -
"horizontal"/"vertical": force a specific orientation
-
- Controls default stack orientation. Options:
-
[settings.layout.gaps.outer]-
top,left,bottom,right(floats): gap between windows and screen edges.
-
-
[settings.layout.gaps.inner]-
horizontal,vertical(floats): gaps between tiled windows.
-
-
[settings.layout.gaps.per_display]- map keyed by display UUID. Each key may contain:
-
"<display-uuid>.outer"-
top,left,bottom,right(floats): override outer gaps for that display.
-
-
"<display-uuid>.inner"-
horizontal,vertical(floats): override inner gaps for that display.
-
-
- Notes: an override may specify only
outer, onlyinner, or both; any fields present replace the corresponding defaults for that display.
- map keyed by display UUID. Each key may contain:
Warning
the following ui features are experimental
-
enabled(boolean): show menu bar workspace indicators. -
show_empty(boolean): whentrue, include empty workspaces in the menu bar (can cause menubar overflow on macOS). -
mode(string / enum)- Controls which workspaces appear:
all(default) oractive.
- Controls which workspaces appear:
-
active_label(string / enum)- How to label the active workspace:
index(default) orname.
- How to label the active workspace:
-
display_style(string / enum)- How to render a workspace:
layout(default) orlabel.
- How to render a workspace:
-
enabled(boolean): enable experimental stack-line indicator. -
thickness(float): thickness in pixels when enabled. -
horiz_placement(string):"top"/"bottom"for horizontal stacks. -
vert_placement(string):"left"/"right"for vertical stacks. -
spacing(float): spacing in points between the window edge and the stack line.
-
enabled(boolean): enable mission-control related helpers. -
fade_enabled(boolean): whether mission-control fade helper is active. -
fade_duration_ms(float): fade duration in milliseconds.
Trackpad gesture configuration.
-
enabled(boolean): enable horizontal swipes to switch virtual workspaces. -
invert_horizontal_swipe(boolean): invert the direction of swipe actions. -
swipe_vertical_tolerance(float): maximum vertical delta allowed for a gesture to be considered horizontal. -
skip_empty(boolean): attempt to skip empty workspaces on swipe (if supported). -
fingers(integer): number of fingers required for swipe gestures. -
distance_pct(float): normalized horizontal distance (0..1) required to trigger a swipe. -
haptics_enabled(boolean): enable haptic feedback on swipe commit. -
haptic_pattern(string / enum): haptic pattern to use whenhaptics_enabledis true. Options:generic,alignment,level_change(default).
-
drag_swap_fraction(float)- Fraction threshold used when dragging a window over another to determine when they should swap positions in the layout.
Virtual workspace controls.
-
enabled(boolean)- If
false, rift acts like a tiler with a single space.
- If
-
default_workspace_count(integer)- Number of workspaces rift creates on startup (recommended 1–32).
-
auto_assign_windows(boolean)- When
true, new windows can be auto-assigned usingapp_rules.
- When
-
preserve_focus_per_workspace(boolean)- When
true, rift remembers the last-focused window per virtual workspace.
- When
-
workspace_auto_back_and_forth(boolean)- When
true, switching to the previously active workspace will return you to the last active workspace (back-and-forth behavior).
- When
-
workspace_names(array of strings)- Optional human-readable names for workspaces in indexed order. If fewer names than
default_workspace_countare provided, remaining names default to"Workspace X".
- Optional human-readable names for workspaces in indexed order. If fewer names than
-
default_workspace(integer)- Index of the workspace to use as the default active workspace on startup (0-based).
-
reapply_app_rules_on_title_change(boolean)- When
true, app rules are reapplied if a window title changes (useful withtitle_regex/title_substringrules).
- When
-
app_rules(array of objects)- Rules that match windows and optionally assign them to workspaces or mark them floating.
-
app_id(string, optional): application bundle identifier (e.g.,"com.apple.Safari"). -
app_name(string, optional): substring match on application name. -
title_regex(string, optional): regex applied to the window title. If present it must be a valid regex or the rule will be ignored with a warning. -
title_substring(string, optional): literal substring match (case-sensitive) on window title. -
ax_role(string, optional): exact match for the macOS Accessibility AXRole (e.g.,"AXWindow","AXDialog"). -
ax_subrole(string, optional): exact match for the macOS Accessibility AXSubrole (e.g.,"AXSystemDialog"). -
workspace(integer or string, optional): target workspace (0-based index) or workspace name. If omitted or invalid, defaults to the active workspace. -
floating(boolean, optional): whether new windows matched by the rule should float.
Matching semantics:
- All non-empty fields in a rule are combined with logical AND. A rule only matches if every specified field matches.
- Multiple rules may match a window:
- If multiple matching rules share the same non-empty
app_id, the rule with more specified conditions (more specific) wins. - Otherwise, the rule with the highest specificity (most fields set) is chosen; ties are broken by earlier config order.
- If multiple matching rules share the same non-empty
Examples:
- Float dialogs for a specific app but tile others:
app_rules = [
{ app_id = "com.example.X", title_regex = "Dialog", floating = true },
{ app_id = "com.example.X", floating = false },
]
- Float any "Preferences" window for any app:
app_rules = [
{ title_substring = "Preferences", floating = true },
]
Define reusable modifier combinations to avoid repetition in the keybindings table.
- Example:
[modifier_combinations]
comb1 = "Alt + Shift"
Then use comb1 in [keys] entries like "comb1 + H" = { move_node = "left" }.
Keybindings map strings (modifier + key) to commands or command objects.
- Syntax: use quotes around the key combination:
"Alt + Shift + H" = ... - Supported modifiers:
Alt,Ctrl,Shift,Meta(Meta is Command on macOS). - Available modifier tokens (generic or side-specific):
Alt/Option,AltLeft/OptionLeft,AltRight/OptionRight,Ctrl/Control,CtrlLeft/ControlLeft,CtrlRight/ControlRight,Shift,ShiftLeft,ShiftRight,Meta/Cmd/Command,MetaLeft/CmdLeft/CommandLeft,MetaRight/CmdRight/CommandRight. - Arrow keys can use
ArrowUp/Up, etc. Spacing is flexible.
The configuration parses key strings into the internal hotkey structure; modifier combinations defined in [modifier_combinations] will be expanded before parsing.
Example bindings:
"Alt + H" = { move_focus = "left" }
"Alt + Shift + Left" = { join_window = "left" }
"Alt + 1" = { switch_to_workspace = 1 }
"comb1 + S" = { switch_to_workspace = 2 }
Note about
comb1usage: definecomb1in[modifier_combinations]and reference it in[keys].
-
toggle_space_activated— Toggle whether the focused macOS space is activated (managed) by rift. -
next_workspace/prev_workspace— Switch to next / previous virtual workspace. -
switch_to_workspace— Switch to a specified workspace (argument: index). -
move_window_to_workspace— Move the focused window to a specified workspace. -
create_workspace— Create a new virtual workspace. -
switch_to_last_workspace— Switch to the last active workspace. -
next_window/prev_window— Focus the next/previous window in the current workspace (e.g."Alt + J" = { next_window = true },"Alt + K" = { prev_window = true }). -
ascend/descend— Move focus up/down the layout tree hierarchy (e.g."Alt + Shift + J" = { ascend = true },"Alt + Shift + K" = { descend = true }). -
move_focus— Move focus in a direction:"left","right","up","down". -
move_node— Move the focused node/window in a direction within the layout. -
join_window— Join the focused window into the branch in the given direction. -
toggle_stack— Toggle stacked state for the selected container (replaces olderstack_windows/unstack_windows). -
toggle_orientation— Toggle global split/stack orientation behavior. -
unjoin_windows— Unjoin previously joined windows (separate joined nodes). -
toggle_window_floating— Toggle the focused window between tiled and floating. -
toggle_focus_floating— Raises floating windows from the current workspace so they can be accessed. -
toggle_fullscreen— Toggle full-layout fullscreen for the current window (ignores outer gaps). -
toggle_fullscreen_within_gaps— Toggle fullscreen that respects configured outer gaps (fills tiling area but keeps outer gaps). -
resize_window_grow/resize_window_shrink— Smartly resize the current selection. -
resize_window_by— Resize the current selection by a specific amount (float) (e.g."Alt + \\" = { resize_window_by = { amount = 25.0 } }). -
debug— Print the active layout tree / debug information to the console. -
serialize— Dump rift's internal state to stdout (useful for bug reports and debugging). -
show_mission_control_all— Show all workspaces in mission control. -
show_mission_control_current— Show current workspace in mission control. -
exec— Execute an external command. Argument: a string or an array of strings. Example:"exec" = "alacritty"orexec = ["sh", "-c", "echo hello"]. -
move_mouse_to_display= N or UUID. Examples:"Alt + Shift + A" = { move_mouse_to_display = 0 }or"Alt + Shift + S" = { move_mouse_to_display = 1 } -
move_window_to_display— Move a window to a display by direction/index/UUID (optionally specifywindow_id) (e.g."Ctrl + Alt + D" = { move_window_to_display = { selector = "right" } }).