ssokolow / quicktile

Adds window-tiling hotkeys to any X11 desktop. (An analogue to WinSplit Revolution for people who don't want to use Compiz Grid)
https://ssokolow.com/quicktile/
GNU General Public License v2.0
869 stars 78 forks source link

Add "monitor-switch-all" command #37

Closed kbsali closed 7 years ago

kbsali commented 10 years ago

It would be nice to have a "monitor switch" command for all open windows. A typical use case would be when working on a laptop while travelling, then plug it in to an external monitor, if I want to move all the windows to the external monitor I have to do that for each window one by one.

ssokolow commented 10 years ago

Operating on windows other than the currently active one isn't something any of the current commands do but 0.2.x's use of libwnck should probably make it fairly simple. (I believe the API for command callbacks would make retrieving all windows on the current desktop a simple matter of wm.screen.get_windows())

My plan was to break into that area of effort with a rewrite of the tiling system so columns and rows could be dynamically resized with all windows occupying them adjusting to match.

I'll look into it once I get the more urgent TODOs (eg. stop hard-coding tiling presets) out of the way. The tricky part will probably be dealing with variations in monitor size (issue #24) and and deciding what "'monitor switch' for all open windows" means in the general case.

ssokolow commented 7 years ago

Just because life has been such a mess that I haven't been able to work on this doesn't mean I think the idea has no merit.

I'm reopening this to use it as a TODO.

kbsali commented 7 years ago

:) ok, thanks! I did not mean to offend you! ;)

ssokolow commented 7 years ago

chuckle I just tried implementing this naïvely and it even cycled the desktops around. Looks like I'll need an extra check or two.

ssokolow commented 7 years ago

OK, I've implemented monitor-prev-all and monitor-next-all.

They're not perfect, but they have the same flaw as monitor-prev and monitor-next, which I intend to fix as a separate bug.

(QuickTile just blindly moves them around, rather than adapting the window geometry to be relative to the shape of the new monitor.)