
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:
--------- 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%

On Sun, Sep 2, 2012 at 12:01 PM, Eric Velten de Melo
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
You're using the "ewmh" combinator, so you're getting avoidStruts from that; your avoidStrutsOn is therefore redundant and useless. You'll need to remove it and use the components directly, omitting avoidStruts. This means ewmhDesktopsStartup added to the startupHook ewmhDesktopsLogHook added to the logHook ewmhDesktopsEventHook and fullscreenEventHook added to the handleEventHook You also will need the lowerOnStart = True in your xmobar config. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ahem.. On 02.09.2012 18:01, Eric Velten de Melo wrote: the readme file. Hope you like it! 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%
%date%</fc> | %EGPF%" } -----------------------------------------------------------------------------------------------------
Any help appreciated,
Eric
_______________________________________________ xmonad mailing list xmonad@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-----

On 2 September 2012 16:42, Jochen Keil
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ahem..
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
On 02.09.2012 18:01, Eric Velten de Melo wrote: 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%
%date%</fc> | %EGPF%" } -----------------------------------------------------------------------------------------------------
Any help appreciated,
Eric
_______________________________________________ xmonad mailing list xmonad@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-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On 02.09.2012 22:07, Eric Velten de Melo wrote: > On 2 September 2012 16:42, Jochen Keil> wrote: 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? The code is meant for toggling xmobar when a certain key is pressed. You could mimic a similar behaviour by using xbindkeys and a shell script. For using the code snippet provided in the readme it's probably the best to put it in an own module in ~/.xmonad/lib (e.g. XmobarToggle.hs). You'll need to import the Xmonad and DBus{,.Client} modules then as well. import XMonad import DBus import DBus.Client import qualified XMonad.Util.ExtensibleState as XS .. Then go to your xmonad.hs and import XmobarToggle.hs Add some lines like this: myKeys = [ {- your current stuff -} ] ++ [ ((0, xK_Alt_L ), return ()) ] - -- 250 is the delay, 30 is tenth of seconds before disappearing myHandleEventHook = mconcat $ [ HEV.toggleDocksHook 250 30 xK_Alt_L , HEV.myDocksEventHook ] xmonad $ ewmh myConfig { .. handleEventHook = myHandleEventHook, .. } >> Would I get this feature installing xmobar from cabal or do I >> have to use the git version? The patches are quite recent, so you'll need the git version. But it's pretty stable, I'm running it atm. >> 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) ,(" ", spawn >>>> "mpd") ,(" ", spawn "mpc --no-status toggle") >>>> ,(" ", io $ return . fromRight =<< MPD.withMPD >>>> MPD.stop) ,(" ", io $ return . fromRight =<< >>>> MPD.withMPD MPD.next) ,(" ", 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"," >>>> 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: %"] 10 , Run Swap [] >>>> 10 , Run Date "%a %b %_d %l:%M" "date" 10 , Run StdinReader ] >>>> , sepChar = "%" , alignSep = "}{" , template = "%StdinReader% >>>> }{ %cpu% | %memory% * %swap% %date% | >>>> %EGPF%" } >>>> >>>> ----------------------------------------------------------------------------------------------------- >>>> >>>> >>>> > >>>> Any help appreciated, >>>> >>>> Eric >>>> >>>> _______________________________________________ xmonad >>>> mailing list xmonad@haskell.org >>>> http://www.haskell.org/mailman/listinfo/xmonad >>>> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlBDwgoACgkQtVwvsA+W4CCkxwCfVewpPH7SqJP8B26TuDiAw0KI QnkAn1kq78Aw1APjN7ixK17CfnJh2D2E =mHsY -----END PGP SIGNATURE-----

On Sun, Sep 2, 2012 at 4:07 PM, Eric Velten de Melo
suggestion worked out great. It doesn't work using cairo-compmgr, but compositing is always kind of buggy on X apparently.
More specifically in this case, it's that the window is tagged such that a compositing manager *should* pass it through, except (a) compositing doesn't work that way with X11 (it has to actively embed it in a composited window) and (b) cairo-compmgr doesn't currently support such windows properly (that was my comment about plugins). X11's a strange world. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (3)
-
Brandon Allbery
-
Eric Velten de Melo
-
Jochen Keil