Created
April 11, 2013 04:21
-
-
Save jefflasslett/5360705 to your computer and use it in GitHub Desktop.
xmonad.hs (xmonad config) to provide swiping touch screen to cycle workspaces. Clicks (taps) don't reach app though.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.EZConfig | |
import XMonad.Actions.MouseGestures | |
import XMonad.Actions.CycleWS | |
import XMonad.Actions.SpawnOn | |
import qualified XMonad.StackSet as W | |
import qualified Data.Map as M | |
myManageHook = composeAll | |
[ className =? "MIM" --> doShift "mim" | |
, className =? "Sygic FLEET" --> doShift "nav" | |
, manageDocks | |
] | |
myClickJustFocuses :: Bool | |
myClickJustFocuses = False | |
myTerminal = "terminator" | |
--myMouseBindings = [ ( ( mod1Mask .|. shiftMask, button1 ), mouseGesture gestures ) ] | |
--myMouseBindings = [ ( ( mod1Mask, button1 ), mouseGesture gestures ) ] | |
myMouseBindings = [ ( ( 0, button1 ), mouseGesture gestures ) ] | |
gestures = M.fromList | |
[ ( [ L ], \_ -> nextWS ) | |
, ( [ U ], \_ -> nextWS ) | |
, ( [ R ], \_ -> prevWS ) | |
, ( [ D ], \_ -> prevWS ) | |
] | |
myStartup :: X () | |
myStartup = | |
do | |
spawnOn "mim" "terminator" | |
spawnOn "nav" "chromium-browser" | |
main = xmonad $ defaultConfig | |
{ workspaces = ["1:mim","2:nav","3"] | |
, manageHook = myManageHook <+> manageHook defaultConfig -- uses default too | |
, startupHook = myStartup | |
, terminal = myTerminal | |
, focusFollowsMouse = True | |
, clickJustFocuses = myClickJustFocuses | |
-- set terminal, modMask, etc. | |
} `additionalMouseBindings` myMouseBindings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you solved this problem? I am trying to do something similar, keyboard-free mouse gestures for when I am too lazy to use the keyboard.
http://stackoverflow.com/questions/18304191/keyboard-free-mouse-gestures-for-xmonad