Trouble Rebinding ToggleStruts

Hi,
I've been having a lot of trouble with xmobar after a recent upgrade. I'm
using xmobar v0.20.1 and xmonad v0.11. At first, xmonad stopped respecting
show struts and was continuously covering xmobar. I then changed my
xmonad.hs from this:
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ defaultConfig
{ logHook = takeTopFocus >> dynamicLogWithPP (xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#A8FC46" "" . shorten 50
, ppOrder = \(ws:_:t:_) -> [ws, t]
})
-- Other definitions.
}
To this:
main = xmonad =<< xmobar defaultConfig
{ -- no logHook defined
-- Other definitions.
}
This works fine, but now for some reason, Alt-B is bound to ToggleStruts.
I would like this to be Ctrl-Shift-B, and I have a key binding which adds
the second one, but I can't seem to get rid of the first.
How can I unbind Alt-B, and where is it coming from?
--
*Eyal Erez <**oneself@gmail.com*

On Sun, May 4, 2014 at 2:49 PM, Eyal Erez
To this: main = xmonad =<< xmobar defaultConfig { -- no logHook defined -- Other definitions. }
This works fine, but now for some reason, Alt-B is bound to ToggleStruts. I would like this to be Ctrl-Shift-B, and I have a key binding which adds the second one, but I can't seem to get rid of the first.
How can I unbind Alt-B, and where is it coming from?
It's coming from the xmobar combinator applied to defaultConfig: xmobar conf = statusBar "xmobar" xmobarPP toggleStrutsKey conf (see http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-DynamicLog.html#v:... ) If you want to replace toggleStrutsKey then you will need to use your own invocation of statusBar. -- | -- Helper function which provides ToggleStruts keybinding -- toggleStrutsKey :: XConfig t -> (KeyMask, KeySym) toggleStrutsKey XConfig{modMask = modm} = (modm, xK_b ) -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Hi,
Thank you very much for your help.
Would you mind posting an example of how I might use statusBar? I'm kind
of a Haskell newb.
On Sun, May 4, 2014 at 4:58 PM, Brandon Allbery
On Sun, May 4, 2014 at 2:49 PM, Eyal Erez
wrote: To this: main = xmonad =<< xmobar defaultConfig { -- no logHook defined -- Other definitions. }
This works fine, but now for some reason, Alt-B is bound to ToggleStruts. I would like this to be Ctrl-Shift-B, and I have a key binding which adds the second one, but I can't seem to get rid of the first.
How can I unbind Alt-B, and where is it coming from?
It's coming from the xmobar combinator applied to defaultConfig:
xmobar conf = statusBar "xmobar" xmobarPP toggleStrutsKey conf
(see http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-DynamicLog.html#v:... )
If you want to replace toggleStrutsKey then you will need to use your own invocation of statusBar.
-- | -- Helper function which provides ToggleStruts keybinding -- toggleStrutsKey :: XConfig t -> (KeyMask, KeySym) toggleStrutsKey XConfig{modMask = modm} = (modm, xK_b )
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
--
*Eyal Erez <**oneself@gmail.com*

I think I found a good example here:
https://wiki.archlinux.org/index.php/xmonad
Thank you kindly for your help.
-- Imports.
import XMonad
import XMonad.Hooks.DynamicLog
-- The main function.
main = xmonad =<< statusBar myBar myPP toggleStrutsKey myConfig
-- Command to launch the bar.
myBar = "xmobar"
-- Custom PP, configure it as you like. It determines what is being
written to the bar.
myPP = xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" }
-- Key binding to toggle the gap for the bar.
toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b)
-- Main configuration, override the defaults to your liking.
myConfig = defaultConfig { modMask = mod4Mask }
On Sun, May 4, 2014 at 11:59 PM, Eyal Erez
Hi,
Thank you very much for your help.
Would you mind posting an example of how I might use statusBar? I'm kind of a Haskell newb.
On Sun, May 4, 2014 at 4:58 PM, Brandon Allbery
wrote: On Sun, May 4, 2014 at 2:49 PM, Eyal Erez
wrote: To this: main = xmonad =<< xmobar defaultConfig { -- no logHook defined -- Other definitions. }
This works fine, but now for some reason, Alt-B is bound to ToggleStruts. I would like this to be Ctrl-Shift-B, and I have a key binding which adds the second one, but I can't seem to get rid of the first.
How can I unbind Alt-B, and where is it coming from?
It's coming from the xmobar combinator applied to defaultConfig:
xmobar conf = statusBar "xmobar" xmobarPP toggleStrutsKey conf
(see http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-DynamicLog.html#v:... )
If you want to replace toggleStrutsKey then you will need to use your own invocation of statusBar.
-- | -- Helper function which provides ToggleStruts keybinding -- toggleStrutsKey :: XConfig t -> (KeyMask, KeySym) toggleStrutsKey XConfig{modMask = modm} = (modm, xK_b )
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-- *Eyal Erez <**oneself@gmail.com*
*>* There are 10 types of people, those who know binary and those who don't.
--
*Eyal Erez <**oneself@gmail.com*
participants (2)
-
Brandon Allbery
-
Eyal Erez