mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 06:32:40 +00:00
feat: Adds mouse layer to kanata config, adds stop command to kanatactl script.
This commit is contained in:
46
env/.config/kanata/config.kbd
vendored
46
env/.config/kanata/config.kbd
vendored
@@ -13,6 +13,8 @@
|
|||||||
log-layer-changes no
|
log-layer-changes no
|
||||||
danger-enable-cmd yes
|
danger-enable-cmd yes
|
||||||
concurrent-tap-hold yes
|
concurrent-tap-hold yes
|
||||||
|
rapid-event-delay 3
|
||||||
|
allow-hardware-repeat false
|
||||||
|
|
||||||
;; When any non-chord activation happens, this timeout begins. Until this timeout expires
|
;; When any non-chord activation happens, this timeout begins. Until this timeout expires
|
||||||
;; all inputs will immediately skip chords processing and be processed by the active layer.
|
;; all inputs will immediately skip chords processing and be processed by the active layer.
|
||||||
@@ -23,6 +25,8 @@
|
|||||||
(defvar
|
(defvar
|
||||||
tap-higher 400
|
tap-higher 400
|
||||||
tap-time 200
|
tap-time 200
|
||||||
|
tap-time-plus 300
|
||||||
|
hold-time-plus 300
|
||||||
hold-time 200
|
hold-time 200
|
||||||
chord-time 60
|
chord-time 60
|
||||||
subl-time 200
|
subl-time 200
|
||||||
@@ -59,8 +63,13 @@
|
|||||||
|
|
||||||
mretu (tap-hold $tap-time $hold-time tab ret)
|
mretu (tap-hold $tap-time $hold-time tab ret)
|
||||||
|
|
||||||
mlnums (tap-hold-press $tap-time $hold-time esc (layer-while-held nums_and_symbols))
|
;; number and symbols layer trigger keys.
|
||||||
mrnums (tap-hold-press $tap-time $hold-time ret (layer-while-held nums_and_symbols))
|
mlnums (tap-hold-press $tap-time-plus $hold-time-plus esc (layer-while-held nums_and_symbols))
|
||||||
|
mrnums (tap-hold-press $tap-time-plus $hold-time-plus ret (layer-while-held nums_and_symbols))
|
||||||
|
|
||||||
|
;; mouse layer trigger keys.
|
||||||
|
mlms (tap-hold-press $tap-time $hold-time lsft (layer-while-held mouse))
|
||||||
|
mrms (tap-hold-press $tap-time $hold-time rsft (layer-while-held mouse))
|
||||||
|
|
||||||
;; Multi
|
;; Multi
|
||||||
mhypr (tap-hold $tap-time $hold-time spc (multi lsft lctl lalt lmet)) ;; Hyper key
|
mhypr (tap-hold $tap-time $hold-time spc (multi lsft lctl lalt lmet)) ;; Hyper key
|
||||||
@@ -98,7 +107,7 @@
|
|||||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
tab q w e r t y u i o p [ ] \
|
tab q w e r t y u i o p [ ] \
|
||||||
@mlnums @mlctl @mlalt @mlmet @mlsft g h @mrsft @mrmet @mralt @mrctl ' @mrnums
|
@mlnums @mlctl @mlalt @mlmet @mlsft g h @mrsft @mrmet @mralt @mrctl ' @mrnums
|
||||||
lsft z x c v b n m , . / ▲ rsft
|
@mlms z x c v b n m , . / ▲ @mrms
|
||||||
lctl lalt lmet spc rmet ralt ◀ ▼ ▶
|
lctl lalt lmet spc rmet ralt ◀ ▼ ▶
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -111,3 +120,34 @@
|
|||||||
lsft S-7 S-8 S-4 S-3 XX XX 7 8 9 / XX rsft
|
lsft S-7 S-8 S-4 S-3 XX XX 7 8 9 / XX rsft
|
||||||
lctl lalt lmet 0 rmet ralt ◀ ▼ ▶
|
lctl lalt lmet 0 rmet ralt ◀ ▼ ▶
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(defalias
|
||||||
|
mwu (mwheel-up 50 120)
|
||||||
|
mwd (mwheel-down 50 120)
|
||||||
|
mwl (mwheel-left 50 120)
|
||||||
|
mwr (mwheel-right 50 120)
|
||||||
|
|
||||||
|
ms↑ (movemouse-up 1 1)
|
||||||
|
ms← (movemouse-left 1 1)
|
||||||
|
ms↓ (movemouse-down 1 1)
|
||||||
|
ms→ (movemouse-right 1 1)
|
||||||
|
|
||||||
|
ma↑ (movemouse-accel-up 5 1000 1 3)
|
||||||
|
ma← (movemouse-accel-left 5 1000 1 3)
|
||||||
|
ma↓ (movemouse-accel-down 5 1000 1 3)
|
||||||
|
ma→ (movemouse-accel-right 5 1000 1 3)
|
||||||
|
|
||||||
|
sm (setmouse 32228 32228)
|
||||||
|
|
||||||
|
fst (movemouse-speed 200)
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Mouse and arrow layer
|
||||||
|
(deflayer mouse
|
||||||
|
esc XX XX XX XX XX XX XX XX XX XX XX XX ;; function row
|
||||||
|
grv XX XX XX XX XX XX XX XX XX XX XX XX bspc ;; number row
|
||||||
|
tab XX XX ▲ XX XX @mwl @mwd @mwu @mwr XX XX XX XX ;; top letter row
|
||||||
|
caps XX ◀ ▼ ▶ XX @ma← @ma↓ @ma↑ @ma→ XX XX mrtp ;; home row
|
||||||
|
lsft XX XX XX XX XX XX XX XX XX XX XX rsft ;; bottom letter row
|
||||||
|
lctl lalt lmet mltp rmet ralt XX XX XX ;; control row
|
||||||
|
)
|
||||||
|
|||||||
13
env/.local/scripts/kanatactl
vendored
13
env/.local/scripts/kanatactl
vendored
@@ -34,6 +34,7 @@ COMMANDS:
|
|||||||
restart: Restart the kanata systemd service.
|
restart: Restart the kanata systemd service.
|
||||||
start: Enable and start the kanata systemd service.
|
start: Enable and start the kanata systemd service.
|
||||||
status: Get the status of the kanata systemd service.
|
status: Get the status of the kanata systemd service.
|
||||||
|
stop: Stop the kanata systemd service.
|
||||||
update: Pull from git and check for updates.
|
update: Pull from git and check for updates.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
@@ -177,10 +178,16 @@ get_status() {
|
|||||||
systemctl status kanata.service
|
systemctl status kanata.service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Stop the service.
|
||||||
|
stop_service() {
|
||||||
|
log "Stopping kanata service..."
|
||||||
|
sudo systemctl stop kanata.service
|
||||||
|
}
|
||||||
|
|
||||||
# Disable the kanata systemd service.
|
# Disable the kanata systemd service.
|
||||||
disable_service() {
|
disable_service() {
|
||||||
log "Disabling kanata service..."
|
log "Disabling kanata service..."
|
||||||
sudo systemctl stop kanata.service
|
stop_service
|
||||||
sudo systemctl disable kanata.service
|
sudo systemctl disable kanata.service
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,10 +251,14 @@ while [[ $# -gt 0 ]]; do
|
|||||||
bat ${LOG_DIR:-/tmp/logs}/$LOG_FILE && exit 0
|
bat ${LOG_DIR:-/tmp/logs}/$LOG_FILE && exit 0
|
||||||
elif [[ $1 == "status" ]]; then
|
elif [[ $1 == "status" ]]; then
|
||||||
get_status && exit $?
|
get_status && exit $?
|
||||||
|
elif [[ $1 == "stop" ]]; then
|
||||||
|
stop_service && exit $?
|
||||||
elif [[ $1 == "restart" ]]; then
|
elif [[ $1 == "restart" ]]; then
|
||||||
restart_service && exit 0
|
restart_service && exit 0
|
||||||
elif [[ $1 == "update" ]]; then
|
elif [[ $1 == "update" ]]; then
|
||||||
install_or_update "Updating" && exit 0
|
install_or_update "Updating" && exit 0
|
||||||
|
else
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user