aboutsummaryrefslogtreecommitdiff
path: root/wiki/Configuration:-Named-Workspaces.md
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-05-16 12:12:51 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-05-16 01:24:34 -0700
commit4e31f7e047500cb3454359fc05865a5adf156f00 (patch)
tree25e160c53a9e3bef9dc501923fc96cb6644b8ad6 /wiki/Configuration:-Named-Workspaces.md
parent109d99fe82205b144e68e4571140d32d28db2597 (diff)
downloadniri-4e31f7e047500cb3454359fc05865a5adf156f00.tar.gz
niri-4e31f7e047500cb3454359fc05865a5adf156f00.tar.bz2
niri-4e31f7e047500cb3454359fc05865a5adf156f00.zip
wiki: Document named workspaces
Diffstat (limited to 'wiki/Configuration:-Named-Workspaces.md')
-rw-r--r--wiki/Configuration:-Named-Workspaces.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/wiki/Configuration:-Named-Workspaces.md b/wiki/Configuration:-Named-Workspaces.md
new file mode 100644
index 00000000..e2938655
--- /dev/null
+++ b/wiki/Configuration:-Named-Workspaces.md
@@ -0,0 +1,36 @@
+### Overview
+
+You can declare named workspaces at the top level of the config:
+
+```
+workspace "browser"
+
+workspace "chat" {
+ open-on-output "DP-2"
+}
+```
+
+Contrary to normal dynamic workspaces, named workspaces always exist, even when they have no windows.
+Otherwise, they behave like any other workspace: you can move them around, move to a different monitor, and so on.
+
+Actions like `focus-workspace` or `move-column-to-workspace` can refer to workspaces by name.
+Also, you can use an `open-on-workspace` window rule to make a window open on a specific named workspace:
+
+```
+// Declare a workspace named "chat" that opens on the "DP-2" output.
+workspace "chat" {
+ open-on-output "DP-2"
+}
+
+// Open Telegram on the "chat" workspace at niri startup.
+window-rule {
+ match at-startup=true app-id=r#"^org\.telegram\.desktop$"#
+ open-on-workspace "chat"
+}
+```
+
+Named workspaces initially appear in the order they are declared in the config file.
+When editing the config while niri is running, newly declared named workspaces will appear at the very top of a monitor.
+
+If you delete some named workspace from the config, the workspace will become normal (unnamed), and if there are no windows on it, it will be removed (as any other normal workspace).
+There's no way to give a name to an already existing workspace, but you can simply move windows that you want to a new, empty named workspace.