HarveyHunt / howm

A lightweight, X11 tiling window manager that behaves like vim
GNU General Public License v2.0
649 stars 24 forks source link

Multi Monitor Support #5

Open HarveyHunt opened 9 years ago

HarveyHunt commented 9 years ago

This has been requested by a lot of people and is something that should be added in the future.

Anachron commented 9 years ago

Hows it going here?

HarveyHunt commented 8 years ago

I haven't made any progress really - been super busy and wasn't sure if this was still a requested feature.

I've bought a second monitor, so I can start to work on this soon.

I still need to work out how to represent workspaces - does each monitor have its own set of workspaces or is a monitor classed as a single workspace?

Anachron commented 8 years ago

I would LOVE to be able to do any!

So that I could say: Monitor 1+2, please display workspace 1, and monitor 3, please display workspace 2.

The usecase is (for me) pretty obvious: When using workspaces like developing or important stuff, I would like to see it both on my laptop (no1) and on the secondary screen (no2). The other screen number (no3) would then display the result or presentation or anything that is not good on a small laptop display.

madmod commented 8 years ago

Having relative sizing for workspaces on different sized monitors would be killer. Also restoring groups workspaces to specific monitors when they are plugged in would make me install arch on my MacBook!

Anachron commented 8 years ago

May I give another ping here? I'm looking forward to this feature.

HarveyHunt commented 8 years ago

I've researched this a bit more, but not put together any code yet - work has been busy.

I think it is best to not support Xinerama and instead only support Xrandr - Xinerama seems to be legacy stuff now.

HarveyHunt commented 8 years ago

I've finally got some time and have started working on this. My idea is to convert howm to use a monitor structure which shall store workspaces etc. The first step is getting howm to use a single monitor. The following needs to be done to get that working:

Then we can move on to getting multi monitor support working:

I'm sure there are some other things I am missing...

HarveyHunt commented 8 years ago

I've nearly got the basis of this working for a single monitor - the next release of howm will make use of the monitor structure. Unfortunately my laptop's bootloader has exploded and the code is on my laptop, so I need to recover it from there...

Once that is done, I'll dig into the xrandr stuff so that multiple monitors will work.

Anachron commented 8 years ago

@HarveyHunt thanks for the update! It's always good to push new branches to some online repo, such as github. :+1:

HarveyHunt commented 8 years ago

Just done it, the multi monitor work is going to be in the xrandr branch. I'm going to be rebasing / messing with history a lot on the branch, so don't try to use it for anything. :+1:

HarveyHunt commented 8 years ago

I've made some more progress - howm can now have monitors and workspaces added dynamically. However, it can only detect a single monitor right now. The big refactoring work is completed though. I am imagining there being a lot of bugs in the current code - I'll test it out over the next few days.

Multi monitor support isn't far off now, just a matter of time. Work is super busy right now, so progress will be slow for a little while. :-)

Anachron commented 8 years ago

Thanks for the hint! I'm trying to understand the tools you're using in your howm example setup. I'm fairly new to arch and full control setups. :)

Anachron commented 8 years ago

By the way I can give you some code how to detect monitor changes with xrandr. Basically it will keep executing xrandr and then grep which ports are connected and compare them to the latest iterarion.

HarveyHunt commented 8 years ago

@Anachron that sounds useful - thanks.

Anachron commented 8 years ago

Looks like you are making good progress! Can I ask you how far you've got and what is still ahead? I cannot really see it from the commits you are doing. :)

HarveyHunt commented 8 years ago

Progress has been good - adding and removing workspaces dynamically works and howm can now recognise XRandR outputs and treat them as monitors.

I need to do some more testing and handle focusing a monitor, but there isn't much left to do now. :-)

HarveyHunt commented 8 years ago

Things are coming along well now - I hope to test out multi monitor stuff tomorrow. Then I have a horrible rebase to do. :-(

Anachron commented 8 years ago

Well, there is no rebase I experienced which was not horrible. :+1: So good luck and keep up the good work!

Anachron commented 7 years ago

Hey Harvey, is there still any Todo left here?

HarveyHunt commented 7 years ago

The only TODO in the code is here.

It would also be nice to add dynamic plug/unplug support for monitors, moving windows between monitors and merging monitor contents.

Anachron commented 7 years ago

I would agree with all except last. What would merging do exactly?

HarveyHunt commented 7 years ago

The idea is that you can merge all of the windows from one monitor onto another. The user could do it explicitly, or howm could do it automatically as part of removing a monitor.

Anachron commented 7 years ago

Yes I got that, but if you have three monitors and remove one, on which way will it decide which desktop gets which clients? Since I have multiple monitors and can plugin/unplug at any time, this feature is quite important for me.