Changing configuration depending on the context

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 Regards! -- Pablo Olmos de Aguilera Corradini - @PaBLoX http://www.glatelier.org/ http://about.me/pablox/ http://www.linkedin.com/in/pablooda/ Linux User: #456971 - http://counter.li.org/

On Thu, Jun 14, 2012 at 05:56:23PM -0400, Pablo Olmos de Aguilera Corradini wrote:
I'm sorry if the title is misleading, I just don't know how to explain it in one sentence.
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.
Hi Pablo, It's very difficult to know how to help without more specifics. Can you (1) post your xmonad.hs somewhere (e.g. hpaste.org) send a link, (2) say exactly what you are trying to do and what happens instead (e.g. do you get an error? or does your xmonad.hs compile fine but it doesn't do what you want? etc.) -Brent
participants (2)
-
Brent Yorgey
-
Pablo Olmos de Aguilera Corradini