summaryrefslogtreecommitdiffstats
path: root/xmonad/.xmonad/xmonad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'xmonad/.xmonad/xmonad.hs')
-rw-r--r--xmonad/.xmonad/xmonad.hs92
1 files changed, 0 insertions, 92 deletions
diff --git a/xmonad/.xmonad/xmonad.hs b/xmonad/.xmonad/xmonad.hs
deleted file mode 100644
index 21e197d..0000000
--- a/xmonad/.xmonad/xmonad.hs
+++ /dev/null
@@ -1,92 +0,0 @@
1import XMonad
2import qualified XMonad.StackSet as W
3import XMonad.Hooks.DynamicLog
4import XMonad.Hooks.EwmhDesktops
5import XMonad.Hooks.ManageDocks
6import XMonad.Hooks.ManageHelpers
7import XMonad.Layout.NoBorders
8import XMonad.Layout.WindowNavigation
9import XMonad.Util.EZConfig
10import XMonad.Util.Run(spawnPipe)
11import System.Exit
12import System.IO
13import Data.List(isPrefixOf)
14
15myManageHook :: ManageHook
16myManageHook = composeOne
17 [ className =? "Firefox" -?> doShift "2"
18 , className =? "Pidgin" -?> doShift "3"
19 , className =? "nuvolaplayer" -?> doShift "8"
20 , className =? "Transmission-gtk" -?> doShift "9"
21 , isFullscreen -?> doFullFloat
22 , fmap ("mpv" `isPrefixOf`) title -?> doFullFloat
23 ]
24
25myKeys c = mkKeymap c $
26 [ ("M-S-<Return>", spawn $ XMonad.terminal c)
27 , ("M-k", kill)
28
29 , ("M-<Space>", spawn "exec $(dmenu_path | dmenu)")
30 , ("M-x M-e", spawn "emacsclient -c")
31
32 , ("M-t", withFocused $ windows . W.sink)
33 , ("M-m", windows W.focusMaster)
34 , ("M-S-m", windows W.swapMaster)
35
36 , ("M-<R>", sendMessage $ Go R)
37 , ("M-<L>", sendMessage $ Go L)
38 , ("M-<U>", sendMessage $ Go U)
39 , ("M-<D>", sendMessage $ Go D)
40 , ("M-M1-<R>", sendMessage $ Swap R)
41 , ("M-M1-<L>", sendMessage $ Swap L)
42 , ("M-M1-<U>", sendMessage $ Swap U)
43 , ("M-M1-<D>", sendMessage $ Swap D)
44 , ("M-C-<R>", sendMessage $ Move R)
45 , ("M-C-<L>", sendMessage $ Move L)
46 , ("M-C-<U>", sendMessage $ Move U)
47 , ("M-C-<D>", sendMessage $ Move D)
48
49 , ("M-n", windows W.focusDown)
50 , ("M-p", windows W.focusUp)
51 , ("M-S-n", windows W.swapDown)
52 , ("M-S-p", windows W.swapUp)
53
54 , ("M-,", sendMessage (IncMasterN 1))
55 , ("M-.", sendMessage (IncMasterN (-1)))
56
57 , ("M-\\", sendMessage NextLayout)
58 , ("M-S-\\", setLayout $ XMonad.layoutHook c)
59
60 , ("M-+", sendMessage Shrink)
61 , ("M--", sendMessage Expand)
62
63 , ("M-q", broadcastMessage ReleaseResources
64 >> restart "xmonad" True)
65 , ("C-M-q", io (exitWith ExitSuccess))
66 ] ++
67
68 -- mod-[1..9], Switch to workspace N
69 -- mod-shift-[1..9], Move client to workspace N
70 [(m ++ k, windows $ f w)
71 | (w, k) <- zip (XMonad.workspaces c) (map show [1..9])
72 , (m, f) <- [("M-",W.greedyView), ("M-S-",W.shift)]]
73
74
75main :: IO ()
76main = do
77 xmproc <-spawnPipe "/usr/bin/xmobar /home/alan/.xmobarrc"
78 xmonad $ defaultConfig
79 { manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig
80 , layoutHook = smartBorders . avoidStruts $ layoutHook defaultConfig
81 , logHook = dynamicLogWithPP xmobarPP
82 { ppOutput = hPutStrLn xmproc
83 , ppTitle = xmobarColor "#859900" "" . shorten 200
84 , ppCurrent = xmobarColor "#b58900" "". wrap "[" "]"
85 , ppHiddenNoWindows = xmobarColor "#93a1a1" ""
86 , ppUrgent = xmobarColor "#dc322f" "#b58900"
87 }
88 , terminal = "urxvt"
89 , modMask = mod4Mask
90 , handleEventHook = fullscreenEventHook
91 , keys = myKeys
92 }