[xmonad] Retrieving screen resolution + ghci for XMonad

Nicolas Dudebout nicolas.dudebout at gatech.edu
Mon Apr 2 16:16:42 CEST 2012


Hi,

I am trying to align a dzen2 bar to the right of my screen.
A dzen2 bar is aligned by giving an offset from the left side of the screen.
Since I have a single xmonad.hs for multiple computers, I would like to
retrieve the width of the screen from XMonad.
I found the following snippet online:
main = do
     (_, out, _, process_handle) <- runInteractiveCommand "echo WIDTH |
eval m4 `xrdb -symbols`"
     ...
This does not seem really satisfactory.
I know this information is available from inside XMonad, probably in a
ScreenDetail from XMonad.Core.

My question is: "How can I retrieve this number from XMonad?"

Another way look at that the question is: "What is the best way to figure
out things in XMonad?"
I have a specific question, found a potential candidate in the
documentation, and would like to experiment before changing my xmonad.hs.
Is there a way to use ghci to look around?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20120402/55032248/attachment.htm>


More information about the xmonad mailing list