[xmonad] mouse buttons "button8" and "button9" don't wok
info at hendrik-krauss.de
Fri Jul 2 11:21:04 EDT 2010
> You can try but no guarantees.
I've been using buttons > 5 since forever and have never had problems.
Just check xev to tell what button has what number. (My X11/X.h goes
only up to 5. Who cares.)
For inspiration, a snippet from my xmonad.hs. My laptop's touchpad
allows scrolling left/right as well as up/down.
-- Mod + vertical scrolling = move focus, with Alt it moves windows.
-- Mod + horizontal scrolling = resize the master pane, with
Alt it changes number of windows in master.
-- So is that cool or what? ;-)
let leftclick = 1
middleclick = 2
rightclick = 3
wheelup = 4
wheeldown = 5
wheelleft = 6
wheelright = 7
-- Set the window to floating mode and move by dragging
[ (leftclick , \w -> focus w >> mouseMoveWindow w)
-- Raise the window to the top of the stack
, (middleclick, \w -> focus w >> windows W.swapMaster)
-- Set the window to floating mode and resize by dragging
, (rightclick, \w -> focus w >> mouseResizeWindow w)
, (wheelup , \_ -> windows W.focusUp)
, (wheeldown , \_ -> windows W.focusDown)
, (wheelleft , \_ -> sendMessage Shrink)
, (wheelright, \_ -> sendMessage Expand)
withMask (modm .|. alt)
[ (wheelup , \_ -> windows W.swapUp)
, (wheeldown , \_ -> windows W.swapDown)
, (wheelleft , \_ -> sendMessage $ IncMasterN 1)
, (wheelright, \_ -> sendMessage $ IncMasterN (-1))
-- Not very important. Tiny function the above code relies on.
withMask m = map (\(sym, action) -> ((m, sym), action))
"1 + 1 = 3, for large values of 1."
More information about the xmonad