2022-04-04 01:10:26 +02:00
|
|
|
(defcfg
|
|
|
|
;; For Linux
|
2022-04-05 19:42:32 +02:00
|
|
|
;; input (device-file "$DEVICE") ;; gets dynamically replaced by nix
|
2022-08-16 10:31:45 +02:00
|
|
|
;; input (device-file "/dev/input/by-path/pci-0000:00:14.0-usb-0:5:1.0-event-kbd")
|
|
|
|
input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
|
2022-04-04 01:10:26 +02:00
|
|
|
output (uinput-sink "My KMonad output"
|
|
|
|
;; To understand the importance of the following line, see the section on
|
|
|
|
;; Compose-key sequences at the near-bottom of this file.
|
2022-04-06 22:19:19 +02:00
|
|
|
"/run/current-system/sw/bin/sleep 1 && /run/current-system/sw/bin/setxkbmap -option compose:ralt")
|
2022-04-04 01:10:26 +02:00
|
|
|
cmp-seq ralt ;; Set the compose key to `RightAlt'
|
|
|
|
cmp-seq-delay 5 ;; 5ms delay between each compose-key sequence press
|
|
|
|
|
|
|
|
;; Comment this is you want unhandled events not to be emitted
|
|
|
|
fallthrough true
|
|
|
|
|
|
|
|
;; Set this to false to disable any command-execution in KMonad
|
|
|
|
allow-cmd false
|
|
|
|
)
|
|
|
|
|
2022-09-18 01:00:32 +02:00
|
|
|
;; Layer template:
|
2022-04-04 01:10:26 +02:00
|
|
|
#|
|
|
|
|
(deflayer qwerty
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _
|
|
|
|
)
|
|
|
|
|#
|
|
|
|
|
|
|
|
(defalias
|
|
|
|
ga #(ralt a h) ;; alpha
|
|
|
|
gb #(ralt b h) ;; beta
|
|
|
|
gg #(ralt g h) ;; gamma
|
|
|
|
ge #(ralt e h) ;; epsilon
|
|
|
|
gt #(ralt t h) ;; tau
|
|
|
|
gl #(ralt l h) ;; lambda
|
|
|
|
gm #(ralt m h) ;; miu
|
|
|
|
gp #(ralt p h) ;; pi
|
|
|
|
gx #(ralt x h) ;; xi
|
|
|
|
gs #(ralt s h) ;; sigma
|
|
|
|
go #(ralt o h) ;; omega
|
|
|
|
gu #(ralt u h) ;; uspilon
|
2022-09-09 00:16:11 +02:00
|
|
|
gd #(ralt d h) ;; delta
|
2022-04-04 01:10:26 +02:00
|
|
|
|
|
|
|
gph #(ralt l p h h) ;; phi
|
|
|
|
gth #(ralt l t h h) ;; theta
|
|
|
|
gps #(ralt l p s h) ;; psi
|
|
|
|
|
|
|
|
Gu #(ralt u j) ;; UPSILON
|
|
|
|
Gg #(ralt g j) ;; GAMMA
|
|
|
|
Gd #(ralt d j) ;; DELTAJ
|
|
|
|
Gp #(ralt p j) ;; PI
|
|
|
|
Gs #(ralt s j) ;; SIGMA
|
|
|
|
Go #(ralt o j) ;; OMEGA
|
|
|
|
Gx #(ralt x j) ;; XI
|
|
|
|
|
|
|
|
neg #(ralt l -) ;; ¬
|
|
|
|
fal #(ralt l v) ;; ∀
|
|
|
|
ex #(ralt l e) ;; ∃
|
|
|
|
lar #(ralt < -) ;; ←
|
|
|
|
rar #(ralt - >) ;; →
|
2022-04-05 19:42:32 +02:00
|
|
|
and #(ralt l c) ;; and symbol
|
|
|
|
or #(ralt l d) ;; or symbol
|
|
|
|
eq #(ralt e q) ;; Equivalence
|
2022-04-04 01:10:26 +02:00
|
|
|
|
|
|
|
alp #(ralt f \( ) ;; angled left parenthesis
|
|
|
|
arp #(ralt f \) ) ;; angled right parenthesis
|
|
|
|
|
|
|
|
shrugFace #(ralt l s h r) ;; shrug face
|
|
|
|
topBar #(ralt t -) ;; ¯
|
2022-04-05 19:42:32 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
;; layers
|
|
|
|
(defalias
|
|
|
|
mth (layer-toggle math)
|
|
|
|
Mth (layer-toggle capital-math)
|
2022-04-06 22:19:19 +02:00
|
|
|
mov (layer-toggle movement)
|
2022-04-05 19:42:32 +02:00
|
|
|
mathExtra (layer-toggle math-extra)
|
2022-04-10 23:26:44 +02:00
|
|
|
sft (tap-macro lsft (layer-toggle shiftedQwerty)) ;; make this work differently based on the next key pressed
|
2022-05-11 19:08:21 +02:00
|
|
|
j (tap-macro 7 lsft)
|
2022-09-18 01:00:32 +02:00
|
|
|
;; spc (spc) ;; (tap-hold-next-release 130 spc lsft)
|
2022-04-05 19:42:32 +02:00
|
|
|
)
|
2022-04-04 01:10:26 +02:00
|
|
|
|
2022-04-05 19:42:32 +02:00
|
|
|
;; more "special" stuff
|
|
|
|
(defalias
|
2022-04-04 01:10:26 +02:00
|
|
|
shr #(@topBar \ \_ \_ \( @shrugFace \) \_ / @topBar) ;; ¯\_(ツ)_/¯
|
2022-04-05 19:42:32 +02:00
|
|
|
|
2022-04-10 23:26:44 +02:00
|
|
|
ml @gl
|
2022-04-04 01:10:26 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
(defsrc
|
|
|
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 del
|
|
|
|
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 lsgt lmet lalt spc ralt rctl
|
|
|
|
)
|
|
|
|
|
|
|
|
(deflayer qwerty
|
|
|
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 del
|
2022-09-18 01:00:32 +02:00
|
|
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
2022-04-04 01:10:26 +02:00
|
|
|
tab q w e r t y u i o p [ ] \
|
|
|
|
@mth a s d f g h j k l ; ' ret
|
2022-04-10 23:26:44 +02:00
|
|
|
@sft z x c v b n m , . / rsft
|
2022-09-18 01:00:32 +02:00
|
|
|
@mov lsgt lmet lalt spc ralt rctl
|
2022-04-06 22:19:19 +02:00
|
|
|
)
|
|
|
|
|
2022-04-10 23:26:44 +02:00
|
|
|
(deflayer shiftedQwerty
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ ! @ # $ % ^ & 8 \( \) _ + S-bspc
|
|
|
|
S-tab Q W E R T Y U I O P { } |
|
|
|
|
@Mth A S D F G H J K L : " S-ret
|
|
|
|
XX Z X C V B N M < > ? _
|
2022-09-18 01:00:32 +02:00
|
|
|
_ _ _ _ spc S-ralt S-rctl
|
2022-04-10 23:26:44 +02:00
|
|
|
)
|
|
|
|
|
2022-04-06 22:19:19 +02:00
|
|
|
(deflayer movement
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ lft down up rght _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _
|
2022-04-04 01:10:26 +02:00
|
|
|
)
|
|
|
|
|
2022-04-05 19:42:32 +02:00
|
|
|
(deflayer math-extra
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ @eq _ _ _ _ _ @or _ _ _ _
|
|
|
|
_ @and _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _
|
2022-04-04 01:10:26 +02:00
|
|
|
_ _ _ _ _ _ _
|
|
|
|
)
|
|
|
|
|
2022-04-10 23:26:44 +02:00
|
|
|
(deflayer math
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ @ex _ _ _ _ _ @alp @arp @neg _ _
|
|
|
|
_ @shr @go @ge _ @gt _ @gu _ @go @gp _ _ _
|
2022-09-09 00:16:11 +02:00
|
|
|
_ @ga @gs @gd _ @gg @gth @gps @gph @ml _ _ _
|
2022-04-10 23:26:44 +02:00
|
|
|
@Mth _ @gx _ @fal @gb _ @gm @lar @rar _ _
|
|
|
|
_ _ _ _ @mathExtra _ _
|
|
|
|
)
|
|
|
|
|
2022-04-04 01:10:26 +02:00
|
|
|
(deflayer capital-math
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _ @Gu _ @Go @Gp _ _ _
|
|
|
|
_ _ @Gs @Gd _ @Gg _ _ _ _ _ _ _
|
|
|
|
_ _ @Gx _ _ _ _ _ _ _ _ _
|
|
|
|
_ _ _ _ _ _ _
|
|
|
|
)
|