You are not logged in.

#1 2013-04-01 03:09:25

Libbum
Member
From: Stockholm, Sweden
Registered: 2013-02-13
Posts: 1
Website

[xmonad] uniquely addressing each ppVisible workspace

Hi everyone.

I'm having some troubles getting a certain piece of my xmonad configuration working. My Haskell skills are not up to par just yet; therefore reading documentation does not necessarily translate to the capability of solving the problem at hand.

I want to be able to set up exactly what the OP from this thread way back in 2010 wanted - to have different colours indicating the physical location of each visible workspace on a three monitor set-up.

At the moment, my xmonad.hs file as the following lines:

  ppCurrent           = dzenColor fg_red  background . pad
, ppVisible           = dzenColor fg_blue background . pad

which obviously highlight my active workspace red and two visible (but inactive) workspaces blue. I'd prefer if I could set each visible workspace a different colour (say one green, one blue) to indicate what physical monitor each resides on, so I don't end up addressing the wrong one when not paying attention.

The solution in the above thread doesn't solve the issue, but instead uses getSortByXineramaRule to force the current and visible workspaces to the left, such that a configuration like this could occur [4 1 8] 2 3 5 6 7 9. I don't particularly like this solution because I prefer to name my workspaces (mail web shell etc.), and swapping them in this fashion will render associations to the mod+1..9 sequence difficult.

I've therefore dug a little deeper into the issue, but as I said, my understanding of Haskell is lacking.

The DynamicLog hook is where ppVisible resides, the docs say its constuctor needs to know a Workspaceid:

ppVisible :: WorkspaceId -> String

To me this says ppVisible is called more than once on a three monitor system, which means I should be able to throw different colours at each call. Am I right about this assumption?

From the docs, StackSet "Xinerama in X11 lets us view multiple virtual workspaces simultaneously ... [therefore tracking] which virtual workspaces are associated (viewed) on which physical screens [is required, and StackSet] keeps separate lists of visible but non-focused workspaces." Which tells me xmonad keeps track of this location information and I should be able to address it in a round about way even if it's not through ppVisible?

Have any of you managed to set this up before? Or if you have better Haskell/xmonad experience than I; can you see a way I can colour each visible workspace separately?

Last edited by Libbum (2013-04-01 03:10:03)

Offline

Board footer

Powered by FluxBB