[xmonad] is it possible to display workspace number on the corresponding screen?

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Mon May 16 22:06:08 CEST 2011


Quoting Lara Michaels <laramichaels1978 at yahoo.com>:

> Hi! I would love to try xmobar, thank you for the suggestion. The  
> docs suggest enabling it by adding
>
>  main = xmonad =<< xmobar conf
>
> to one's xmonad.hs, but mine already reads
>
>  main = xmonad $ ewmh gnomeConfig {
>   -- lots of stuff in here
>   }
>   `additionalKeys' myKeys

Try something like this:

main = xmonad =<< xmobar (ewmh gnomeConfig {
     -- lots of stuff in here
     }
     `additionalKeys` myKeys)

Note the extra parentheses. You will need to be sure that your  
.xmobarrc has a StdinReader set up and the appropriate thing included  
in your template. In my version, "the appropriate thing" is  
"%StdinReader%", though that may have changed since I built xmobar.

> apologies for the basic question. I would especially like to use it  
> with dynamicLogXinerama, which based on the docs at
>
> http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-DynamicLog.html#v%3Axmobar
>
> does *exactly* what I am looking for...

The setup using this is a tad different:

main = xmonad $ ewmh gnomeConfig {
     -- lots of stuff in here
     , logHook = dynamicLogXinerama
     }
     `additionalKeys` myKeys

As before, your .xmobarrc will need a StdinReader; additionally, you  
will have to arrange for xmonad's output to be piped to xmobar  
yourself, e.g. by putting

xmonad | xmobar

at the end of your .xinitrc. If you want avoidStruts/manageDocks, you  
will have to do those yourself as well.

Good luck,
~d



More information about the xmonad mailing list