Last active
December 2, 2022 23:16
-
-
Save jtsagata/c51cb8c45208dfddddbe6507ae7b7df1 to your computer and use it in GitHub Desktop.
Kmonad Keyboard konfiguration for Logiling ID0181
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; https://github.com/kmonad/kmonad | |
;; https://www.e-shop.gr/logilink-id0181-illuminated-one-hand-gaming-keyboard-black-p-PER.758597 | |
;; INTRO to kmonad lisp and config | |
;; WARNING: Don't use anyone's config without any understanding of kmonad or | |
;; it's configuration. Don't even use mine but use it to understand how it | |
;; works | |
(defcfg | |
fallthrough true | |
allow-cmd true | |
;; use 'ls /dev/input/by-id/' for detachable keyboards and | |
;; 'ls /dev/input/by-path/' for builtin keyboards location' | |
input (device-file "/dev/input/by-id/usb-Gaming_KB_Gaming_KB-event-kbd") | |
output (uinput-sink "LogiLink") | |
) | |
(defsrc | |
esc f1 f2 f3 f4 f5 | |
` 1 2 3 4 5 6 | |
tab q w e r t | |
caps a s d f g | |
lsft 102d z x c v b | |
lctl lalt spc | |
) | |
;; (defalias pop (layer-switch popos)) | |
;; (defalias vt (layer-switch normal)) | |
(defalias | |
pop (around | |
(cmd-button "beep -f2000 -l100") | |
(layer-switch popos)) | |
;; vt (around (cmd-button "beep -f2000 -l50") | |
;; (layer-switch normal)) | |
lotro (around (cmd-button "beep -f2000 -l200") | |
(layer-switch lotro)) | |
) | |
;; (deflayer normal | |
;; _ @pop @lotro _ _ _ | |
;; _ _ _ _ _ _ _ | |
;; _ _ _ _ _ _ | |
;; _ _ _ _ _ _ | |
;; _ _ _ _ _ _ _ | |
;; _ _ _ | |
;; ) | |
(defalias float M-g) ;; Toogle floating mode | |
(defalias tile M-y) ;; Toggle tilling mode | |
(defalias stack M-s) ;; Toggle stacking mode | |
(defalias max M-m) ;; Toggle maximize mode | |
(defalias orient M-o) ;; Change Window Orientation | |
(defalias launch M-/) ;; THE LAUNCHER | |
(defalias wup M-C-k) ;; Workspace Up | |
(defalias wdown M-C-j) ;; Workspace Down | |
(defalias quit (tap-hold 500 XX M-q)) ;; Close Window | |
(defalias move (around lmet lsft)) ;; Move Mode (up/down workspace left/right monitor) | |
(defalias adjust (around lmet ret)) ;; Enter Adjustment mode | |
(defalias cpy C-c pst C-v cut C-x) ;; Cut, Copy, Paste | |
(defalias XX (cmd-button "beep -f500 -l50")) | |
(defalias mloc (cmd-button "mouse-locator")) | |
(defalias popcmd (layer-toggle popos-cmds)) | |
(deflayer popos | |
esc @pop @lotro _ VolumeDown VolumeUp | |
@launch @tile @stack @float @orient @max Mute | |
@adjust @quit k @XX @XX @XX | |
lctl h j l @XX @wup | |
lsft @mloc @XX @cut @cpy @pst @wdown | |
@popcmd @move ret | |
) | |
(defalias calc (cmd-button "gnome-calculator")) | |
(defalias monit (cmd-button "gnome-system-monitor")) | |
(defalias logs (cmd-button "gnome-logs")) | |
(defalias sudo #(s u d o spc)) | |
(defalias mon123 (cmd-button "~/.screenlayout/mon123.sh")) | |
(defalias mon12 (cmd-button "~/.screenlayout/mon12.sh")) | |
(defalias mon23 (cmd-button "~/.screenlayout/mon23.sh")) | |
(defalias mon2 (cmd-button "~/.screenlayout/mon2.sh")) | |
(deflayer popos-cmds | |
_ @monit @logs _ _ Power | |
_ @mon2 @mon123 @mon12 @mon23 _ M-h | |
_ _ _ _ _ M-t | |
_ _ @sudo _ M-b _ | |
_ _ _ _ @calc _ _ | |
_ _ _ | |
) | |
(defalias lotroA (layer-switch lotro)) | |
(defalias lotroB (layer-switch lotroB)) | |
(defalias lotroC (layer-switch lotroC)) | |
(deflayer lotro | |
@pop tab f _ bspc numlock | |
f 1 2 3 5 5 6 | |
7 8 9 0 - = | |
C-1 C-2 C-3 C-4 C-5 C-6 | |
x C-7 C-8 C-9 C-0 C-- C-= | |
@lotroA @lotroB @lotroC | |
) | |
;; TODO TAB | |
(deflayer lotroB | |
@pop tab f _ bspc numlock | |
tab S-1 S-2 S-3 S-4 S-5 S-6 | |
A-7 S-8 S-9 S-0 S-- S-= | |
A-1 A-2 A-3 A-4 A-5 A-6 | |
x A-7 A-8 A-9 A-0 A-- A-= | |
@lotroA @lotroB @lotroC | |
) | |
(defalias att1 #(1 P100 2 P100 3 P100 C-1 P100 C-2 P100 C-2 )) | |
(deflayer lotroC | |
@pop tab f _ bspc numlock | |
tab @att1 _ _ _ _ _ | |
_ _ _ _ _ _ | |
_ _ _ _ _ _ | |
x _ _ _ _ _ _ | |
@lotroA @lotroB @lotroC | |
) | |
;; (deflayer template | |
;; _ _ _ _ _ _ | |
;; _ _ _ _ _ _ _ | |
;; _ _ _ _ _ _ | |
;; _ _ _ _ _ _ | |
;; _ _ _ _ _ _ _ | |
;; _ _ _ | |
;; ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment