aboutsummaryrefslogtreecommitdiff
path: root/.config/apple_laptop.kbd
blob: 543135d310f7e82f821261a655fb8db8015ea6ca (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
(defcfg
  input  (device-file "/dev/input/by-path/pci-0000:00:1d.0-usb-0:1.8.2:1.0-event-kbd")
  output (uinput-sink "kmonad"
  "/run/current-system/sw/bin/sleep 1 && /run/current-system/sw/bin/setxkbmap -option compose:ralt")
  fallthrough true
  allow-cmd true
)

(defalias
   ;; home row mods
   a_alt  (tap-hold-next-release 170 a lalt)
   s_gui  (tap-hold-next-release 170 s lmet)
   d_ctl  (tap-hold-next-release 170 d lctl)
   f_sft  (tap-hold-next-release 170 f lsft)
   j_sft  (tap-hold-next-release 170 j rsft)
   k_ctl  (tap-hold-next-release 170 k rctl)
   l_gui  (tap-hold-next-release 170 l rmet)
   ;_alt  (tap-hold-next-release 170 ; ralt)

   ;; layers
   tgnum  (layer-toggle num)
   gaming (layer-switch game)
   def    (layer-switch default)
   lt1    (tap-hold 150 spc @tgnum)
   ;; pseudo combo behaviour
   rr     (tap-hold-next 40 r (layer-toggle r_ent) :timeout-button r)
   uu     (tap-hold-next 40 u (layer-toggle u_ent) :timeout-button u)
   clipst C-S-v
)

;; base layer (don't touch this)
(defsrc
  esc  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 up
  p    lctl lalt lmet           spc            rmet ralt left down rght
)

(deflayer default
  esc  brdn   brup    f3     f4      bldn blup prev   pp      next    mute   vold volu
  grv  1      2       3      4       5    6    7      8       9       0      -    =    bspc
  tab  q      w       e      @rr     t    y    @uu    i       o       p      [    ]    \
  caps @a_alt @s_gui  @d_ctl @f_sft  g    h    @j_sft @k_ctl  @l_gui  @;_alt '    ret
  lsft z      x       c      v       b    n    m      ,       .       /      rsft  up
  p    lctl   lalt    esc                 @lt1                     @clipst @gaming left down rght
)

(deflayer game
  esc  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 up
  p    lctl lalt lmet           spc            rmet @def left down rght
)

(deflayer num
  _ _ _ _ _ _ _ _ _ _ _ _ _
  _ _ _ _ _ _ _ _ _ _ _ _ _ _
  _ 1 2 3 4 5 6 7 8 9 0 _ _ _
  _ ! @ # $ % ^ & * \( \)  _ _
  _ _ tab caps ~ grv left down up rght rctl _ _
  _ _ _ _ _ _ _ _ _ _
)

(deflayer r_ent
  esc  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    ret  i    o    p    [    ]    \
  caps a    s    d    f    g    h    j    k    l    ;    '    ret
  lsft z    x    c    v    b    n    m    ,    .    /    rsft up
  p    lctl lalt lmet           spc            rmet ralt left down rght
)

(deflayer u_ent
  esc  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    ret  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 up
  p    lctl lalt lmet           spc            rmet ralt left down rght
)