summaryrefslogtreecommitdiff
path: root/xmonad.hs
blob: f9015471b86daa87c79d5ec46a00cc89ba393740 (plain)
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
import XMonad.Config
import XMonad
import XMonad.Util.CustomKeys (customKeys)
import XMonad.Hooks.EwmhDesktops (ewmh)
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Spiral

delKeys conf@(XConfig {modMask = modMask}) =
    [ (modMask, xK_p)
    ]

insKeys :: XConfig l -> [((KeyMask, KeySym), X ())]
insKeys conf@(XConfig {modMask = modMask}) =
    [ ((0, xK_F5), spawn "xbacklight -dec 1")
    , ((0, xK_F6), spawn "xbacklight -inc 1")
    , ((modMask, xK_o), spawn "dmenu_run")
    , ((modMask, xK_p), spawn "${SHELL:-\"/bin/sh\"} -c passmenu &")
    , ((modMask, xK_y), spawn "passmenu &")
    ]

myLayout = spiral (6/7)

main =
    xmonad $
    ewmh $
    docks $
    def
        { modMask = mod4Mask -- ^ super instead of alt
        , normalBorderColor = "#eee8d4" -- ^ solarized base3
        , focusedBorderColor = "#2aa198" -- ^ solarized cyan
        , manageHook = manageDocks <+> manageHook defaultConfig
        , layoutHook = avoidStruts $ myLayout ||| layoutHook defaultConfig
        , terminal = "/home/ben/.nix-profile/bin/xterm"
        , keys = customKeys delKeys insKeys
        }