summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--_linux/.Xmodmap7
-rw-r--r--_linux/README.md21
-rw-r--r--_linux/sxhkdrc8
-rw-r--r--kanata/kanata.kbd49
5 files changed, 52 insertions, 34 deletions
diff --git a/README.md b/README.md
index 2528b8a..ec9000d 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,7 @@ config stuff (i need to move everything into one place)
* `~/.ideavimrc` -> `./idea/.ideavimrc`
* `$XDG_CONFIG_HOME/espanso` -> `./espanso`
* `$XDG_CONFIG_HOME/nvim` -> `./nvim`
+* `$XDG_CONFIG_HOME/kanata` -> `./kanata`
# other config
* `~/.gitconfig`
diff --git a/_linux/.Xmodmap b/_linux/.Xmodmap
deleted file mode 100644
index fea84dd..0000000
--- a/_linux/.Xmodmap
+++ /dev/null
@@ -1,7 +0,0 @@
-clear lock
-keycode 66 = Hyper_L
-
-remove mod4 = Hyper_L
-add mod3 = Hyper_L
-
-keycode any = Caps_Lock
diff --git a/_linux/README.md b/_linux/README.md
index 93aa819..57910f6 100644
--- a/_linux/README.md
+++ b/_linux/README.md
@@ -2,23 +2,6 @@
* `sudo apt install sxhkd` xdd
# links
-* `~/.config/sxhkd/sxhkdrc` -> `./sxhkdrc`
-* `~/.Xmodmap` -> `./.Xmodmap`
* `~/.tmux.conf` -> `./.tmux.conf`
-
-# .xprofile
-```
-# idfk anymore
-setxkbmap -layout pl
-
-xmodmap /home/kkard2/.Xmodmap
-
-# yes, 200 is 200ms, this solution is very stupid
-xcape -e 'Hyper_L=Escape' -t 200
-
-sxhkd &
-
-google-drive-ocamlfuse /home/kkard2/GoogleDrive
-
-~/.fehbg &
-```
+* `$XDG_CONFIG_HOME/i3` -> `./i3`
+* `$XDG_CONFIG_HOME/i3status` -> `./i3status`
diff --git a/_linux/sxhkdrc b/_linux/sxhkdrc
deleted file mode 100644
index fe1cd0f..0000000
--- a/_linux/sxhkdrc
+++ /dev/null
@@ -1,8 +0,0 @@
-hyper + h
- xdotool keyup h key --clearmodifiers Left
-hyper + j
- xdotool keyup j key --clearmodifiers Down
-hyper + k
- xdotool keyup k key --clearmodifiers Up
-hyper + l
- xdotool keyup l key --clearmodifiers Right
diff --git a/kanata/kanata.kbd b/kanata/kanata.kbd
new file mode 100644
index 0000000..b559d14
--- /dev/null
+++ b/kanata/kanata.kbd
@@ -0,0 +1,49 @@
+#|
+This minimal config changes Caps Lock to act as Caps Lock on quick tap, but
+if held, it will act as Left Ctrl. It also changes the backtick/grave key to
+act as backtick/grave on quick tap, but change ijkl keys to arrow keys on hold.
+
+This text between the two pipe+octothorpe sequences is a multi-line comment.
+|#
+
+;; Text after double-semicolons are single-line comments.
+
+#|
+One defcfg entry may be added, which is used for configuration key-pairs. These
+configurations change kanata's behaviour at a more global level than the other
+configuration entries.
+|#
+
+(defcfg
+ #|
+ This configuration will process all keys pressed inside of kanata, even if
+ they are not mapped in defsrc. This is so that certain actions can activate
+ at the right time for certain input sequences. By default, unmapped keys are
+ not processed through kanata due to a Windows issue related to AltGr. If you
+ use AltGr in your keyboard, you will likely want to follow the simple.kbd
+ file while unmapping lctl and ralt from defsrc.
+ |#
+ process-unmapped-keys yes
+)
+
+(defsrc
+ caps
+ h j k l
+ lsft rsft
+)
+
+(deflayer default
+ @cap
+ _ _ _ _
+ _ _
+)
+
+(deflayer arrows
+ _
+ left down up rght
+ _ _
+)
+
+(defalias
+ cap (tap-hold-press 200 200 esc (layer-toggle arrows))
+)