-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmonad.hs
71 lines (62 loc) · 1.83 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
62
63
64
65
66
67
68
69
70
71
import Control.Monad (liftM2)
import Data.Default (def)
import XMonad
import XMonad.Hooks.DynamicLog (xmobar)
import XMonad.Hooks.FadeWindows
( FadeHook
, fadeWindowsEventHook
, fadeWindowsLogHook
, isUnfocused
, transparency
)
import XMonad.Hooks.SetWMName (setWMName)
import qualified XMonad.StackSet as W (greedyView, shift)
import XMonad.Util.EZConfig (additionalKeys)
--main = xmonad =<< statusBar myXmobar myPP toggleStrutsKey myConfig
--myXmobar = "~/.cabal/bin/xmobar"
main :: IO ()
main = xmonad =<< xmobar myConfig
myWorkspaces :: [String]
myWorkspaces = [ "main"
, "dev1"
, "dev2"
, "web"
, "docs"
, "media"
]
myManageHook :: ManageHook
myManageHook = composeAll . concat $
[ [ className =? b --> viewShift "web" | b <- myWebShifts ]
-- , [ resource =? c --> doF (W.shift "chat") | c <- myClassChatShifts ]
]
where
viewShift = doF . liftM2 (.) W.greedyView W.shift
myWebShifts = ["Firefox" {- Firefox -}]
myConfig = def
{ terminal = myUrxvt
, borderWidth = 2
, normalBorderColor = "black"
, focusedBorderColor = "gray"
, handleEventHook = fadeWindowsEventHook
, workspaces = myWorkspaces
, manageHook = myManageHook
, startupHook = myStartupHook
} `additionalKeys` myCustomBindings
myCustomBindings :: [((ButtonMask, KeySym), X ())]
myCustomBindings =
[ ((mod1Mask, xK_r), spawn "dmenu_run -b")
, ((mod1Mask, xK_u), spawn "setxkbmap us")
, ((mod1Mask, xK_c), spawn "setxkbmap cz")
]
myStartupHook :: X ()
myStartupHook = setWMName "LG3D"
myUrxvt :: String
myUrxvt = concat $
[ "urxvt"
, " -fg rgb:0000/ffff/0000"
, " -bg rgba:0000/0000/0000/ee00"
, " -cr rgb:ffff/ffff/0000"
, " -transparent"
, " -depth 32"
, " +sb"
]