Re: [dev] [dwm] twin-head displays as single tags / workspaces

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Fri, 19 May 2017 22:54:51 +0200

Hi Kuba,

On 19 May 2017 at 17:31, Kuba <kubaraczkowski_AT_gmail.com> wrote:
> Would it be possible to have to have a setup with 2 monitors where
> both are managed as a single tag?
> That would create "dual head workspaces" - I work on many projects at
> the same time and each project needs many windows - perfect for dual
> head setup. Currently to switch between projects I need to adjust tags
> on each of the monitors. If what I propose would be possible then a
> tag switch would be switching both monitors.

Do both of your screens have the same size/resolution? If yes, the the
simplest method would be building dwm without XINERAMA support and
treating the dual head setup as "single head". Perhaps with patching
updatebars() to only adjust the barwidth to sw/2, so that it doesn't
stretch with a gap in the middle.

> In fact something like "linking tags" would be sufficient - you switch
> a tag on any screen and that switches to a "friendly tag" (or tag with
> the same name) on the other screen.

If you keep multihead setup, you could amend view() in a way to
iterate over all monitors instead of selmon -- literally applying the
view() command to all monitors. Something like:

 void
 view(const Arg *arg)
 {
+ Monitor *m;
+
        if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
                return;
- selmon->seltags ^= 1; /* toggle sel tagset */
- if (arg->ui & TAGMASK)
- selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
- focus(NULL);
- arrange(selmon);
+ for(m = mons; m; m = m->next) {
+ m->seltags ^= 1; /* toggle sel tagset */
+ if (arg->ui & TAGMASK)
+ m->tagset[m->seltags] = arg->ui & TAGMASK;
+ if(m == selmon)
+ focus(NULL);
+ arrange(m);
+ }
 }

Though, I would recommend the singleheaded approach. Personally I've
been sticking to single head for the past 4 years and quite happy with
it. I don't really see the point in multihead setups anymore -- if you
need a large screen, you know where to get it. The only reason I
need/use multihead support is when giving presentations.

BR,
Anselm
Received on Fri May 19 2017 - 22:54:51 CEST

This archive was generated by hypermail 2.3.0 : Fri May 19 2017 - 23:00:14 CEST