summaryrefslogtreecommitdiff
path: root/.config/keybs/kmonad.kbd
blob: 17ff613bc1c5b2701380bc5bd981b67d28ad8af7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#| --------------------------------------------------------------------------

(deflayer name
_    _    _    _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _     _
  _    _    _    _    _    _    _    _    _    _    _    _    _     _
  _    _    _    _    _    _    _    _    _    _    _    _          _
  _    _    _    _    _    _    _    _    _    _    _               _
  _    _    _    _              _              _    _    _     _    _    _
                                                               _    _    _
)

  -------------------------------------------------------------------------- |#

(defcfg
  ;; For Linux
  input  (device-file "/dev/input/event3")
  output (uinput-sink "KMonad laptop"
    "/sbin/sleep 1 && /sbin/setxkbmap -option compose:ralt")
  cmp-seq ralt    ;; Set the compose key to `RightAlt'
  cmp-seq-delay 5 ;; 5ms delay between each compose-key sequence press

  fallthrough true

  allow-cmd true
)

(defalias
  ;; layer switches
  nav (layer-toggle navigation)
  num (sticky-key 500 (layer-toggle numbers))
  qwe (layer-switch qwerty)
  cdh (layer-switch colemakdh)
  msf (tap-hold-next-release 200
            (around-next-timeout 500 (around (layer-toggle shifted) lsft) XX)
            lsft)

  ;; home row mods
  hrt (tap-hold-next-release 200 t lmet)
  hrn (tap-hold-next-release 200 n lmet)
  hrs (tap-hold-next-release 200 s lctl)
  hre (tap-hold-next-release 200 e lctl)
  hrr (tap-hold-next-release 200 r lalt)
  hri (tap-hold-next-release 200 i lalt)
  hra (tap-hold-next-release 200 a @nav)
  mes (tap-hold-next-release 200 esc lsft)

  hrT (tap-hold-next-release 200 T lmet)
  hrN (tap-hold-next-release 200 N lmet)
  hrS (tap-hold-next-release 200 S lctl)
  hrE (tap-hold-next-release 200 E lctl)
  hrR (tap-hold-next-release 200 R lalt)
  hrI (tap-hold-next-release 200 I lalt)

  meq (tap-hold-next-release 200 = lmet)

  pop (tap-hold-next-release 200 \( lctl)
  pcl (tap-hold-next-release 200 \) lsft)
  cop (tap-hold-next-release 200 {  lalt)
)

(defsrc
esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12  home end  ins  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
  wkup lctl lmet lalt           spc            ralt sys  rctl  pgup up   pgdn
                                                               left down rght
)

(deflayer colemakdh
esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12  home end  @qwe del
  grv  1    2    3    4    5    6    7    8    9    0    -     =    bspc
  tab  q    w    f    p    b    j    l    u    y    ;    [     ]    \
  esc  @hra @hrr @hrs @hrt g    m    @hrn @hre @hri o    '          ret
  @msf x    c    d    v    z    k    h    ,    .    /               @msf
  wkup lctl lmet lalt           spc            @num sys  rctl  pgdn up   pgup
                                                               left down rght
)

(deflayer shifted
_    _    _    _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _     _
  _    _    _    _    _    _    _    _    _    _    _    _    _     _
  _    A    @hrR @hrS @hrT _    _    @hrN @hrE @hrI _    _          _
  _    _    _    _    _    _    _    _    _    _    _               _
  _    _    _    _              _              _    _    _     _    _    _
                                                               _    _    _
)

(deflayer navigation
_    _    _    _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _     _
  _    _    _    _    _    _    _    _    pgdn pgup _    _    _     _
  _    _    @cop @pop @pcl _    _    left down up   rght bspc       _
  _    _    [    ]    }    _    _    home end  _    _               _
  _    _    _    _              _              _    _    _     _    _    _
                                                               _    _    _
)

(deflayer numbers
_    _    _    _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _     _
  _    _    4    5    6    |    _    _    <    >    *    _    _     _
  spc  tab  1    2    3    ^    _    @meq ,    .    /    _          _
  _    7    8    9    ~    _    _    \_   -    +    _               _
  _    _    _    _              0              _    _    _     _    _    _
                                                               _    _    _
)

(deflayer qwerty
esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12  home end  @cdh 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
  wkup lctl lmet lalt           spc            ralt sys  rctl  pgup up   pgdn
  left down rght
)