-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmonad.hs##hostname.asgard
69 lines (64 loc) · 2.5 KB
/
xmonad.hs##hostname.asgard
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
import XMonad
import XMonad.Actions.GridSelect
import XMonad.Actions.Plane
import XMonad.Actions.UpdatePointer
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.GridVariants
import XMonad.Layout.NoBorders
import XMonad.Prompt
import XMonad.Prompt.Shell
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
import XMonad.Util.Paste
import XMonad.Util.Replace
import XMonad.Util.Run (spawnPipe)
import System.IO
import qualified Data.Map as M
import Data.Maybe
import Control.Monad
workspaces' = ["Web", "Emacs", "Terminal", "Email", "IRC", "Local"]
managehook' = composeAll
[className =? "Firefox" --> doShift "Web"
, className =? "thunderbird-default" --> doShift "Email"
, className =? "Emacs" --> doShift "Emacs"
, className =? "mpv" --> doFloat
, manageDocks]
<+>
composeOne
[isFullscreen -?> doFullFloat]
main = do
-- replace
xmproc <- spawnPipe "xmobar"
xmonad $ docks . ewmhFullscreen . ewmh $ def
{ modMask = mod4Mask
, workspaces = workspaces'
, terminal = "kitty"
, focusFollowsMouse = True
, borderWidth = 1
, handleEventHook = handleEventHook def
, startupHook = startupHook def
, manageHook = managehook' <+> manageHook def
, layoutHook = smartBorders $ avoidStruts $ layoutHook def ||| Grid (16/10)
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 80
} >> updatePointer (0.5, 0.5) (0, 0)
}
`additionalKeysP`
[ ("M-s", spawn "xscreensaver-command --lock")
, ("<Scroll_lock>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle")
, ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle")
, ("M-p", spawn "rofi -show run")
, ("M-<Print>", spawn "sleep 0.2; scrot -s -e 'mv $f ~/screenshots/'")
, ("<Print>", spawn "scrot -e 'mv $f ~/screenshots/'")
, ("M-a", gridselectWorkspace def W.view)
, ("M-e", goToSelected def)
, ("M-y", sendMessage ToggleStruts)
-- , ("C-M-o", restart "~/bin/obtoxmd" False)
, ("M-o", shellPrompt def)
, ("M-i", spawn "~/bin/passmenu")]
`additionalKeys`
M.toList (planeKeys mod4Mask (Lines 2) Circular)