-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxmonad.hs
64 lines (58 loc) · 2.27 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
import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.ManageDocks -- Provides avoidStruts
import XMonad.Hooks.EwmhDesktops
import XMonad.Util.EZConfig -- Provides additionalKeysP
import XMonad.Actions.CycleWS
import XMonad.Actions.UpdatePointer
import XMonad.Layout.LayoutHints
import qualified XMonad.StackSet as W
myWorkspaces = map show [1..9]
myHandleEventHook = hintsEventHook
myTerminal = "kitty"
myScreenshot = "scrot -e 'mv $f ~/workspace/' "
myLayout = avoidStruts (tiled ||| Full)
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
main = xmonad $ ewmhFullscreen . ewmh $ gnomeConfig
{ terminal = myTerminal
, modMask = mod4Mask -- use the mod key to the windows key
, manageHook = manageHook gnomeConfig
, layoutHook = myLayout
, logHook = updatePointer (0.5,0.5) (0.5,0.5) >> logHook gnomeConfig
, handleEventHook = myHandleEventHook
, startupHook = startupHook gnomeConfig
, focusedBorderColor = "#c71341"
}
`additionalKeysP`(
[ ("M-c", kill)
, ("M-n", spawn "rofi -show run")
, ("M-;", spawn myTerminal)
-- , ("M-b", spawn "google-chrome --enable-features=UseOzonePlatform --ozone-platform=wayland")
, ("M-b", spawn "google-chrome")
, ("M-v", spawn "nemo ~")
, ("M-p", spawn myScreenshot)
, ("M-S-p", spawn $ myScreenshot ++ " -s")
, ("M-M1-p", spawn $ myScreenshot ++ " -u")
, ("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 specific workspace, and sets that workspace in screen
++ [ ("M-M1-" ++ tag, (windows $ W.shift tag) >> (windows $ W.greedyView tag)) | tag <- myWorkspaces ]
)