;; vim:foldmethod=marker

(defcfg ;;{{{1
  process-unmapped-keys yes
)

(defsrc ;;{{{1
      f1   f2   f3   f4   f5   f6   f7   f8   f9  f10  f11  f12
  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 rmet rctl
)

(deflayer default ;;{{{1
    brdn brup bldn blup   f5   f6   prev  pp    next  mute  vold  volu
  grv  1    2    3    4    5    6    7    8    9    0    -    =    bspc
  tab  q    w    e    r    t    y    u    i    o    p    [    ]    \
  @cap a    s    d    f    g    h    j    k    l    ;    '    ret
  lsft z    x    c    v    b    n    m    ,    .    /    rsft
  lctl lmet lalt         @shsp           @gmng rmet rctl
)

(deflayer gaming ;;{{{1
      f1   f2   f3   f4   f5   f6   f7   f8   f9  f10  f11  f12
  esc  1    2    3    4    5    6    7    8    9    0    -    =    bspc
  tab  q    w    e    r    t    y    u    i    o    p    [    ]    \
  XX   a    s    d    f    g    h    j    k    l    ;    '    ret
  lsft z    x    c    v    b    n    m    ,    .    /    rsft
  lctl lmet lalt           spc           @dflt rmet rctl
)

(deflayer symbols ;;{{{1
      f1   f2   f3   f4   f5   f6   f7   f8   f9  f10  f11  f12
  grv @1   @2   @3   @4   @5   @6   @7   @8   @9   @0    _    _    bspc
  tab  @`  @m[  @m]  @&   @|   @^   @_   @m-  @+   @m= @nor   _    lrld
  @cap @~  @bl  @br  @*   @m\  bspc ret  @?   tab  @:   S-'   ret
  lsft @!  @{   @}   @$   @%   @at  @#   @<   @>   @m=   rsft
  lctl lmet lalt         @lasp            ralt rmet rctl
)

(defalias ;;{{{1
  gmng (layer-switch gaming)
  dflt (layer-switch default)

  cap (tap-hold-press 0 200 esc lctl)
  lasp (tap-hold-press 0 200 spc (layer-while-held symbols))
  shsp (tap-hold-press 0 200 spc lsft)
  bl S-9
  br S-0
  { (macro S-[)
  } (macro S-])
  m[ (macro [)
  m] (macro ])
  < S-,
  > S-.
  : S-;
  % S-5
  ! S-1
  ` grv
  ~ S-grv
  * S-8
  & S-7
  | (macro S-\)
  m\ (macro \)
  ^ S-6
  _ (macro S--)
  m- (macro -)
  + (macro S-=)
  m= (macro =)
  $ (macro S-4)
  # (macro S-3)
  at (macro S-2)
  ? (macro S-/)

  nor (tap-dance 200 (A-' A-o A-a))
  
  1 (tap-hold-press 0 200 1 lsft)
  2 (tap-hold-press 0 200 2 lsft)
  3 (tap-hold-press 0 200 3 lsft)
  4 (tap-hold-press 0 200 4 lsft)
  5 (tap-hold-press 0 200 5 lsft)
  6 (tap-hold-press 0 200 6 lsft)
  7 (tap-hold-press 0 200 7 lsft)
  8 (tap-hold-press 0 200 8 lsft)
  9 (tap-hold-press 0 200 9 lsft)
  0 (tap-hold-press 0 200 0 lsft)
)
