forked from aclough/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmonad.hs
61 lines (55 loc) · 2.09 KB
/
xmonad.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.Minimize
import XMonad.Hooks.EwmhDesktops
import XMonad.Util.EZConfig
import XMonad.Actions.CycleWS
import XMonad.Actions.UpdatePointer
import XMonad.Layout.Minimize
import XMonad.Layout.MultiColumns
import XMonad.Layout.LayoutHints
import qualified XMonad.StackSet as W
myWorkspaces = map show [1..9]
myManageHook = composeAll [
(resource =? "Do") --> doIgnore
, (className =? "Gnome-panel" <&&> title =? "Run Application") --> doFloat
]
myLayout = minimize $ avoidStruts (layouts)
where
layouts = multi ||| Full
multi = multiCol [1] 3 0.03 (-0.5)
myHandleEventHook = hintsEventHook <+> minimizeEventHook <+> ewmhDesktopsEventHook
myTerminal = "gnome-terminal"
main = xmonad $ gnomeConfig
{ terminal = myTerminal
, modMask = mod4Mask -- use the mod key to the windows key
, manageHook = myManageHook <+> manageHook gnomeConfig
, layoutHook = myLayout
, logHook = updatePointer (Relative 0.1 0.1) >> logHook gnomeConfig >> ewmhDesktopsLogHook
, handleEventHook = myHandleEventHook
, startupHook = ewmhDesktopsStartup >> startupHook gnomeConfig
}
`additionalKeysP`(
[ ("M-c", kill)
, ("M-n", spawn "yeganesh_run.sh")
, ("M-;", spawn myTerminal)
, ("M-b", spawn "google-chrome")
, ("M-v", spawn "nautilus ~")
, ("M-m", withFocused minimizeWindow)
, ("M-M1-m", sendMessage RestoreNextMinimizedWin)
, ("M-u", prevWS)
, ("M-i", nextWS)
, ("M-S-u", shiftToPrev)
, ("M-S-i", shiftToNext)
, ("M-M1-u", shiftToPrev >> prevWS)
, ("M-M1-i", shiftToNext >> nextWS)
, ("M-M1-j", windows W.swapDown)
, ("M-M1-k", windows W.swapUp)
, ("M-y", nextScreen)
, ("M-S-y", shiftNextScreen)
, ("M-M1-y", shiftNextScreen >> nextScreen)
]
-- Shifts a window to specifiec workspace, and sets that workspace in screen
++ [ ("M-M1-" ++ tag, (windows $ W.shift tag) >> (windows $ W.greedyView tag)) | tag <- myWorkspaces ]
)