Switch to programmer dvorak
diff --git a/modules/kmonad.nix b/modules/kmonad.nix
index abead7c..f118eef 100644
--- a/modules/kmonad.nix
+++ b/modules/kmonad.nix
@@ -2,6 +2,11 @@
imports = [ kmonad.nixosModules.default ];
config = {
+ services.xserver = {
+ layout = "us";
+ xkbVariant = "dvp";
+ };
+
services.kmonad = {
enable = true;
keyboards.laptop-internal = {
diff --git a/modules/kmonad/config.kbd b/modules/kmonad/config.kbd
index a114f0a..3ead3b4 100644
--- a/modules/kmonad/config.kbd
+++ b/modules/kmonad/config.kbd
@@ -1,30 +1,30 @@
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prnt ins del pgup pgdn home end
- ` 1 2 3 4 5 6 7 8 9 0 - = bspc KeyMedia
- tab q w e r t y u i o p [ ]
- caps a s d f g h j k l ; ' ret
- lsft \ z x c v b n m , . / rsft up
- lctl lmet lalt spc ralt rctl left down right
-)
-
-(deflayer dvorak
- esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prnt ins del _ _ _ _
- ` 1 2 3 4 5 6 7 8 9 0 [ ] bspc @qwe
+ ` 1 2 3 4 5 6 7 8 9 0 [ ] bspc KeyMedia
tab ' , . p y f g c r l / =
- f12 a o e u i d h t n s - ret
+ caps a o e u i d h t n s - ret
lsft \ ; q j k x b m w v z rsft up
lctl lmet lalt spc ralt rmet left down right
)
-(deflayer qwerty
+(deflayer dvorak
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ @dvo
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @qwe
_ _ _ _ _ _ _ _ _ _ _ _ _
f12 _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _
)
+(deflayer qwerty
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prnt ins del _ _ _ _
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc @dvo
+ tab q w e r t y u i o p [ ]
+ caps a s d f g h j k l ; ' ret
+ lsft \ z x c v b n m , . / rsft up
+ lctl lmet lalt spc ralt rctl left down right
+)
+
(deflayer empty
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
diff --git a/modules/locale.nix b/modules/locale.nix
index e4fdf97..c363358 100644
--- a/modules/locale.nix
+++ b/modules/locale.nix
@@ -2,6 +2,6 @@
config = {
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_US.UTF-8";
- console.keyMap = "uk";
+ console.keyMap = "dvorak-programmer";
};
}
diff --git a/modules/xmonad.nix b/modules/xmonad.nix
index 9195235..c887ba2 100644
--- a/modules/xmonad.nix
+++ b/modules/xmonad.nix
@@ -34,7 +34,6 @@
};
config.services.xserver = {
enable = true;
- layout = "gb";
displayManager.startx.enable = true;
};
}
diff --git a/modules/xmonad/XMonadLog.hs b/modules/xmonad/XMonadLog.hs
index fb5bbe7..7586537 100644
--- a/modules/xmonad/XMonadLog.hs
+++ b/modules/xmonad/XMonadLog.hs
@@ -2,12 +2,13 @@
module XMonadLog where
-import qualified DBus as D
-import qualified DBus.Client as D
+import qualified DBus as D
+import qualified DBus.Client as D
-import qualified Codec.Binary.UTF8.String as UTF8
+import qualified Codec.Binary.UTF8.String as UTF8
+import XMonad.Actions.WorkspaceNames (workspaceNamesPP)
import XMonad.Hooks.StatusBar.PP
-import XMonad.Util.Replace (replace)
+import XMonad.Util.Replace (replace)
xmonadLog :: IO D.Client
xmonadLog = let opts = [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue]
diff --git a/modules/xmonad/xmonad.hs b/modules/xmonad/xmonad.hs
index 6c73454..64e95c9 100644
--- a/modules/xmonad/xmonad.hs
+++ b/modules/xmonad/xmonad.hs
@@ -56,6 +56,8 @@
-- spell-checker:words xobsock
xobsock = "$XDG_RUNTIME_DIR/xob.sock"
+workspaces = ["7", "5", "3", "1", "9", "0", "2", "4", "6", "8"];
+
startupHook = do
spawn Main.statusBar
spawn Main.compositor
@@ -64,6 +66,17 @@
spawn "pgrep keepass || run_keepass"
spawn $ "pkill xob; rm -f " ++ xobsock ++ " && mkfifo " ++ xobsock ++ " && tail -f " ++ xobsock ++ " | xob"
+numRowKeys = [xK_bracketleft
+ , xK_braceleft
+ , xK_braceright
+ , xK_parenleft
+ , xK_equal
+ , xK_asterisk
+ , xK_parenright
+ , xK_plus
+ , xK_bracketright
+ , xK_exclam
+ ]
main :: IO ()
main = XMonadLog.xmonadLog >>= main'
@@ -77,6 +90,7 @@
{ modMask = modifierKey -- Use Super as our mod key
, borderWidth = 0
, XMonad.terminal = Main.terminal
+ , XMonad.workspaces = Main.workspaces
, XMonad.startupHook = Main.startupHook
, XMonad.logHook = dynamicLogWithPP (polybarHook dbus)
, XMonad.layoutHook = avoidStruts
@@ -97,7 +111,7 @@
<+> (ask >>= \w -> liftX (withDisplay $ \dpy -> io (moveResizeWindow dpy w 0 0 (fromIntegral $ displayWidth dpy $ defaultScreen dpy) (fromIntegral $ displayHeight dpy $ defaultScreen dpy))) >> mempty))
]
<+> handleEventHook def
- } `additionalKeys`
+ } `additionalKeys` (
[ ((modifierKey, xK_d), spawn launcher)
, ((modifierKey, xK_n), spawn networkManager)
, ((modifierKey .|. Main.shift, xK_q), kill)
@@ -117,4 +131,6 @@
, ((0, xF86XK_MonBrightnessUp), spawn $ "light -A 6 && light -G | cut -d'.' -f1 > " ++ xobsock)
, ((modifierKey, xF86XK_MonBrightnessDown), spawn $ "light -U 3 && light -G | cut -d'.' -f1 > " ++ xobsock)
, ((modifierKey, xF86XK_MonBrightnessUp), spawn $ "light -A 3 && light -G | cut -d'.' -f1 > " ++ xobsock)
- ]
+ ] ++ (zip numRowKeys Main.workspaces >>= (\(key, workspace) -> [((modifierKey, key), windows $ W.view workspace)
+ , ((modifierKey .|. Main.shift, key), windows $ W.shift workspace)
+ ])))