dots

Mika's dotfiles
git clone git://popovic.xyz/dots.git/
Log | Files | Refs | README

commit 4096102881f13d143161e2eb03d1376d67460f22
parent 0b2ecf0be2904fa67292d9324ca4d7917f1f6f73
Author: Milutin Popovic <milutin@popovic.xyz>
Date:   Sun,  5 Apr 2026 14:21:08 +0100

monitors

Diffstat:
M.local/bin/scripts/niri-monitors | 24++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/.local/bin/scripts/niri-monitors b/.local/bin/scripts/niri-monitors @@ -17,6 +17,10 @@ move_workspaces() { "$monitor" done +} + +sort_workspaces() { + direction=$1 for nw in $(seq 1 9); do niri msg action \ move-workspace-to-index \ @@ -27,11 +31,13 @@ move_workspaces() { mulmon_activate() { noctalia-shell kill && \ - niri msg output "$mon_l" on && \ - niri msg output "$mon_r" on && \ - move_workspaces "$mon_l" "l" && \ - move_workspaces "$mon_r" "r" && \ - niri msg output "$mon_n" off && \ + niri msg output "$mon_l" on + niri msg output "$mon_r" on + move_workspaces "$mon_l" "l" + move_workspaces "$mon_r" "r" + sort_workspaces "l" + sort_workspaces "r" + niri msg output "$mon_n" off noctalia-shell & MONITOR_OUT=1 export MONITOR_OUT @@ -39,9 +45,11 @@ mulmon_activate() { mulmon_deactivate() { noctalia-shell kill && \ - niri msg output "$mon_n" on && \ - move_workspaces "$mon_n" "r" && \ - move_workspaces "$mon_n" "l" && \ + niri msg output "$mon_n" on + move_workspaces "$mon_n" "r" + move_workspaces "$mon_n" "l" + sort_workspaces "r" + sort_workspaces "l" niri msg output "$mon_l" off niri msg output "$mon_r" off noctalia-shell &