Discussion:
[xmonad] Dual monitor hotplug issue
Miles Sabin
2015-12-03 10:01:16 UTC
Permalink
Hi folks,

I have laptop which is usually connected to a large external monitor.
When it's connected, the external monitor is configured as the X
primary using Xrandr. When I disconnect the external monitor the X
configuration is automatically updated using autorandr, turning off
the external monitor and setting the laptop panel as the primary.

The switch of primary causes xmobar to automatically switch from the
external monitor to the laptop panel, which is what I want.

Unfortunately, a lot of windows are also moved onto the workspace
which is visible on the laptop panel. Some of these are from the
workspace which was visible on the monitor which has just been
removed, but others are from workspaces which weren't visible on
either the external or the laptop panel.

How would I disable this behaviour? I want the primary to switch to
the laptop panel, but I would like windows in workspaces that were on
the disconnected monitor to stay part of their now invisible
workspaces.

This is with xmonad 0.11.

Cheers,


Miles
--
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: ***@milessabin.com
http://milessabin.com/blog
http://twitter.com/milessabin
Brandon Allbery
2015-12-03 14:16:12 UTC
Permalink
Post by Miles Sabin
Unfortunately, a lot of windows are also moved onto the workspace
which is visible on the laptop panel. Some of these are from the
workspace which was visible on the monitor which has just been
removed, but others are from workspaces which weren't visible on
either the external or the laptop panel.
Are you running a compositing manager? xmonad does not move windows around
in that case, but compositing managers often seem to think it does; if I
immediately kill the compositing manager, things go back where they should
be. (Depending on my xmonad config, I can also sometimes trigger this with
mod-q.) Oddly, if I do not immediately kill it, xmonad seems to adopt the
new configuration (probably when the logHook runs or something).
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Miles Sabin
2015-12-03 15:17:46 UTC
Permalink
Post by Brandon Allbery
Post by Miles Sabin
Unfortunately, a lot of windows are also moved onto the workspace
which is visible on the laptop panel. Some of these are from the
workspace which was visible on the monitor which has just been
removed, but others are from workspaces which weren't visible on
either the external or the laptop panel.
Are you running a compositing manager?
No, I'm not ... Xmonad standalone from lightdm via xmonad-session.

Cheers,


Miles
--
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: ***@milessabin.com
http://milessabin.com/blog
http://twitter.com/milessabin
Loading...