diff options
| author | Tom Harley | 2020-12-31 06:22:10 +0000 |
|---|---|---|
| committer | Tom Harley | 2020-12-31 06:22:10 +0000 |
| commit | f7cd94645921dae0b17e8666fcfa3e9b84f8111d (patch) | |
| tree | a45350051567339b33917a8de1ec5bc98c3809da /xmonad.hs | |
| parent | Add minimal README (diff) | |
| download | home-manager-f7cd94645921dae0b17e8666fcfa3e9b84f8111d.tar.gz home-manager-f7cd94645921dae0b17e8666fcfa3e9b84f8111d.zip | |
Put xmonad config in separate file
xmonad.hs is now its own standalone file, which is nice for syntax highlighting. The new version uses string substitution from nixpkgs’ standard library.
Diffstat (limited to 'xmonad.hs')
| -rw-r--r-- | xmonad.hs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/xmonad.hs b/xmonad.hs new file mode 100644 index 0000000..2f3525d --- /dev/null +++ b/xmonad.hs @@ -0,0 +1,28 @@ +import XMonad +import XMonad.Actions.Volume +import XMonad.Actions.PhysicalScreens +import XMonad.Util.Dzen +import XMonad.Hooks.EwmhDesktops +import XMonad.Util.EZConfig + +import Data.Default + +mymod = mod4Mask +myKeys = + [ ((mymod, xK_p), spawn "@dmenu@") + , ((mymod, xK_i), lowerVolume 5 >>= alert) + , ((mymod, xK_o), raiseVolume 5 >>= alert) + ] + ++ + [((mymod .|. mask, key), f sc) + | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] + , (f, mask) <- [(viewScreen def, 0), (sendToScreen def, shiftMask)]] + +alert = dzenConfig (timeout 3 >=> onCurr xScreen) . show . round + +main = xmonad $ ewmh $ def + { terminal = "@terminal@" + , modMask = mymod + , borderWidth = 0 + , focusFollowsMouse = False + } `additionalKeys` myKeys |
