[xmonad] My hack to allow disabling of numlock without messing with my xmonad mod key

Thomas Løcke thomas.granvej6 at gmail.com
Wed Mar 20 13:11:40 CET 2013


In short: I've thrown a script together that executes the xmodmap command
needed to completely disable to numlock key. What this script does is make
sure that xmonad is up and running _before_ xmodmap is called. Combined
with Adam's addition to my handleEventHook in xmonad.hs I've now managed to
squash the numlock key into oblivion.

Mission accomplished!

I can't say I like this solution, but at least it gets the job done.

I would still very much prefer if this could've been fixed in xmonad.hs, or
if xmonad would just let me do my xmodmap'ing without destroying my mod
key, but as that does not seem to be possible, I'll settle for second best.

So if anybody else out there is having this problem, a bit of BASH will
solve it. Just make sure you have this in your handleEventHook:

( \e -> case e of
      MappingNotifyEvent {} -> return (All False)
      _ -> mempty)

and that your xmodmap calls are done _after_ xmonad is fully loaded. I call
my script from .xinitrc just before I start xmonad. The script is
backgrounded and it simply loops until it finds a running xmonad instance.

:o)
Thomas Løcke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20130320/5e65c175/attachment.htm>


More information about the xmonad mailing list