commit 253da659e61c816340357e02e20205fcc51bf0e0
parent 77e6504385113bb99ed92200909f6fb3e42bf210
Author: Milutin Popovic <milutin@popovic.xyz>
Date: Sat, 4 Apr 2026 16:37:39 +0100
resort workspaces on monitor connection
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/.local/bin/scripts/niri-monitors b/.local/bin/scripts/niri-monitors
@@ -16,6 +16,13 @@ move_workspaces() {
--reference "${direction}${nw}" \
"$monitor"
done
+
+ for nw in $(seq 1 9); do
+ niri msg action \
+ move-workspace-to-index \
+ --reference "${direction}${nw}" \
+ ${nw}
+ done
}
mulmon_activate() {
@@ -33,8 +40,8 @@ mulmon_activate() {
mulmon_deactivate() {
noctalia-shell kill && \
niri msg output "$mon_n" on && \
- move_workspaces "$mon_n" "l" && \
move_workspaces "$mon_n" "r" && \
+ move_workspaces "$mon_n" "l" && \
niri msg output "$mon_l" off
niri msg output "$mon_r" off
noctalia-shell &