From cce15300d61ca2c1b3f79ede6aa343001c7e548f Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 3 Aug 2026 22:42:37 +0800 Subject: [PATCH] feat(niri): reorganize workspaces --- home/linux/gui/niri/conf/keybindings.kdl | 6 ++--- home/linux/gui/niri/conf/windowrules.kdl | 27 ++++++++++++++-------- home/linux/gui/niri/reorder-workspaces.sh | 11 ++++----- hosts/12kingdoms-shoukei/niri-hardware.kdl | 4 +--- hosts/idols-ai/niri-hardware.kdl | 6 ++--- 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/home/linux/gui/niri/conf/keybindings.kdl b/home/linux/gui/niri/conf/keybindings.kdl index abafc43e..c94419fd 100644 --- a/home/linux/gui/niri/conf/keybindings.kdl +++ b/home/linux/gui/niri/conf/keybindings.kdl @@ -152,15 +152,13 @@ binds { Mod+2 { focus-workspace "2browser"; } Mod+3 { focus-workspace "3chat"; } Mod+4 { focus-workspace "4entertainment"; } - Mod+5 { focus-workspace "5mail"; } - Mod+6 { focus-workspace "6utility"; } + Mod+5 { focus-workspace "5utility"; } Mod+0 { focus-workspace "0other"; } Mod+Ctrl+1 { move-column-to-workspace "1terminal"; } Mod+Ctrl+2 { move-column-to-workspace "2browser"; } Mod+Ctrl+3 { move-column-to-workspace "3chat"; } Mod+Ctrl+4 { move-column-to-workspace "4entertainment"; } - Mod+Ctrl+5 { move-column-to-workspace "5mail"; } - Mod+Ctrl+6 { move-column-to-workspace "6utility"; } + Mod+Ctrl+5 { move-column-to-workspace "5utility"; } Mod+Ctrl+0 { move-column-to-workspace "0other"; } // Alternatively, there are commands to move just a single window: diff --git a/home/linux/gui/niri/conf/windowrules.kdl b/home/linux/gui/niri/conf/windowrules.kdl index db39c4df..53bba8cf 100644 --- a/home/linux/gui/niri/conf/windowrules.kdl +++ b/home/linux/gui/niri/conf/windowrules.kdl @@ -97,40 +97,50 @@ window-rule { open-on-workspace "4entertainment" } -// Utility applications - open in workspace 6 +// Utility applications - open in workspace 5 window-rule { match app-id="com.github.johnfactotum.Foliate" - open-on-workspace "6utility" + open-on-workspace "5utility" } window-rule { match app-id="thunar" - open-on-workspace "6utility" + open-on-workspace "5utility" } window-rule { match app-id="^Clash-verge$" match app-id="^[.]clash-verge-wrapped$" - open-on-workspace "6utility" + open-on-workspace "5utility" } window-rule { match app-id="^org[.]kde[.]easyeffects$" - open-on-workspace "6utility" + open-on-workspace "5utility" +} + +// Other applications - open in workspace 0 +window-rule { + match app-id="BambuStudio" + open-on-workspace "0other" +} +window-rule { + match app-id="OrcaSlicer" + open-on-workspace "0other" } window-rule { match app-id="Zoom Workplace" // Zoom Home Page match title="^(Zoom Workplace)( - Free account)?$" - open-on-workspace "6utility" + open-on-workspace "0other" } window-rule { match app-id="Zoom Workplace" // Zoom - other windows exclude title="^(Zoom Workplace)( - Free account)?$" - open-on-workspace "6utility" + open-on-workspace "0other" open-floating true } window-rule { match app-id="^Zoom$" - open-on-workspace "6utility" + open-on-workspace "0other" } window-rule { match app-id="^Zoom$" title="^as_toolbar$" @@ -150,4 +160,3 @@ window-rule { open-focused false default-floating-position x=0 y=0 relative-to="bottom-right" } - diff --git a/home/linux/gui/niri/reorder-workspaces.sh b/home/linux/gui/niri/reorder-workspaces.sh index 1acdcedf..8be373e1 100644 --- a/home/linux/gui/niri/reorder-workspaces.sh +++ b/home/linux/gui/niri/reorder-workspaces.sh @@ -7,10 +7,10 @@ case "$(hostname)" in workspace_order=( "4entertainment:1" "2browser:2" + "5utility:3" + "3chat:1" + "1terminal:2" "0other:3" - "1terminal:1" - "3chat:2" - "6utility:3" ) ;; shoukei) @@ -19,9 +19,8 @@ case "$(hostname)" in "2browser:2" "3chat:3" "4entertainment:4" - "5mail:5" - "6utility:6" - "0other:7" + "5utility:5" + "0other:6" ) ;; *) diff --git a/hosts/12kingdoms-shoukei/niri-hardware.kdl b/hosts/12kingdoms-shoukei/niri-hardware.kdl index 753922c1..409d8e2d 100644 --- a/hosts/12kingdoms-shoukei/niri-hardware.kdl +++ b/hosts/12kingdoms-shoukei/niri-hardware.kdl @@ -8,8 +8,6 @@ workspace "1terminal" { open-on-output "eDP-1"; } workspace "2browser" { open-on-output "eDP-1"; } workspace "3chat" { open-on-output "eDP-1"; } workspace "4entertainment" { open-on-output "eDP-1"; } -workspace "5mail" { open-on-output "eDP-1"; } -workspace "6utility" { open-on-output "eDP-1"; } +workspace "5utility" { open-on-output "eDP-1"; } workspace "0other" { open-on-output "eDP-1"; } debug { render-drm-device "/dev/dri/renderD128"; } - diff --git a/hosts/idols-ai/niri-hardware.kdl b/hosts/idols-ai/niri-hardware.kdl index 28d379ae..e5d4b019 100644 --- a/hosts/idols-ai/niri-hardware.kdl +++ b/hosts/idols-ai/niri-hardware.kdl @@ -40,8 +40,8 @@ output "HDMI-A-2" { // ============= Named Workspaces ============= workspace "4entertainment" { open-on-output "DP-1"; } workspace "2browser" { open-on-output "DP-1"; } -workspace "0other" { open-on-output "DP-1"; } +workspace "5utility" { open-on-output "DP-1"; } -workspace "1terminal" { open-on-output "HDMI-A-2"; } workspace "3chat" { open-on-output "HDMI-A-2"; } -workspace "6utility" { open-on-output "HDMI-A-2"; } +workspace "1terminal" { open-on-output "HDMI-A-2"; } +workspace "0other" { open-on-output "HDMI-A-2"; }