From 2cfac6c3afecb403824e147fb5060113a838ced6 Mon Sep 17 00:00:00 2001 From: levnikmyskin Date: Mon, 1 May 2023 23:28:16 +0200 Subject: [PATCH] Added documentation for workspace rules (#208) * added documentation for workspace rules * added ref from Monitors.md + fixed reflinks * fixed workspace-rules table --------- Co-authored-by: Alessio Molinari --- pages/Configuring/Monitors.md | 6 ++-- pages/Configuring/Workspace-Rules.md | 41 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 pages/Configuring/Workspace-Rules.md diff --git a/pages/Configuring/Monitors.md b/pages/Configuring/Monitors.md index f6de884..a1309d8 100644 --- a/pages/Configuring/Monitors.md +++ b/pages/Configuring/Monitors.md @@ -177,7 +177,8 @@ workspace = DP-2, name:work ``` Please remember only one default workspace can be created per monitor, subsequent sets for -the same monitor will overwrite the previous. +the same monitor will overwrite the previous. +Notice, you can also use this keyword to set workspace-specific rules. See [Workspace Rules](../Workspace-Rules). ## Binding workspaces to a monitor A workspace can be bound to a monitor, meaning by default it will ALWAYS open @@ -190,4 +191,5 @@ for example: ``` wsbind=5,DP-1 wsbind=name:secret,DP-2 -``` \ No newline at end of file +``` + diff --git a/pages/Configuring/Workspace-Rules.md b/pages/Configuring/Workspace-Rules.md new file mode 100644 index 0000000..da0dc2b --- /dev/null +++ b/pages/Configuring/Workspace-Rules.md @@ -0,0 +1,41 @@ +# 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. + + +## Syntax +```ini +workspace=MONITOR,WORKSPACE,RULES +``` + +- MONITOR is a valid monitor identifier (see [Monitors](../Monitors)). You can use this rule to set the default workspace for the given monitor (see [Monitors->Default Workspace](../Monitors#default-workspace)). This field is optional and can be omitted entirely; +- 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 +workspace=DP-1,3,rounding:false,bordersize:0 +``` + +## Rules +| Rule | Description | type| +| ---- | ----------- | ----| +| 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 | +| rounding:[b] |Whether to draw rounded windows or not | bool | +| decorate:[b] | Whether to draw window decorations or not | bool | +| monitor:[m] | Monitor identifier. This is equivalent to the first MONITOR argument. See [syntax](#syntax) and [Monitors](../Monitors).| string | + +### Example Rules +```ini +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=DP-1, 2 +workspace=8,bordersize:8 +``` \ No newline at end of file