PaperWM icon indicating copy to clipboard operation
PaperWM copied to clipboard

Pin workspaces to specific monitors

Open cytrinox opened this issue 3 years ago • 2 comments

I have a setup of 3 monitors and need a fixed preallocated amount of workspaces (12). Workspace 1-10 should be on the center monitor (marked as primary in gnome settings). Workspace 11 on the left, Workspace 12 on the right. I've discovered #280 but every time I move one workspace to the correct monitor, another workspace switches in.

Is it possible to pin workspaces to monitors? For example, after fresh reboot Workspace 1 is on the right monitor (which is wrong as the primary monitor is located center.

The gnome setting "span workspace over all monitors" to false would solve my problem but this mode is known to be incompatible with paperwm.

cytrinox avatar Nov 25 '20 21:11 cytrinox

Yeah, sorting out workspace monitor mapping would be really nice.

Unfortunately gnome shell doesn't seem to provide reliable information about active monitors, we're basically stuck with the monitor's geometry (pixel size, and position) scale and the overall layout. In other words there's for instance no real way to tell two monitors with the same geometry and scale apart.

Now, it's possible to build some hacky heuristics to get things to work a lot better than the current situation (there's also some monitor information in ~/.config/monitors.xml which could come in handy). @olejorgenb and I don't really use a multi monitor setup that much though, so the motivation to work on this isn't great.

Thinking about this though, I think there might be some easy wins by asking about monitor neighbours. So in your situation making a rule which says this workspaces should be on the left of primary, and this on the right could be fairly easy.

A last note on #280, that sounds like a possible bug, the intention is something like this:

  • You're on eg. the primary monitor and want press Alt+Super+Right, to move the current space to the right monitor
  • The current space is moved to the right monitor, and the space on the right monitor is moved to the primary monitor. Effectively swapping the spaces.

hedning avatar Nov 25 '20 22:11 hedning

Hey @hedning, I realise this is an older comment, but just a heads-up that #557 added a new async dbus connector client for DisplayConfig.

This adds unique connector id's like eDP-1, HDMI-1, to monitor objects (like in Main.layoutManager.monitors).

Essentially means we can now tell two (or more) monitors apart. It's used/needed in improving monitor layout restoring etc.

jtaala avatar Aug 28 '23 22:08 jtaala