[xmonad] Changing configuration depending on the context

Pablo Olmos de Aguilera Corradini pablo.olmosdeaguilera at gmail.com
Thu Jun 14 23:56:23 CEST 2012

I'm sorry if the title is misleading, I just don't know how to explain
it in one sentence.

Normally I use my xmonad system in two contexts, one in my laptop
(1366*768) and in my "workstation" that consists in a 21" monitor
(1980*1280) as primary monitor and with the laptop as secondary. This
leads me to not being able to use the same configuration every time.

I've been trying a lot of stuff to put the dzen|tray|conky bars
according to the dimension using the libraries from haskell, but
sometimes they doesn't work as expected overlapping bars, mostly
because when xmonad just starts there is one screen cloned in both
monitors, then I have to start my xrandr script to fix the dimensions
and position of both.

My actual approach consists to call a do block from the main block of
the xmonad.hs file, and then a lot of local variables (using 'let')
from the function that is getting the screen dimensions, with them I
was trying to do some math and include them on dzen, the tray
application, ecc.

I'm still learning haskell and xmonad, so probably I'm not using the
best approach. Any suggestion

Pablo Olmos de Aguilera Corradini - @PaBLoX
Linux User: #456971 - http://counter.li.org/

More information about the xmonad mailing list