Re: [hackers] Re: [dwm][PATCH] Sort screens by horizontal origin

From: Sebastian Sareyko <>
Date: Thu, 24 Oct 2019 09:00:02 +0200

> What I was thinking is that the original position of monitor 0 could be
> recorded before the sorting, then shift / rotate the sorted list so that
> the primary screen remains where it were originally, e.g.
> [0][1][2][3] --> shift once
> [3][0][1][2]
> ^_primary

But that way the screens in dwm end up in an order other than the
actual, "physical" order. That means that the monitor numbering given in
rules[] does not correspond to the actual positioning of the screen in
the real (or xrandr) world.
To me the current approach in retaining screen order within dwm feels
more intuitive. I think to solve the "primary screen issue" you'd have
to introduce the concept of a primary screen to dwm.
Something like the following should work well enough: Start screen
numbering in rules[] with 1 instead of 0 and make 0 a special monitor
index that always points to the primary screen no matter its physical

Received on Thu Oct 24 2019 - 09:00:02 CEST

This archive was generated by hypermail 2.3.0 : Thu Oct 24 2019 - 09:36:31 CEST