From 65b556250235fff050240f0efb70bde002bd93b9 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Tue, 20 May 2025 23:14:58 -0400 Subject: [PATCH] working on keyboards some more --- flake.lock | 30 +++++++++++++++--------------- modules/home/yazi.nix | 14 ++++++++++---- modules/system/kanata.nix | 36 +++++++++++++++++++++++------------- 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index 8891ff5..e520118 100644 --- a/flake.lock +++ b/flake.lock @@ -88,11 +88,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1747761969, - "narHash": "sha256-nR3kxGtVGtrEeaY/8LvtlZFvbC4gerebRvRE5dE0Jn0=", + "lastModified": 1747794124, + "narHash": "sha256-GVMQfAoLuoo7Fq3VuwnWthWNoM9di/dlQdP/YrCQCCs=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "88ff8a448dec87188f7a5d024bb8838d80a6ffcc", + "rev": "3f5c585027ef7798de403e4b7093f3005679496f", "type": "github" }, "original": { @@ -376,11 +376,11 @@ ] }, "locked": { - "lastModified": 1747763032, - "narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=", + "lastModified": 1747793476, + "narHash": "sha256-2qAOSixSrbb9l6MI+SI4zGineOzDcc2dgOOFK9Dx+IY=", "owner": "nix-community", "repo": "home-manager", - "rev": "29dda415f5b2178278283856c6f9f7b48a2a4353", + "rev": "2468b2d35512d093aeb04972a1d8c20a0735793f", "type": "github" }, "original": { @@ -988,11 +988,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1747485343, - "narHash": "sha256-YbsZyuRE1tobO9sv0PUwg81QryYo3L1F3R3rF9bcG38=", + "lastModified": 1747676747, + "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b5ac7ad45298d58640540d0323ca217f32a6762", + "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", "type": "github" }, "original": { @@ -1100,11 +1100,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1747542820, - "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -1659,11 +1659,11 @@ ] }, "locked": { - "lastModified": 1747779523, - "narHash": "sha256-zbZ/3X4cvmXW42zzZPrG/jClOkueBLHHooVpN4u4uxk=", + "lastModified": 1747791592, + "narHash": "sha256-EirNZzeq+SLPHBzHlKI7FGyNWkTtIJGeaKRew1S9LuY=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "d73999025579ff405f4e95901f0356e81872e188", + "rev": "28c8c65e1b2aa5c949cb959d228dd7bafe200a1e", "type": "github" }, "original": { diff --git a/modules/home/yazi.nix b/modules/home/yazi.nix index bd34bda..48ed81d 100644 --- a/modules/home/yazi.nix +++ b/modules/home/yazi.nix @@ -86,12 +86,20 @@ { on = "!"; run = "shell '$SHELL' --block"; desc = "Open shell here"; } { on = ["c" "d"]; run = "shell 'ripdrag \"$@\" -x 2>/dev/null &' --confirm"; desc = "Drag selection";} - { on = ["c" "y"]; run = "yank"; desc = "Copy file (yank)"; } - { on = "y"; run = ["shell 'for path in \"$@\"; do echo \"file://$path\"; done | wl-copy -t text/uri-list'\n" "yank"]; desc = "Yank selected files (copy)"; } + { on = ["c" "c"]; run = ["shell 'for path in \"$@\"; do echo \"file://$path\"; done | wl-copy -t text/uri-list'\n" "yank"]; desc = "Copy file (yank)"; } + { on = ["c" "p"]; run = "copy path"; desc = "Copy file path"; } + { on = ["c" "u"]; run = "unyank"; desc = "Cancel file copy"; } + { on = ["g" "r"]; run = "shell 'ya emit cd \"$(git rev-parse --show-toplevel)\"'\n"; desc = "Go to top of git repo"; } { on = ["g" "p"]; run = "cd ~/Projects"; desc = "Go to ~/Projects"; } + { on = "v"; run = "paste"; } + { on = "V"; run = "paste --force"; } + + { on = "e"; run = "visual"; } + { on = "E"; run = "visual --unset"; } + { on = ""; run ="tab_create"; } { on = ""; run ="close"; } { on = ""; run ="tab_switch 1 --relative"; } @@ -105,8 +113,6 @@ { on = "M"; run = "plugin mount"; } - { on = "p"; run = "plugin smart-paste"; desc = "Paste into the hovered directory or CWD"; } - { on = "C"; run = "plugin ouch zip"; } { on = "T"; run = "plugin smart-tab"; desc = "Create a tab and enter the hovered directory"; } diff --git a/modules/system/kanata.nix b/modules/system/kanata.nix index c9d9db5..4032d49 100644 --- a/modules/system/kanata.nix +++ b/modules/system/kanata.nix @@ -8,10 +8,24 @@ let ''; shared-alias = '' (defalias - spcnav (tap-hold-release $tap-timeout $hold-timeout spc (layer-while-held navigation)) supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet) + + ;; ctrl return + ctrl-ret (tap-hold-press $tap-timeout $hold-timeout ret lctl) + + ;; layer mods + spcnav (tap-hold $tap-timeout 300 spc (layer-while-held navigation)) + + ;; space cadet shift sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft) - sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft)) + sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft) + + ;; home-row mods + a (tap-hold $tap-timeout $hold-timeout a lshift) + s (tap-hold $tap-timeout $hold-timeout s lctrl) + d (tap-hold $tap-timeout $hold-timeout d lalt) + ;; f (tap-hold-press $tap-timeout $hold-timeout f ) +) ''; in @@ -79,7 +93,7 @@ ${shared-alias} esc VolumeMute VolumeDown VolumeUp f4 MediaTrackPrevious MediaPlayPause MediaTrackNext f8 f9 f10 f11 f12 prtsc grv 1 2 3 4 5 6 7 8 9 0 - = \ del home tab q w e r t y u i o MediaPlayPause [ ] bspc end - @supesc a s d f g MediaTrackNext VolumeDown VolumeUp MediaTrackPrevious ; ' ret pgup + @supesc a s d f g MediaTrackPrevious VolumeDown VolumeUp MediaTrackNext ; ' ret pgup @sp-lsft z x c v b n VolumeMute , . / @sp-rsft pgup _ lmet lmet lalt lctrl _ rctrl ralt rmet home pgdn end) ''; @@ -103,25 +117,21 @@ allow-hardware-repeat false ${k-vars} -(defalias - spcnav (tap-hold $tap-timeout 300 spc (layer-while-held navigation)) - supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet) - sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft) - sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft)) +${shared-alias} (deflayer qwerty grv 1 2 3 4 5 6 7 8 9 0 - = bspc tab q w e r t y u i o p [ ] \ - @supesc a s d f g h j k l ; ' ret + @supesc @a @s @d f g h j k l ; ' ret @sp-lsft z x c v b n m , . / @sp-rsft - lmet lalt lctrl @spcnav rctrl ralt) + lmet lalt @ctrl-ret @spcnav @ctrl-ret ralt) (deflayer navigation 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 left down up right ; ' ret + tab q w e r t home pgdn pgup end p [ ] \ + caps _ _ _ _ _ left down up right ; ' ret @sp-lsft z x c v b n m , . / @sp-rsft - lmet lalt lctrl _ rctrl ralt) + lmet lalt @ctrl-ret _ rctrl ralt) ''; }; };