Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions content/Configuring/Workspace-Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ workspace = WORKSPACE, RULES

```ini
workspace = name:myworkspace, gapsin:0, gapsout:0
workspace = 3, rounding:false, bordersize:0
workspace = 3, rounding:false, border_size:0
workspace = w[tg1-4], shadow:false
```

Expand All @@ -62,10 +62,10 @@ To replicate "smart gaps" / "no gaps when only" from other WMs/Compositors, use
```ini
workspace = w[tv1], gapsout:0, gapsin:0
workspace = f[1], gapsout:0, gapsin:0
windowrule = match:float false, match:workspace w[tv1], border_size 0
windowrule = match:float false, match:workspace w[tv1], rounding 0
windowrule = match:float false, match:workspace f[1], border_size 0
windowrule = match:float false, match:workspace f[1], rounding 0
windowrule = border_size 0, match:float 0, match:workspace w[tv1]
windowrule = rounding 0, match:float 0, match:workspace w[tv1]
windowrule = border_size 0, match:float 0, match:workspace f[1]
windowrule = rounding 0, match:float 0, match:workspace f[1]
```

#### Smart gaps (ignoring special workspaces)
Expand All @@ -75,35 +75,35 @@ You can combine workspace selectors for more fine-grained control, for example,
```ini
workspace = w[tv1]s[false], gapsout:0, gapsin:0
workspace = f[1]s[false], gapsout:0, gapsin:0
windowrule = match:float false, match:workspace w[tv1]s[false], border_size 0
windowrule = match:float false, match:workspace w[tv1]s[false], rounding 0
windowrule = match:float false, match:workspace f[1]s[false], border_size 0
windowrule = match:float false, match:workspace f[1]s[false], rounding 0
windowrule = border_size 0, match:float 0, match:workspace w[tv1]s[false]
windowrule = rounding 0, match:float 0, match:workspace w[tv1]s[false]
windowrule = border_size 0, match:float 0, match:workspace f[1]s[false]
windowrule = rounding 0, match:float 0, match:workspace f[1]s[false]
```

## Rules

| Rule | Description | type |
| --- | --- | --- |
| monitor:[m] | Binds a workspace to a monitor. See [syntax](#syntax) and [Monitors](../Monitors). | string |
| default:[b] | Whether this workspace should be the default workspace for the given monitor | bool |
| gapsin:[x] | Set the gaps between windows (equivalent to [General->gaps_in](../Variables#general)) | int |
| gapsout:[x] | Set the gaps between windows and monitor edges (equivalent to [General->gaps_out](../Variables#general)) | int |
| bordersize:[x] | Set the border size around windows (equivalent to [General->border_size](../Variables#general)) | int |
| border:[b] | Whether to draw borders or not | bool |
| shadow:[b] | Whether to draw shadows or not | bool |
| rounding:[b] | Whether to draw rounded windows or not | bool |
| decorate:[b] | Whether to draw window decorations or not | bool |
| persistent:[b] | Keep this workspace alive even if empty and inactive | bool |
| Rule | Description | type |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
| monitor:[m] | Binds a workspace to a monitor. See [syntax](#syntax) and [Monitors](../Monitors). | string |
| default:[b] | Whether this workspace should be the default workspace for the given monitor | bool |
| gapsin:[x] | Set the gaps between windows (equivalent to [General->gaps_in](../Variables#general)) | int |
| gapsout:[x] | Set the gaps between windows and monitor edges (equivalent to [General->gaps_out](../Variables#general)) | int |
| border_size:[x] | Set the border size around windows (equivalent to [General->border_size](../Variables#general)) | int |
| border:[b] | Whether to draw borders or not | bool |
| shadow:[b] | Whether to draw shadows or not | bool |
| rounding:[b] | Whether to draw rounded windows or not | bool |
| decorate:[b] | Whether to draw window decorations or not | bool |
| persistent:[b] | Keep this workspace alive even if empty and inactive | bool |
| on-created-empty:[c] | A command to be executed once a workspace is created empty (i.e. not created by moving a window to it). See the [command syntax](../Dispatchers#executing-with-rules) | string |
| defaultName:[s] | A default name for the workspace. | string |
| defaultName:[s] | A default name for the workspace. | string |

### Example Rules

```ini
workspace = 3, rounding:false, decorate:false
workspace = name:coding, rounding:false, decorate:false, gapsin:0, gapsout:0, border:false, monitor:DP-1
workspace = 8,bordersize:8
workspace = 8,border_size:8
workspace = name:Hello, monitor:DP-1, default:true
workspace = name:gaming, monitor:desc:Chimei Innolux Corporation 0x150C, default:true
workspace = 5, on-created-empty:[float] firefox
Expand Down