| **** kmonad
|
|
|
| #+begin_src scheme :noweb-ref module
|
| #:use-module (gnu packages haskell-apps)
|
| #+end_src
|
|
|
| #+begin_src scheme :noweb-ref service
|
| (udev-rules-service
|
| 'kmonad
|
| (file->udev-rule "70-kmonad.rules" (file-append kmonad "/lib/udev/rules.d/70-kmonad.rules")))
|
| #+end_src
|
|
|
|
|
| #+begin_src scheme :tangle systems/base/kmonad.scm
|
| (define-module (systems base kmonad)
|
| #:use-module (guix gexp))
|
|
|
|
|
| (define-public main-config
|
| (mixed-text-file "new.kbd"
|
| "\
|
| (defcfg
|
| input (device-file \"/dev/input/by-path/platform-i8042-serio-0-event-kbd\")
|
| output (uinput-sink \"Canary\")
|
|
|
| allow-cmd true
|
| fallthrough true
|
| )
|
|
|
| (defsrc
|
| grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
| 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
|
| lctl lmet lalt spc ralt rctl
|
| )
|
|
|
| (defalias
|
| ;; touchcursor (tap-next-release spc lctl)
|
| cesc (tap-next-release esc lctl)
|
| shift (layer-toggle shift)
|
| symbols (tap-hold-next-release 200 (around-next (layer-toggle symbols)) ralt)
|
| ;; homerow mods
|
| met_c (tap-hold-next-release 200 c lmet)
|
| alt_r (tap-hold-next-release 200 r lalt)
|
| ctl_s (tap-hold-next-release 200 s lctl)
|
| sft_t (tap-hold-next-release 200 t (layer-toggle shift))
|
|
|
| sft_n (tap-hold-next-release 200 n (layer-toggle shift))
|
| ctl_e (tap-hold-next-release 200 e rctl)
|
| alt_i (tap-hold-next-release 200 i lalt)
|
| met_a (tap-hold-next-release 200 a rmet)
|
| touchcursor (tap-next-release spc (layer-toggle touchcursor))
|
| fwd_w C-right
|
| bck_w C-left
|
| kil_w C-bspc
|
| )
|
|
|
| (deflayer mokshary
|
| ` 1 2 3 4 5 6 7 8 9 0 - = bspc
|
| tab w l y p k z x o u ; [ { $
|
| @cesc @met_c @alt_r @ctl_s @sft_t b f @sft_n @ctl_e @alt_i @met_a ' ret
|
| @shift j v d g q m h / , . bspc
|
| lctl lmet @symbols @touchcursor @symbols rctrl
|
| )
|
| ;;ralt rctrl
|
| (deflayer shift
|
| ~ ! @ # \\ % ^ & * ( ) S-- + bspc
|
| S-tab W L Y P K Z X O U : ] } ?
|
| @cesc C R S T B F N E I A \" ret
|
| lsft J V D G Q M H | < > rsft
|
| lctl lmet lalt @touchcursor @symbols rctrl
|
| )
|
|
|
| (deflayer touchcursor
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ @kil_w
|
| tab _ _ _ _ _ _ _ _ _ _ _ _ _
|
| @cesc _ _ _ _ _ left down up right _ _ ret
|
| @shift _ _ _ _ _ _ _ _ _ _ @shift
|
| lctl lmet @symbols @touchcursor @symbols rctrl
|
| )
|
|
|
| (deflayer symbols
|
| ` ! @ # \\ % ^ & * ( ) - = bspc
|
| tab w l y p k z [ ? @ ; [ { $
|
| @cesc ! @ # \\ % ^ & ( * ) ' ret
|
| @shift j v d g q m h / , . @shift
|
| lctl lmet lalt @touchcursor @symbols rctrl
|
| )"))
|
| #+end_src
|
|
|
| #+begin_src scheme :noweb-ref module
|
| #:use-module ((systems base kmonad)
|
| #:prefix kmonad::)
|
| #+end_src
|
|
|
| #+begin_src scheme :noweb-ref service
|
| (service kmonad-service-type
|
| (kmonad-configuration
|
| (keymaps
|
| (list
|
| kmonad::main-config))))
|
| #+end_src
|