Guest User

Untitled

a guest
Jul 15th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. import XMonad
  2. import XMonad.Hooks.DynamicLog
  3. import XMonad.Hooks.ManageDocks
  4. import XMonad.Layout.IndependentScreens
  5. import qualified XMonad.StackSet as W
  6. import XMonad.Util.Run(spawnPipe)
  7. import XMonad.Util.EZConfig(additionalKeys)
  8. import System.IO
  9.  
  10. main = do
  11. -- xmproc <- spawnPipe "xmobar"
  12. xmonad myConfig
  13.  
  14. myConfig = defaultConfig
  15. { manageHook = manageDocks <+> manageHook defaultConfig
  16. , layoutHook = avoidStruts $ layoutHook defaultConfig
  17. , workspaces = myWorkspaces
  18. -- , logHook = dynamicLogWithPP $ xmobarPP
  19. -- { ppOutput = hPutStrLn xmproc
  20. -- , ppTitle = xmobarColor "green" "" . shorten 50
  21. -- }
  22. , modMask = mod4Mask -- Rebind Mod to the Windows key
  23. } `additionalKeys` myKeys
  24.  
  25. myWorkspaces = withScreens 2 ["1", "2", "3", "4", "5", "6", "7", "8", "slack"]
  26.  
  27. myKeys =
  28. [ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
  29. , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
  30. , ((0, xK_Print), spawn "scrot")
  31. ]
  32. ++
  33. -- mod-[1..9], Switch to workspace N
  34. -- mod-shift-[1..9], Move client to workspace N
  35. --[((m .|. mod4Mask, k), windows $ f i)
  36. -- | (i, k) <- zip myWorkspaces [xK_1 .. xK_9]
  37. -- , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
  38. [((m .|. modMask, k), windows $ onCurrentScreen f i)
  39. | (i, k) <- zip (workspaces' myConfig) [xK_1 .. xK_9]
  40. , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
Add Comment
Please, Sign In to add comment