Skip to content

Commit

Permalink
add workspace selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Mar 19, 2024
1 parent fb13513 commit bf44fdd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/Configuring/Window-Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fullscreen - 0/1
pinned - 0/1
focus - 0/1
workspace - id or name: and name
onworkspace (how many windows are on the workspace) - int
onworkspace - id, name: and name, or workspace selector (see Workspace Rules)
```

Keep in mind that you _have_ to declare at least one field, but not all.
Expand Down
17 changes: 16 additions & 1 deletion pages/Configuring/Workspace-Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ or gaps.
For layout-specific rules, see the specific layout page. For example:
[Master Layout->Workspace Rules](../Master-Layout#workspace-rules)

### Workspace selectors

Workspaces that have already been created can be targeted by workspace selectors,
e.g. `r[2-4] w[t1]`

Selectors have props separated by a space. No spaces are allowed inside props themselves.

Props:
- `r[A-B]` - ID range from A to B inclusive
- `s[bool]` - Whether the workspace is special or not
- `n[bool]`, `n[s:string]`, `n[e:string]` - named actions. `n[bool]` -> whether a workspace is a named workspace, `s` and `e` are starts and ends with respectively
- `m[monitor]` - Monitor selector
- `w[(flags)A-B]`, `w[(flags)X]` - Prop for window counts on the workspace. A-B is an inclusive range, X is a specific number. Flags can be omitted, or `t` for tiled-only, or `f` for floating-only.

### Syntax

```ini
Expand All @@ -20,7 +34,8 @@ workspace=WORKSPACE,RULES

- WORKSPACE is a valid workspace identifier (see
[Dispatchers->Workspaces](../Dispatchers#workspaces)). This field is
mandatory;
mandatory. This _can be_ a workspace selector, but please note
workspace selectors can only match _existing_ workspaces.
- RULES is one (or more) rule(s) as described here in [rules](#rules).

### Examples
Expand Down

0 comments on commit bf44fdd

Please sign in to comment.