Skip to content

Instantly share code, notes, and snippets.

@LSLeary
Created September 19, 2025 07:22
Show Gist options
  • Save LSLeary/6047e083e778da13c2e0d0615c6809f5 to your computer and use it in GitHub Desktop.
Save LSLeary/6047e083e778da13c2e0d0615c6809f5 to your computer and use it in GitHub Desktop.
Rebind xmonad's help command
module Help (helpAt) where
-- containers
import Data.Map.Strict (Map, (!))
import Data.Map.Strict qualified as M
-- xmonad
import XMonad hiding ((|||))
{- | E.g.
> main = xmonad def{ keys = helpAt shiftMask xK_apostrophe <> def keys }
-}
helpAt :: KeyMask -> KeySym -> XConfig Layout -> Map (KeyMask, KeySym) (X ())
helpAt mask sym cnf = M.singleton (mask, sym) help
where
help = keys def cnf ! (modMask cnf, xK_question)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment