From bf44fdd750b8ca38a21c9ce58ccc8cfcca40d8df Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 19 Mar 2024 21:04:09 +0000 Subject: [PATCH] add workspace selectors --- pages/Configuring/Window-Rules.md | 2 +- pages/Configuring/Workspace-Rules.md | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pages/Configuring/Window-Rules.md b/pages/Configuring/Window-Rules.md index c150b07..c947448 100644 --- a/pages/Configuring/Window-Rules.md +++ b/pages/Configuring/Window-Rules.md @@ -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. diff --git a/pages/Configuring/Workspace-Rules.md b/pages/Configuring/Workspace-Rules.md index 9319ac8..f995019 100644 --- a/pages/Configuring/Workspace-Rules.md +++ b/pages/Configuring/Workspace-Rules.md @@ -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 @@ -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