pinwheel: Assign default workspaces to monitor(s)

This commit is contained in:
Alexander Heldt
2026-03-19 10:54:32 +01:00
parent dee1aa02e6
commit 9e61c6cad3
5 changed files with 46 additions and 5 deletions

View File

@@ -29,19 +29,16 @@ let
local external batch=""
if external=$(get_active_external); then
# External monitor connected: 1-5 on external, 6-10 on internal
# External monitor connected: move workspaces 1-5 to external, 6-10 to internal
for ws in 1 2 3 4 5; do
batch="$batch keyword workspace $ws,monitor:$external,default:true;"
batch="$batch dispatch moveworkspacetomonitor $ws $external;"
done
for ws in 6 7 8 9 10; do
batch="$batch keyword workspace $ws,monitor:$INTERNAL,default:true;"
batch="$batch dispatch moveworkspacetomonitor $ws $INTERNAL;"
done
else
# No external monitor: all workspaces on internal
# No external monitor: move all workspaces to internal
for ws in 1 2 3 4 5 6 7 8 9 10; do
batch="$batch keyword workspace $ws,monitor:$INTERNAL,default:true;"
batch="$batch dispatch moveworkspacetomonitor $ws $INTERNAL;"
done
fi
@@ -103,6 +100,25 @@ in
monitor=HDMI-A-1, 2560x1440@100, auto-center-up, 1
monitor=DP-3, 2560x1440@60, auto-center-up, 1
# Workspaces 1-5 on external monitors (HDMI-A-1 or DP-3)
workspace = 1, monitor:HDMI-A-1, default:true
workspace = 2, monitor:HDMI-A-1
workspace = 3, monitor:HDMI-A-1
workspace = 4, monitor:HDMI-A-1
workspace = 5, monitor:HDMI-A-1
workspace = 1, monitor:DP-3, default:true
workspace = 2, monitor:DP-3
workspace = 3, monitor:DP-3
workspace = 4, monitor:DP-3
workspace = 5, monitor:DP-3
# Workspaces 6-10 on internal monitor
workspace = 6, monitor:eDP-1, default:true
workspace = 7, monitor:eDP-1
workspace = 8, monitor:eDP-1
workspace = 9, monitor:eDP-1
workspace = 10, monitor:eDP-1
workspace = w[tv1], gapsout:0, gapsin:0
workspace = f[1], gapsout:0, gapsin:0
windowrule = border_size 0, match:float 0, match:workspace w[tv1]