#|
(deflayer name
 _    _    _    _    _    _    _    _    _    _    _    _    _
 _    _    _    _    _    _    _    _    _    _    _    _    _    _     _    _    _
 _    _    _    _    _    _    _    _    _    _    _    _    _    _     _    _    _
 _    _    _    _    _    _    _    _    _    _    _    _    _
 _    _    _    _    _    _    _    _    _    _    _    _    _               _
 _    _    _              _                   _    _    _    _          _    _    _
 )

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


(defcfg
 input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
 output (uinput-sink "KMonad")
 fallthrough true
 allow-cmd true
 )

(defsrc
 esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12        ssrq slck pause
 grv  1    2    3    4    5    6    7    8    9    0    -    =    bspc  ins  home pgup
 tab  q    w    e    r    t    y    u    i    o    p    [    ]    ret   del  end  pgdn
 caps a    s    d    f    g    h    j    k    l    ;    '    \
 lsft 102d z    x    c    v    b    n    m    ,    .    -    rsft            up
 lctl lmet lalt           spc                 ralt rctl cmp  rctl       left down rght
 )

(deflayer base
 esc    f1     f2     f3     f4     f5     f6     f7     f8     f9     f10    f11   f12            ssrq   slck   pause
 grv    1      2      3      4      5      6      7      8      9      0      -     =      bspc    ins    home   pgup
 @tab   q      w      e      r      t      y      u      i      o      p      [     +      ret     del    end    pgdn
 @cps   a      s      d      f      g      h      j      k      l      ;      '     \
 lsft   102d   z      x      c      v      b      n      m      ,      .      /     rsft                  up
 lctl   lmet   lalt                 spc                         ralt   ralt   cmp   rctl           left   down   rght
 )

(defalias
  cps   (tap-hold-next-release 200 esc (layer-toggle symbols))
  tab   (tap-hold-next-release 200 tab (layer-toggle umls))
  s-sft (tap-hold-next-release 150 s lsft)
  l-sft (tap-hold-next-release 150 l lsft)

  uml-a #(ralt " a)
  uml-o #(ralt " o)
  uml-u #(ralt " u)
  uml-s #(ralt s s)
  excl (around lsft 1)
)





(deflayer symbols
_      _      _      _      _      _      _      _      _      _      _      _      _              _      _      _
_      _      _      _      _      _      _      _      _      _      _      _      _      _       _      _      _
_      _      @excl  "      /      \\     _      {      [      ]      }      _      *      _       _      _      _
_      home   $      \(     \)     end    left   down   up     right  &      %      _
_      _      |      delete ?      ~      _      =      #      bspc   _      #(~ /) _                     _
_      _      _                    _                           _      _      _      _              _      _      _
)

(deflayer umls
 _      _      _      _      _      _      _      _      _      _      _      _      _          _    _    _
 _      _      _      _      _      _      _      _      _      _      _      _      _    _     _    _    _
 _      _      _      _      _      _      _      @uml-u _      @uml-o _      _      _    _     _    _    _
 _      @uml-a @uml-s _      _      _      _      _      _      _      _      _      _
 _      _      _      _      _      _      _      _      _      _      _      _      _               _
 _      _      _                    _                           _      _      _      _          _    _    _
 )
