[xmonad] How to have separate layout sets per screen in XMonad?

Tal Walter talw10 at gmail.com
Thu Dec 3 09:25:36 UTC 2015


Thanks Brandon!
Using the PerScreen module, I simply switched the condition from being on
the screen width, to being on the screen x coordinate (which obviously
differs between the left and right screens).

However each time a new layout is returned (i.e. each time I switch
screens) the index of the current selected layout from the layouts in the
set is being reset.
That is to be expected because there is no way of knowing apriori that the
2 layouts will have an equal amount of items, but in my case the 2 layout
sets are symmetrical, therefore I would like to stay consistent with
current selected layout index in the layout set. I tried looking around the
Workspace ADT and the runLayout func but can't find a way to get to such an
index.

Is it feasible in a simple manner?
I attached the code that I currently use.

Any help is yet again, greatly appreciated!
Thanks!

On Wed, Dec 2, 2015 at 3:44 PM, Brandon Allbery <allbery.b at gmail.com> wrote:

> On Wed, Dec 2, 2015 at 3:11 AM, Tal Walter <talw10 at gmail.com> wrote:
>
>> In case I'm not missing any module in contrib, could someone please point
>> me in a good starting direction as to how to implement such a thing?
>
>
> This could be done with a layout modifier similar to onWorkspace, but
> you'll need to look in the StackSet for the workspace tag being laid out
> and determine what ScreenID it is currently on: that information is not
> passed to the LayoutHook. (xmonad-contrib in git has PerScreen but that
> triggers by screen width, not screen ID.)
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> allbery.b at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20151203/8fe06bee/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifRightOf.hs
Type: text/x-haskell
Size: 1657 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20151203/8fe06bee/attachment.hs>


More information about the xmonad mailing list