summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home.nix6
-rw-r--r--xmonad.hs50
2 files changed, 31 insertions, 25 deletions
diff --git a/home.nix b/home.nix
index e40b4bb..61ce8db 100644
--- a/home.nix
+++ b/home.nix
@@ -120,6 +120,12 @@ in
adapter = "AC";
full-at = 99;
};
+ "module/ewmh" = {
+ type = "internal/xworkspaces";
+ pin-workspaces = true;
+ enable-click = true;
+ enable-scroll = false;
+ };
};
script = ''
#!/usr/bin/env sh
diff --git a/xmonad.hs b/xmonad.hs
index f901547..4113186 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -1,35 +1,35 @@
-import XMonad.Config
import XMonad
-import XMonad.Util.CustomKeys (customKeys)
+import XMonad.Config
import XMonad.Hooks.EwmhDesktops (ewmh)
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Spiral
+import XMonad.Util.CustomKeys (customKeys)
-delKeys conf@(XConfig {modMask = modMask}) =
- [ (modMask, xK_p)
- ]
+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 &")
- ]
+ [ ((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)
+
+myWorkspaces = ["1:mail", "2:org", "3:web"] ++ map show [4 .. 9] ++ ["0"]
-myLayout = spiral (6/7)
+myConf =
+ 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
+ , workspaces = myWorkspaces
+ }
-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
- }
+main = xmonad $ ewmh $ docks $ myConf