I am considering switching to Hyprland from sway and have one question about the workspace management on a multi-monitor setup.
I have three monitors and would like to switch workspaces on them simultaneously. For example, I want to switch from a coding session on project1 to a coding session on project2, but switching all three monitors simultaneously to three workspaces containing my stuff for the given project. Would this be the default behaviour of hyprland, or is there maybe a concept of “workspace groups” or such to achieve that?
I am used to this behaviour from awesome (before wayland) and have been switching to sway, where this is missing (I tried to emulate it with swaysome, but it’s not really built-in).
Thanks for any pointers in case I missed this in the documentation.
You can, it just requires some work, cause workspaces are decoupled from each other.
For example, let say you have 2 monitors (I’m lazy) “DP-1” and “DP-2”
# set some workspace rules so they are automatically attributed to a monitor on creation
workspace = name:p1m1, monitor:DP-1
workspace = name:p1m2, monitor:DP-2
workspace = name:p2m1, monitor:DP-1
workspace = name:p2m2, monitor:DP-2
# create a binding to switch to project 1
bind = SUPER, 1, workspace, name:p1m1
bind = SUPER, 1, workspace, name:p1m2
# create a binding to switch to project 2
bind = SUPER, 2, workspace, name:p2m1
bind = SUPER, 2, workspace, name:p2m2
Thanks for the quick responses, it’s good to know that I didn’t miss a built-in function. I appreciate the pointers to the workarounds. But I feel they are only a very “static” solution, which wouldn’t generalise if I have a dynamic number of monitors attached (e.g. laptop alone, or with monitors at docking station at the desk, or with a projector in a lecture hall, …).
Maybe with some configuration fu this would also be possible though?
I doubt this is possible just from the config file, though you could create a daemon watching your available monitors and communicate to hyprland directly through its IPC sockets (or maybe just calling some hyprctl commands)
A possible hack to replace the “command dispatcher” part, if you already know the various monitors possible situations, would be to have several config files, and replacing “hyprland.conf” with a symlink pointing to one of the scenario config… maybe
Ok, thanks. This sounds like an idea, a bit similar to swaysome for sway. I’ll give it a thought when I find some time.
I’m genuinely surprised that I seem to be the only one with this “operational mode” of switching between “monitor-spanning projects” instead of “individual workspaces”!
I have also a multi monitor workspace configured and yes can switch then as indicated above kind of in parallel. Still it remains intimidating and not always works fluently.
But my main confusing issue:
The currently active/focused window seams to be kept always and moved to the new workspace if switching. This is causing quite a confusion when not moving the focus intentionally away. Seams very non-intuitive to me. I want a clean empty desktop when switching to a not yet populated one.
Also some related behaviors are ill defined when a window spans multiple monitors.