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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
import XMonad
import qualified XMonad.StackSet as W
-- actions
import XMonad.Actions.CycleWS (moveTo, shiftTo, WSType(..), nextScreen, prevScreen)
import XMonad.Actions.CopyWindow (kill1, killAllOtherCopies)
-- layouts modifiers
import XMonad.Layout.Spacing
import XMonad.Layout.LayoutModifier
-- import XMonad.Layout.Gaps
-- import XMonad.Layout.ShowWName
-- utilities
import XMonad.Util.SpawnOnce
myStartupHook :: X ()
myStartupHook = do
spawnOnce "nitrogen --restore &"
spawnOnce "picom &"
spawnOnce "deadd-notification-center &"
-- spawnOnce "firefox &"
spawnOnce "sxhkd &"
-- defaults
-- myFont :: String
-- myFont = "Roboto"
myModMask :: KeyMask
myModMask = mod4Mask
myTerminal :: String
myTerminal = "st"
myBrowser :: String
myBrowser = "firefox"
-- myEditor :: String
-- myEditor = "vim"
-- ~defaults~
-- wm variables
nBorder = "#bf00ff"
fBorder = "#FB027F"
myBorderWidth = 2
windowGaps = mySpacing 2 3
myExtraWorkspaces = [(xK_0, "10")] -- ,(xK_minus, "tmp"),(xK_equal, "swap")]
myWorkspaces = ["1","2","3","4","5","6","7","8","9"] ++ (map snd myExtraWorkspaces)
myLayoutHook = windowGaps
-- ~wm variables~
-- functions
mySpacing i j = spacingRaw False (Border i i i i) True (Border j j j j) True $
layoutHook def
-- ~functions~
-- keybindings
myKeys = [("modMask-<Return>", spawn (myTerminal))]
-- ~keybindings~
main = do
xmonad $ def
{
terminal = myTerminal,
focusFollowsMouse = True,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = nBorder,
focusedBorderColor = fBorder,
keys = myKeys,
-- mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = myLayoutHook,
--manageHook = myManageHook,
--handleEventHook = myEventHook,
--logHook = myLogHook,
startupHook = myStartupHook
}
|