summaryrefslogtreecommitdiff
path: root/hosts/local/master
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2024-09-07 17:10:22 +0700
committerpolwex <polwex@sortug.com>2024-09-07 17:10:22 +0700
commit0a8c8dd3c67a018d9ae6ff87777a3823f0fb40cd (patch)
tree3542c534e87c90bba37754e2291985be76236247 /hosts/local/master
parentc2757fd60b8991639cc1b8a8372a5362f8d214b2 (diff)
m
Diffstat (limited to 'hosts/local/master')
-rw-r--r--hosts/local/master/compx.kbd102
-rw-r--r--hosts/local/master/keyboard.nix6
2 files changed, 106 insertions, 2 deletions
diff --git a/hosts/local/master/compx.kbd b/hosts/local/master/compx.kbd
new file mode 100644
index 0000000..d62fab0
--- /dev/null
+++ b/hosts/local/master/compx.kbd
@@ -0,0 +1,102 @@
+;; one liner comments ';;'
+#| Multiline
+ comments |#
+
+(defcfg ;; For linux & by-id lists pluggable devices
+;; If a key is not bound/left_empty(_) then it will fall back to the previous
+;; layer's binding if not then default.
+fallthrough true
+;; To run system commands. You MIGHT face issues with tiling window managers due to command helpers.
+;; 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-Compx_2.4G_Receiver-event-kbd")
+;;input (device-file "/dev/input/event5")
+;; Not sure what this does. Please check the docs.
+output (uinput-sink "My KMonad output")
+)
+
+;; This is the real representation of your actual keyboard. We haven't started
+;; customizing layouts yet.
+(defsrc
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+ ` 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
+ lctl lmet lalt spc ralt rctl left down right
+)
+;; Aliases
+
+(defalias
+;; Layer toggles
+sym (layer-toggle syms)
+sym2 (layer-toggle syms2)
+cords (sticky-key 1000 (layer-toggle mods))
+;;
+hrt (layer-switch homerowmods)
+back (layer-switch qwerty)
+
+;; Homerow keys
+a (tap-hold-next-release 280 a lctl)
+s (tap-hold-next-release 280 s lalt)
+d (tap-hold-next-release 280 d lmet)
+f (tap-hold-next-release 280 f lsft)
+;;
+j (tap-hold-next-release 280 j rsft)
+k (tap-hold-next-release 280 k lmet)
+l (tap-hold-next-release 280 l lalt)
+semi (tap-hold-next-release 280 ; rctl)
+
+;; button to launch brave browser
+;; veeb (cmd-button "brave")
+;; ssf (sticky-key 500 (layer-toggle rshift))
+;; rsf (layer-toggle rshift)
+)
+
+;; The first custom layer is the one that gets activated when kmonad is started
+(deflayer qwerty ;; The default layer that'd be read when you launch kmonad
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc
+ tab q w e r t y u i o p [ ] \
+ esc a s d f g h j k l ; ' ret
+ @sym z x c v b n m , . / rsft up
+ lctl lmet @sym spc @cords @hrt left down right
+)
+(deflayer homerowmods
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc
+ tab q w e r t y u i o p [ ] \
+ esc @a @s @d @f g h @j @k @l @semi ' ret
+ @sym z x c v b n m , . / rsft up
+ lctl lmet @sym spc lalt @back left down right
+)
+(deflayer mods
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc
+ tab q w e r t y u i o p [ ] h
+ esc lctl lalt lmet lsft g h rsft rmet ralt rctl ' ret
+ @sym z x c v b n m , . / rsft up
+ lctl lmet @sym spc lalt @back left down right
+)
+
+;; A layer dedicated to symbols
+(deflayer syms
+ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ up _ _ ! @ # $ % _ _ _
+ _ _ left down right @sym2 ' ^ & - = _ ret
+ _ _ _ _ _ _ \( [ { < \ _ _
+ _ _ _ _ _ _ _ _ _
+)
+
+
+;; More symbols
+(deflayer syms2
+ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ ` ~ * \_ + _ ret
+ _ _ _ _ _ _ \) ] } > | _ _
+ _ _ _ _ _ _ _ _ _
+)
diff --git a/hosts/local/master/keyboard.nix b/hosts/local/master/keyboard.nix
index 0aa0687..215d05f 100644
--- a/hosts/local/master/keyboard.nix
+++ b/hosts/local/master/keyboard.nix
@@ -32,8 +32,10 @@
enable = true;
keyboards.internal = {
- device = "/dev/input/by-id/usb-RAPOO_Rapoo_2.4G_Wireless_Device-if02-event-kbd";
- config = builtins.readFile ./rapoo.kbd;
+ device = "/dev/input/by-id/usb-Compx_2.4G_Receiver-event-kbd";
+ config = builtins.readFile ./compx.kbd;
+ # device = "/dev/input/by-id/usb-RAPOO_Rapoo_2.4G_Wireless_Device-if02-event-kbd";
+ # config = builtins.readFile ./rapoo.kbd;
# defcfg = {
# enable = true;