Skip to content

App rules

Match windows and control their placement, size, focus, or management.

The App rules guide explains matching and which rule wins.

This example uses the default workspace name Development. Replace it if you renamed that workspace:

Example
[[virtual_workspaces.app_rules]]
app_id = "com.apple.Terminal"
workspace = "Development"
[[virtual_workspaces.app_rules]]
app_id = "com.apple.Calculator"
floating = true

One rule per [[virtual_workspaces.app_rules]] entry. Match fields are combined with AND; the most specific matching rule wins.

Application bundle ID, matched without regard to letter case. For example, com.apple.Terminal.

Type
text (optional)
Default
Not set

Destination workspace name or zero-based index. Omit it to use the active workspace. Use a name from workspace_names.

Type
workspace name or zero-based index (optional)
Default
Not set

Keep matching windows outside the tiled layout. A winning rule with this field omitted uses false; actions are not inherited from other rules.

Type
boolean
Default
false

Initial normalized position for a floating window. Both x and y are between 0.0 and 1.0; position is only valid when floating = true.

Type
table (optional)
Default
Not set
Example
[[virtual_workspaces.app_rules]]
app_id = "com.apple.Calculator"
floating = true
position = { x = 0.5, y = 0.5 }

Initial size in logical pixels. Set w, h, or both; this is applied once when the rule matches.

Type
table (optional)
Default
Not set
Example
[[virtual_workspaces.app_rules]]
app_id = "com.apple.Calculator"
floating = true
size = { w = 420.0, h = 680.0 }

Focus the window after applying this rule, switching virtual workspaces if needed.

Type
boolean
Default
false

Set false to exclude matching windows from Rift. Set true to override the normal manageability checks for visible windows. Omit it to keep the normal checks. With false, omit placement and focus actions because they are ignored.

Type
boolean (optional)
Default
Not set

Case-insensitive containment match against the app name. Rift matches when the rule contains the app name or the app name contains the rule. Prefer app_id for an exact application match.

Type
text (optional)
Default
Not set

Case-insensitive regular expression matched against the window title. Use title_substring when you do not need a pattern.

Type
text (optional)
Default
Not set

Case-insensitive text matched anywhere in the window title.

Type
text (optional)
Default
Not set

Exact macOS Accessibility role, such as AXWindow. Useful when an app creates several kinds of windows.

Type
text (optional)
Default
Not set

Exact macOS Accessibility subrole, such as AXDialog, to distinguish dialogs from normal windows.

Type
text (optional)
Default
Not set

Horizontal position: 0.0 is the left edge and 1.0 is the right edge.

Type
number
Requirement
Required

Vertical position: 0.0 is the top edge and 1.0 is the bottom edge.

Type
number
Requirement
Required

Initial width in logical pixels. Must be positive when provided.

Type
number (optional)
Default
Not set

Initial height in logical pixels. Must be positive when provided.

Type
number (optional)
Default
Not set