[xmonad] Hide xmobar under windows

Eric Velten de Melo ericvmelo at gmail.com
Sun Sep 2 22:07:29 CEST 2012


On 2 September 2012 16:42, Jochen Keil <jochen.keil at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ahem..
>
> On 02.09.2012 18:01, Eric Velten de Melo wrote:
>> Ok, I am pretty sure this should not be too complicated to do, but
>> I've been trying many ways to hide the xmobar under the windows
>> and so far haven't achieved anything. Interesting thing is that
>> many people report having this behavior as something undesirable,
>> but that's precisely what I want. I don't want xmobar showing up on
>> my workspace all the time, and wanted somehow to toggle it on and
>> off.
>>
>> I have played with both toggleStruts in xmonad.hs and lowerOnStart
>> = True | False in .xmobarrc, but got nothing. Maybe this is
>> something very simple, but I'm not being able to do it. So far my
>> xmonad.hs and .xmobarrc look like this:
> I don't want to put myself into the spotlight here, but that's what
> I've implemented recently for xmobar. You can find that stuff in the
> latest git version (https://github.com/jaor/xmobar).
> There's also some documentation how to set up autohide for xmonad in
> the readme file.
>
> Hope you like it!

That sounds great! How one would toggle hide and unhide on XMonad? I
suppose it has something to do with the "Example for using the DBus
IPC interface with XMonad" but I can't quite understand the example.
Is it necessary to write all that?

Would I get this feature installing xmobar from cabal or do I have to
use the git version?

By the way, I also forgot to send reply to all, but Brandon's
suggestion worked out great. It doesn't work using cairo-compmgr, but
compositing is always kind of buggy on X apparently.

Eric

>
> Best Wishes,
>
> Jochen
>
> P.S.: Whoops, that was meant to got to Eric and to the list, sorry
> Eric for the noise.
>
>
>> --------- xmonad.hs
>> --------------------------------------------------------------
>>
>> import XMonad import qualified Data.Map as M import
>> Data.Either.Utils import qualified Network.MPD as MPD import
>> System.IO import XMonad.Actions.GridSelect import XMonad.ManageHook
>> import XMonad.Hooks.ManageHelpers import XMonad.Layout.NoBorders
>> import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.DynamicLog
>> import XMonad.Hooks.ManageDocks import XMonad.Actions.SpawnOn
>> import XMonad.Layout.PerWorkspace import XMonad.Util.Run(spawnPipe)
>> import qualified XMonad.Util.EZConfig as EZ
>>
>> myTerminal = "sakura"
>>
>> _myKeys = [ ("M-t", goToSelected defaultGSConfig) ,("M-p",
>> spawnHere "exe=`yeganesh -x` && eval \"exec $exe\"") ,("M-s",
>> sendMessage ToggleStruts) ,("<XF86Tools>", spawn "mpd")
>> ,("<XF86AudioPlay>", spawn "mpc --no-status toggle")
>> ,("<XF86AudioStop>", io $ return . fromRight =<< MPD.withMPD
>> MPD.stop) ,("<XF86AudioNext>", io $ return . fromRight =<<
>> MPD.withMPD MPD.next) ,("<XF86AudioPrev>", io $ return . fromRight
>> =<< MPD.withMPD MPD.previous) ]
>>
>> myLayouts = avoidStrutsOn [] $ smartBorders $ layoutHook
>> defaultConfig
>>
>> myManageHook :: ManageHook myManageHook = composeAll [
>> isFullscreen --> doFullFloat ]
>>
>> myConfig = EZ.additionalKeysP defaultConfig _myKeys
>>
>> main = do xmproc <- spawnPipe "xmobar" xmonad $ ewmh myConfig {
>> terminal = myTerminal, manageHook = myManageHook, layoutHook =
>> myLayouts, logHook = dynamicLogWithPP xmobarPP { ppOutput =
>> hPutStrLn xmproc , ppTitle = xmobarColor "green" "" . shorten 50 }
>> }
>>
>> -----------------------------------------------------------------------------------------------------
>>
>>
>>
> - ----------------- .xmobarrc
>> -------------------------------------------------------------------
>>
>>
>>
> Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*" ,
>> bgColor = "black" , fgColor = "grey" , position = Top ,
>> lowerOnStart = False , commands = [ Run Weather "EGPF" ["-t","
>> <tempC>C","-L","64","-H","77","--normal","green","--high","red","--low","lightblue"]
>>
>>
> 36000
>>
>>
> , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"]
>> 10 , Run Memory ["-t","Mem: <usedratio>%"] 10 , Run Swap [] 10 ,
>> Run Date "%a %b %_d %l:%M" "date" 10 , Run StdinReader ] , sepChar
>> = "%" , alignSep = "}{" , template = "%StdinReader% }{ %cpu% |
>> %memory% * %swap% <fc=#ee9a00>%date%</fc> | %EGPF%" }
>>
>> -----------------------------------------------------------------------------------------------------
>>
>>
>>
> Any help appreciated,
>>
>> Eric
>>
>> _______________________________________________ xmonad mailing list
>> xmonad at haskell.org http://www.haskell.org/mailman/listinfo/xmonad
>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
>
> iEYEARECAAYFAlBDtq0ACgkQtVwvsA+W4CBiXACfSm5TcASAhUTCvp5wUmuEqVOT
> siIAoI/YzvK9ZxHObW4+5oxptDaFW3NQ
> =WDVE
> -----END PGP SIGNATURE-----



More information about the xmonad mailing list