Paste #262602

   
pasted on 13.06.2022 08:37
  • Edit to this paste
  • Print
  • Raw
  • Compare with paste
    #  
  • Toggle line numbers
  • Syntax highlighting  
Text paste
  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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#|
<hardware-layout>

!!! Keycap layout and colors
----------------------------

(keycap
  navigation      _                 _
  _               qwerty            _
  shifted         _                 compute
  _               _                 _
)

(colors
  #bb1010   #000000   #000000
  #000000   #000000   #000000
  #0000ff   #000000   #237029
  #2327aa   #000000   #222222
)

!!! Custom options per key (Optional)
!!! Options are based on `defsrc` (a.k.a. Layer 0) keys
-------------------------------------------------------

(options f9 {x:1})

(options 6 {x:7})
(options y {x:7})
(options h {x:7})
(options n {x:7})

(options grv {x:1})
(options lctl {x:3})
(options home {x:4})
(options bspc {x:2})

(options up {x:9})
(options rmet {x:9})
(options pgup {x:9})
(options pgdn {x:9})

!!! Override or assign labels (Optional)
----------------------------------------

(label @nav F/red)
(label @_bs ⌫/⇧)
(label @_de Del/⎈)
(label @_re ↵/◆)
(label @som ⎵/⇧)
(label @_en 𝅘𝅥𝅮)
(label @lsr ins/rsft)
(label @lsl lsft)
(label @_sp spc/green)
(label @_Ss _)

(label S-9 \()
(label S-0 ))
(label S-1 !)
(label S-2 @)
(label S-3 #)
(label S-4 $)
(label S-5 %)
(label S-6 ^)
(label S-7 &)
(label S-8 *)
(label S-grv ~)
(label S-= +)
(label S-[ {)
(label S-] })

!!! Add some notes (Optional)
-----------------------------

;; (description

</hardware-layout>
|#

(defcfg
  ;; Linux
  ;; input  (device-file "/dev/input/by-id/usb-Kinesis_Advantage2_Keyboard_314159265359-if01-event-kbd")
  input  (device-file "/dev/input/by-id/usb-HID_Technologies_Bastyl-event-kbd")
  output (uinput-sink "KMonad output")

  fallthrough true
)



(defsrc
  esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12        prnt slck sys f17 f18

  =    1    2    3    4    5    6    7    8    9    0    -
  tab  q    w    e    r    t    y    u    i    o    p    \
  caps a    s    d    f    g    h    j    k    l    ;    '
  lsft z    x    c    v    b    n    m    ,    .    /    rsft
       grv  f14  lft  rght                up   down [    ]

                 lctl lalt                rmet rctl
                      home                pgup
            bspc del  lalt                ralt ret spc
)


(defalias
  nav  (tap-hold-next 180 f (layer-toggle navigation))
  mus  (tap-hold-next 180 end (layer-toggle music))

  ;; left thumb
  ctl (tap-hold-next 180 bspc lctl)
  md1 (tap-hold-next 180 del  rmet)
  md2 (around rmet (layer-toggle compute))

  ;; _dx (tap-hold-next 180 lalt S-rmet)

  ;; right thumb
  alt (tap-hold-next 180 ret  alt)
  num (tap-hold-next 180 spc  (layer-toggle compute))

  ;; shift () ins
  lsl (tap-hold-next 180 S-9  (around lsft (layer-toggle shifted)))
  lsr (tap-hold-next 180 S-0  (around rsft (layer-toggle shifted))) ;; TODO -
)


  ;; esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12        prnt slck sys _   _
  ;; -    1    2    3    4    5    6    7    8    9    0    =
  ;;   grv  _    lft  rght                up   down [    ]

(deflayer qwerty
  XX   f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12        prnt slck sys _   _

  XX   XX   XX   XX   XX   XX   XX   XX   XX   XX   XX   XX
  tab  q    w    e    r    t    y    u    i    o    p    \\
  esc  a    s    d    @nav g    h    j    k    l    ;    '
  @lsl z    x    c    v    b    n    m    ,    .    /    @lsr
       XX   XX   XX   XX                  XX   XX   XX   XX

                 _    _                   _    @mus
                      _                   _   
            @ctl @md1 @md2                _    @alt @num
)

(deflayer compute
  _    _    _    _    _    _    _    _    _    _    _    _    _          _    _    _   _   _

  _    _    _    _    _    _    _    _    _    _    _    _
  S--  S-1  S-2  S-3  S-4  S-5  S-6  S-7  S-8  grv  S-grv =
  -    1    2    3    4    5    6    7    8    9    0    S-=
  S-9  _    _    [    ]    _    _    S-[  S-]  .    _    S-0    ;; TODO: space+, should yield ,
       _    _    _    _                   _    _    _    _

                 _    _                   _    _
                      _                   _   
            _    _    _                   _    _    _
)

(deflayer navigation
  _    _    _    _    _    _    _    _    _    _    _    _    _          _    _    _   _   _

  _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    home pgdn pgup end  _    _
  _    _    _    _    _    _    lft  down up   rght _    _
  _    _    _    _    _    _    _    _    _    _    _    _
       _    _    _    _                   _    _    _    _

                 _    _                   _    _
                      _                   _   
            _    _    _                   _    _   _
)

(deflayer music
  _    _    _    _    _    _    _    _    _    _    _    _    _          _    _    _   _   _

  _    _    _    _    _    _    _    M-kp7  M-kp8  M-kp9 _    _
  _    _    _    _    _    _    _    kp7  kp8  kp9  _    _
  _    _    _    _    _    _    _    kp4  kp5  kp6  _    _
  _    _    _    _    _    _    kp0  kp1  kp2  kp3  _    _
       _    _    _    _                   _    _    _    _

                 _    _                   _    _
                      _                   _   
            _    _    _                   _    _   _
)

(deflayer shifted
  _    _    _    _    _    _    _    _    _    _    _    _    _          _    _    _   _   _

  _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    ins
       _    _    _    _                   _    _    _    _

                 _    _                   _    _
                      _                   _   
            _    _    _                   _    _    -
)
Add Comment
Author