2023-05-01 23:28:16 +02:00
# Table of contents
{{< toc > }}
# Workspace Rules
You can set workspace rules to achieve workspace-specific behaviors. For instance, you can define a workspace where all windows are drawn without borders or gaps.
2023-12-02 15:43:13 +01:00
For layout-specific rules, see the specific layout page. For example: [Master Layout->Workspace Rules ](../Master-Layout#workspace-rules )
2023-05-01 23:28:16 +02:00
## Syntax
```ini
2023-05-05 16:42:26 +02:00
workspace=WORKSPACE,RULES
2023-05-01 23:28:16 +02:00
```
- WORKSPACE is a valid workspace identifier (see [Dispatchers->Workspaces ](../Dispatchers#workspaces )). This field is mandatory;
- RULES is one (or more) rule(s) as described here in [rules ](#rules ).
### Examples
```ini
workspace=name:myworkspace,gapsin:0,gapsout:0
2023-12-05 16:01:47 +01:00
workspace=3,rounding:false,bordersize:0
2023-05-01 23:28:16 +02:00
```
## Rules
2023-05-05 16:42:26 +02:00
| 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 |
2024-02-21 12:08:03 +01:00
| gapsin:[x] | Set the gaps between windows (equivalent to [General->gaps_in ](../Variables#general ) except for not using commas as delimiter (spaces instead)) | int |
| gapsout:[x] | Set the gaps between windows and monitor edges (equivalent to [General->gaps_out ](../Variables#general ) except for not using commas as delimiter (spaces instead)) | int |
2023-05-01 23:28:16 +02:00
| 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 |
2023-08-12 23:37:48 +02:00
| shadow:[b]| Whether to draw shadows or not| bool |
2023-05-05 16:42:26 +02:00
| rounding:[b] | Whether to draw rounded windows or not | bool |
2023-05-01 23:28:16 +02:00
| decorate:[b] | Whether to draw window decorations or not | bool |
2023-10-09 21:28:28 +02:00
| persistent:[b] | Keep this workspace alive even if empty and inactive | bool |
2023-10-23 00:10:47 +02:00
| 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
2023-05-01 23:28:16 +02:00
### Example Rules
```ini
2023-05-05 16:42:26 +02:00
workspace = 3, rounding:false, decorate:false
workspace = name:coding, rounding:false, decorate:false, gapsin:0, gapsout:0, border:false, decorate:false, monitor:DP-1
workspace = 8,bordersize:8
workspace = name:Hello, monitor:DP-1, default:true
2024-01-31 11:25:11 +01:00
workspace = name:gaming, monitor:desc:Chimei Innolux Corporation 0x150C, default:true
2023-10-23 00:10:47 +02:00
workspace = 5, on-created-empty:[float] firefox
workspace = special:scratchpad, on-created-empty:foot
2023-05-05 16:42:26 +02:00
```