Something went wrong. Try again.
NixOS / Nix-darwin / Home Manager dotfiles for my devices
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372[settings]# No animationsanimate = false
# Start enableddefault_disable = false
focus_follows_mouse = falsemouse_follows_focus = truemouse_hides_on_focus = true
# Prevent certain apps from stealing focus/causing workspace switches# Provide bundle identifiers (e.g., "com.apple.Spotlight")# Examples:# "com.apple.dock", "com.apple.systemuiserver", "com.apple.SecurityAgent",# "com.raycast.macos", "com.apple.Spotlight"auto_focus_blacklist = []
# Run commands on start## Tip: You can subscribe to rift events and trigger your own scripts. The command will# receive environment variables with context:# RIFT_EVENT_TYPE # "workspace_changed" | "windows_changed" | "window_title_changed"# RIFT_WORKSPACE_ID # workspace id# RIFT_WORKSPACE_NAME # workspace name# RIFT_WORKSPACE_INDEX # workspace index (window_title_changed only)# RIFT_WINDOW_COUNT # number of windows (windows_changed only)# RIFT_WINDOWS # comma-separated window ids (windows_changed only)# RIFT_WINDOW_ID # window id (window_title_changed only)# RIFT_PREVIOUS_WINDOW_TITLE # previous title (window_title_changed only)# RIFT_WINDOW_TITLE # new title (window_title_changed only)# RIFT_EVENT_JSON # full JSON payload of the event## Example (sketchybar integration):# run_on_start = [# "rift-cli subscribe cli --event workspace_changed --command sh --args -c --args 'sketchybar --trigger rift_workspace_changed RIFT_WORKSPACE_NAME=\"$RIFT_WORKSPACE_NAME\" RIFT_WORKSPACE_ID=\"$RIFT_WORKSPACE_ID\"'",# "rift-cli subscribe cli --event windows_changed --command sh --args -c --args 'sketchybar --trigger rift_windows_changed RIFT_WORKSPACE_NAME=\"$RIFT_WORKSPACE_NAME\" RIFT_WINDOW_COUNT=\"$RIFT_WINDOW_COUNT\"'"# ]run_on_start = [ "sh -lc sketchybar", "sh -lc borders"]
hot_reload = true
[settings.layout]mode = "scrolling"
# these settings only apply when layout mode == "scrolling"[settings.layout.scrolling]min_column_width_ratio = 0.3column_width_ratio = 0.75max_column_width_ratio = 0.95
alignment = "center"focus_navigation_style = "anchored"
[settings.layout.scrolling.gestures]# Enable horizontal scroll gestures to switch columnsenabled = true# Invert horizontal direction (swap left/right)invert_horizontal = true# Number of fingers required for gesturefingers = 3# If true, scrolling past the end of the strip will trigger a workspace switchpropagate_to_workspace_swipe = false
[settings.layout.gaps]
[settings.layout.gaps.outer]top = 64left = 16bottom = 16right = 16
[settings.layout.gaps.inner]horizontal = 16vertical = 16
[settings.ui.menu_bar]# enable menu bar workspace indicatorsenabled = true# if enabled, it will show all workspaces including empty ones. disabled because this# tends to take up too much room in the menubar and then is auto hidden by macosshow_empty = true# choose between drawing every workspace or only the active workspacemode = "all"# when showing workspaces as labels ("index" or "name"), choose which label to renderactive_label = "index"# when displaying workspaces, choose whether to draw the layout preview or a set of labels# options are "layout" or "label"display_style = "layout"
[settings.ui.stack_line]# experimental stack line indicator (defaults to off)enabled = true# in a horizontal stack where the line will be (top/bottom)horiz_placement = "top"# in a vertical stack where the line will be (left/right)vert_placement = "left"# how thick the indicator will be (in px)thickness = 20.0# spacing between the stack line and window edges (in px)spacing = 1.0
# experimental mission control[settings.ui.mission_control]enabled = true# enable fade animation when entering/exiting mission controlfade_enabled = false# native macos mission control fade is about 180msfade_duration_ms = 180.0
# Trackpad gestures[settings.gestures]# Enable horizontal swipes to switch virtual workspacesenabled = true# Invert horizontal direction (swap next/prev)invert_horizontal_swipe = false# Maximum vertical travel allowed for the horizontal swipe to register.# Accepts normalized fraction (0..1) or percent (0..100). Example: 0.4 or 40.0swipe_vertical_tolerance = 0.4# Skip empty workspaces when swipingskip_empty = true# Number of fingers required for swipefingers = 3# Normalized horizontal distance (0..1) to trigger swipe for NSTouch-based detectiondistance_pct = 0.05# Haptic feedback on commit (generic | alignment | level_change)haptics_enabled = truehaptic_pattern = "level_change"
# Window snapping / drag-swap behavior[settings.window_snapping]# Fraction threshold (0.0..1.0) specifying how much of the dragged window# area must be overlapped by a candidate window in order to trigger a# swap while dragging. Typical values are around 0.2–0.4.# If you prefer more aggressive swapping, lower the value; increase it# to require greater overlap before a swap occurs.drag_swap_fraction = 0.3
[virtual_workspaces]# Virtual workspaces# - enabled: if false, rift behaves like a simple tiling WM with a single space# - default_workspace_count: number of workspaces to create on startup (1–32)# - auto_assign_windows: when true, new windows can be auto-assigned using app_rules# - preserve_focus_per_workspace: remember last focused window per workspace# - workspace_auto_back_and_forth: when enabled, if you try to switch to the same workspace# that's already active, it will switch to the last workspace instead# - reapply_app_rules_on_title_change: if true, app rules are re-evaluated when a window's title changesenabled = truedefault_workspace_count = 9auto_assign_windows = truepreserve_focus_per_workspace = trueworkspace_auto_back_and_forth = falsereapply_app_rules_on_title_change = false
# Workspace-specific rules# - workspace: target workspace by index (integer) or name (string)# - layout: layout mode to use ("traditional", "bsp", "stack", "master_stack", "scrolling")# workspace_rules = [# { workspace = 1, layout = "bsp" },# { workspace = "second", layout = "scrolling" }# ]workspace_rules = []
# Default workspace to activate on startup (0-based index).# If omitted, defaults to 0 (first workspace). Must be less than default_workspace_count.# Uncomment to change:default_workspace = 1
# Workspace names (indexed order). If fewer than default_workspace_count are provided,# remaining workspaces are named "Workspace X".# Do not provide more names than default_workspace_count.workspace_names = [ "first", "second"]
# App rules (automatic assignment)# Define rules that match new windows and set properties (workspace, floating, etc).## Matchable fields:# - app_id : application bundle identifier (exact)# - app_name : substring match against application name# - title_regex : regular expression matched against the window title# - title_substring: literal substring (case-sensitive) matched against the title# - ax_role / ax_subrole: exact match against macOS Accessibility (AX) role/subrole## Rule options:# - workspace (integer, 0-based): target workspace index. If omitted or invalid, uses the active workspace.# Alternatively, `workspace` may be a workspace name string to target by name.# - floating (boolean): whether matched windows should float by default.# - manage (boolean): whether Rift should manage the matching window. Set to false to ignore the window completely (default = true).## Matching behavior (summary):# 1. All rules that match a window are evaluated.# 2. If multiple matching rules share the same non-empty `app_id`, the rule# with the most specified conditions (the most non-empty fields) wins.# If there's a tie, the earlier rule in the file wins.# 3. If matching rules do NOT share the same `app_id`, the rule with the# highest specificity (most non-empty fields) is selected; ties are broken by order.# 4. Within a single rule, all specified fields are combined conjunctively:# the rule matches only if every non-empty field matches the window.## Tips:# - To make exceptions for a specific app, place a more specific rule before# a general `app_id` rule. Example:# app_rules = [# { app_id = "com.example.X", title_regex = "Dialog", floating = true },# { app_id = "com.example.X", floating = false },# ]## - Use `title_substring` for simple, literal (case-sensitive) substring matches.# Use `title_regex` for advanced patterns.## Accessibility (AX) matching:# - `ax_role` and `ax_subrole` match the exact AX values reported by macOS# (e.g., "AXWindow", "AXDialog", "AXSystemDialog", "AXToolbar").# - Useful for distinguishing dialogs, sheets, toolbars, etc., when bundle/name/title aren't enough.## Validation:# - `title_regex` must be a valid regular expression. Invalid regexes cause the rule# to be ignored and a warning to be logged.## Examples:# - Float any window with "Preferences" in the title:# app_rules = [# { title_substring = "Preferences", floating = true },# ]## - Match by app name substring and workspace:# app_rules = [# { app_name = "Calendar", workspace = 2, floating = true },# ]## - Accessibility example: float dialog windows for a specific app:# app_rules = [# { app_id = "com.example.X", ax_subrole = "AXDialog", floating = true },# ]## By default there are no app rules; add or uncomment rules below as needed.app_rules = [ { app_id = "org.nixos.firefox", workspace = 0 }, { app_id = "xyz.radicle.desktop", workspace = 6 }, { app_id = "org.prismlauncher.PrismLauncher", workspace = 7 }, { app_id = "dev.vencord.vesktop", workspace = 8 }]
# Modifier combinations that can be reused in key bindings# Define common modifier combinations to avoid repetition.# Example usage: with `comb1 = "Alt + Shift"`, you can write:# "comb1 + H" = { move_node = "left" }[modifier_combinations]comb0 = "Ctrl + Alt + Meta"comb1 = "Ctrl + Alt + Meta + Shift"
[keys]# Key binding syntax# - Use quotes around the key: "Alt + Shift + H"# - Supported modifiers: Alt, Ctrl, Shift, Meta (Meta = Command ⌘ on macOS)# - Arrow keys can be written as ArrowUp/ArrowDown/ArrowLeft/ArrowRight, or just Up/Down/Left/Right# - Spacing is flexible: "Alt+Down" and "Alt + Down" are equivalent# - Key values map to commands (see list below)
# Commands# - toggle_space_activated# - next_workspace / prev_workspace# - next_workspace = true|false (optional skip-empty override)# - prev_workspace = true|false (optional skip-empty override)# - switch_to_workspace = N# - move_window_to_workspace = N / move_window_to_workspace = { workspace = N, window_id = 123 } (optional window id)# - create_workspace# - switch_to_last_workspace# - set_workspace_layout = { mode = "traditional"|"bsp"|"stack"|"master_stack"|"scrolling" } (active workspace)# - set_workspace_layout = { workspace = N, mode = "traditional"|"bsp"|"stack"|"master_stack"|"scrolling" }# - next_window / prev_window (focus wraps when it reaches last window in current workspace)# - ascend / descend# - move_focus = "left"|"right"|"up"|"down"# - move_node = "left"|"right"|"up"|"down"# - join_window = "left"|"right"|"up"|"down"# - toggle_stack / toggle_orientation / unjoin_windows# - toggle_focus_floating / toggle_window_floating / toggle_fullscreen / toggle_fullscreen_within_gaps# - resize_window_grow / resize_window_shrink / resize_window_by = 0.05# - swap_windows = [123, 456]# - exec = "command" | exec = ["cmd", "arg1", "..."]# - move_mouse_to_display = "left"|"right"|"up"|"down"|N|"<display_uuid>"# - move_window_to_display = { selector = "left"|"right"|"up"|"down"|N|"<display_uuid>", window_id = 123 }# - close_window = { window_server_id = 123 }# - focus_window = { window_id = 123, window_server_id = 456 }# - show_mission_control_all / show_mission_control_current / dismiss_mission_control (this is rift's own mission control, not macOS's)
# the following commands *only* work when the master stack layout is active# - adjust_master_ratio = 0.05 / adjust_master_count = 1# - promote_to_master / swap_master_stack
# the following commands *only* work when the scrolling layout is active# - scroll_strip = { delta = 0.5 }# - snap_strip / center_selection
"comb0 + Z" = "toggle_space_activated"
"comb0 + H" = { move_focus = "left" }"comb0 + J" = { move_focus = "down" }"comb0 + K" = { move_focus = "up" }"comb0 + L" = { move_focus = "right" }
"comb1 + H" = { move_node = "left" }"comb1 + J" = { move_node = "down" }"comb1 + K" = { move_node = "up" }"comb1 + L" = { move_node = "right" }
"comb0 + 1" = { switch_to_workspace = 0 }"comb0 + 2" = { switch_to_workspace = 1 }"comb0 + 3" = { switch_to_workspace = 2 }"comb0 + 4" = { switch_to_workspace = 3 }"comb0 + 5" = { switch_to_workspace = 4 }"comb0 + 6" = { switch_to_workspace = 5 }"comb0 + 7" = { switch_to_workspace = 6 }"comb0 + 8" = { switch_to_workspace = 7 }"comb0 + 9" = { switch_to_workspace = 8 }
"comb1 + 1" = { move_window_to_workspace = 0 }"comb1 + 2" = { move_window_to_workspace = 1 }"comb1 + 3" = { move_window_to_workspace = 2 }"comb1 + 4" = { move_window_to_workspace = 3 }"comb1 + 5" = { move_window_to_workspace = 4 }"comb1 + 6" = { move_window_to_workspace = 5 }"comb1 + 7" = { move_window_to_workspace = 6 }"comb1 + 8" = { move_window_to_workspace = 7 }"comb1 + 9" = { move_window_to_workspace = 8 }
"comb0 + 0" = "switch_to_last_workspace"
# commands to change the layout engine of the active workspace# "Alt + Ctrl + 1" = { set_workspace_layout = { mode = "traditional" } }# "Alt + Ctrl + 2" = { set_workspace_layout = { mode = "bsp" } }# "Alt + Ctrl + 3" = { set_workspace_layout = { mode = "master_stack" } }# "Alt + Ctrl + 4" = { set_workspace_layout = { mode = "scrolling" } }
"comb1 + Left" = { join_window = "left" }"comb1 + Right" = { join_window = "right" }"comb1 + Up" = { join_window = "up" }"comb1 + Down" = { join_window = "down" }"comb0 + Comma" = "toggle_stack""comb0 + Slash" = "toggle_orientation""Alt + Ctrl + E" = "unjoin_windows"
"comb1 + Space" = "toggle_window_floating""comb0 + F" = "toggle_fullscreen""comb0 + M" = "toggle_fullscreen_within_gaps""Alt + Ctrl + Shift + Space" = "toggle_focus_floating" # briefly bring focus to floating window
# smartly resize windows"comb1 + Equal" = "resize_window_grow""comb1 + Minus" = "resize_window_shrink"
# if mission control is enabled# this will show an exploded view of the windows in the active workspace"Alt + Ctrl + Shift + M" = "show_mission_control_current"# this will show the mission control view shown in the readme"Alt + Ctrl + M" = "show_mission_control_all"
"comb0 + Enter" = { "exec" = ["/usr/bin/env", "sh", "-c", "open -a Ghostty"] }"comb0 + E" = { "exec" = [ "/usr/bin/env", "sh", "-lc", "emacsclient -c"] }
"comb1 + D" = "debug" # prints layout tree
"Alt + Ctrl + S" = "serialize""Alt + Ctrl + Q" = "save_and_exit"