From b448e6a6a25c87a95019c58ed8908f7eb1a7ce29 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Sun, 6 Jul 2025 12:58:31 -0400 Subject: [PATCH] keyboard mod changes, cleanup --- flake.lock | 46 ++++++++++----------- modules/home/desktop.nix | 3 ++ modules/home/shell-conf.nix | 6 +-- modules/home/shell-conf/nushell/config.nu | 5 ++- modules/home/shell-conf/nushell/env.nu | 19 +++++++++ modules/home/shell-conf/nushell/nushell.nix | 23 +---------- modules/home/yazi.nix | 2 +- modules/system/kanata.nix | 4 +- 8 files changed, 57 insertions(+), 51 deletions(-) create mode 100644 modules/home/shell-conf/nushell/env.nu diff --git a/flake.lock b/flake.lock index d614124..6e0d718 100644 --- a/flake.lock +++ b/flake.lock @@ -153,11 +153,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1751766315, - "narHash": "sha256-rIIRch7pSBsxaee2+9hVOTFcHahQvV2ASqbDEINCXkk=", + "lastModified": 1751819016, + "narHash": "sha256-VUH2XRvstd/AQmph85qMOrSuDdhE6Wi0NIbpWtl2j58=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "35e4150b360528360680a0b75e142396c6fbd484", + "rev": "b36094ff60e3b8e3d8cda96f2824bd57bbf32d93", "type": "github" }, "original": { @@ -205,13 +205,13 @@ "locked": { "lastModified": 1751750910, "narHash": "sha256-nvxcyvyBRGKL6yn/TSD03g48l9DMFJ4jBW8nqW/y7p4=", - "owner": "eza-community", + "owner": "emenel", "repo": "eza", "rev": "fa2f3216ad110499302f8311c195d7235ebe3900", "type": "github" }, "original": { - "owner": "eza-community", + "owner": "emenel", "repo": "eza", "type": "github" } @@ -644,11 +644,11 @@ ] }, "locked": { - "lastModified": 1751760902, - "narHash": "sha256-qBGNn7T/zOgUDQTo/RM/D2oxMkB2x36j3ajvpVanEVs=", + "lastModified": 1751816429, + "narHash": "sha256-F9xzryA4OfrGTQS1N8SimJQzoD8qDMj/e2lTFE9V288=", "owner": "nix-community", "repo": "home-manager", - "rev": "8b0180dde1d6f4cf632e046309e8f963924dfbd0", + "rev": "b4486ff44addd453a64fd8c176ab2fd7ad3f6eb3", "type": "github" }, "original": { @@ -1073,11 +1073,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1751736567, - "narHash": "sha256-/wvCffuHn2eOw6qYyLFm+oButg9Z1dU/BhkHhoRd5z4=", + "lastModified": 1751815493, + "narHash": "sha256-tF7Tery/v0lhBKAwj9TgBLPSng42iZzlf/MeFb7on6U=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "f3b4c3cbb65b690c66ad5ca78f1e88620d4d6cc5", + "rev": "c4d9d4caa0c1e5c002679ca4b15db223b1942c2b", "type": "github" }, "original": { @@ -1328,11 +1328,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1751582995, - "narHash": "sha256-u7ubvtxdTnFPpV27AHpgoKn7qHuE7sgWgza/1oj5nzA=", + "lastModified": 1751741127, + "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7a732ed41ca0dd64b4b71b563ab9805a80a7d693", + "rev": "29e290002bfff26af1db6f64d070698019460302", "type": "github" }, "original": { @@ -1344,11 +1344,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1751582995, - "narHash": "sha256-u7ubvtxdTnFPpV27AHpgoKn7qHuE7sgWgza/1oj5nzA=", + "lastModified": 1751741127, + "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7a732ed41ca0dd64b4b71b563ab9805a80a7d693", + "rev": "29e290002bfff26af1db6f64d070698019460302", "type": "github" }, "original": { @@ -2147,11 +2147,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1751550109, - "narHash": "sha256-/pB2YpF8BG4zURq4v+M/+TW3fUIekm5qephBzlrw2pw=", + "lastModified": 1751812076, + "narHash": "sha256-h7vE7KQvHIPaPik7Ze818dy/G4YQRWVFqNyxqcBAEwI=", "owner": "sxyazi", "repo": "yazi", - "rev": "ec7eb3e41663fd3654bd0995dd8d451bcc64fe18", + "rev": "917e1f54a10445f2e25147c4b81a3c77d8233632", "type": "github" }, "original": { @@ -2168,11 +2168,11 @@ ] }, "locked": { - "lastModified": 1751656595, - "narHash": "sha256-W8uTfv+XXSupH4IFIV+SjTCCQXBiHtxTRkuypuDhlV4=", + "lastModified": 1751779188, + "narHash": "sha256-o1PidAPLtSSqI6isos6v/e6s7t3zQ56NBYhXVaUesXc=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "565138cfe80944643770b6b4f4ac849dc94ab343", + "rev": "b3200f40877a3e0a679070d96f8793a06105c06e", "type": "github" }, "original": { diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index 9230fae..e0e0464 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -155,6 +155,9 @@ shaderbg + zulip + element-desktop + ]; home.pointerCursor = { diff --git a/modules/home/shell-conf.nix b/modules/home/shell-conf.nix index bbc8121..c2aabfc 100644 --- a/modules/home/shell-conf.nix +++ b/modules/home/shell-conf.nix @@ -110,9 +110,9 @@ }; programs = { - carapace = { - enable = true; - }; + # carapace = { + # enable = true; + # }; bash = { enable = true; }; diff --git a/modules/home/shell-conf/nushell/config.nu b/modules/home/shell-conf/nushell/config.nu index 4d9c57b..6492471 100644 --- a/modules/home/shell-conf/nushell/config.nu +++ b/modules/home/shell-conf/nushell/config.nu @@ -16,8 +16,9 @@ def --env doomup [...args] { systemctl --user restart emacs.service } -def --env lla [...args] { - ls -alm ...$args | select name type size modified mode user +def --env lla [...pattern: glob] { + let pattern = if ($pattern | is-empty) { [ '.' ] } else { $pattern } + nuls -alm $pattern | select name type size modified mode user } # def --env pullall [] { diff --git a/modules/home/shell-conf/nushell/env.nu b/modules/home/shell-conf/nushell/env.nu new file mode 100644 index 0000000..009ff65 --- /dev/null +++ b/modules/home/shell-conf/nushell/env.nu @@ -0,0 +1,19 @@ + let fish_completer = {|spans| + let completions = fish --command $'complete "--do-complete=($spans | str join " ")"' + | from tsv --flexible --noheaders --no-infer + | rename value description + + let has_paths = ($completions | any {|row| $row.value =~ '/' or $row.value =~ '\\.\\w+$' or $row.value =~ ' '}) + + if $has_paths { + $completions | update value {|row| + if $row.value =~ ' ' { + $"'($row.value)'" # Wrap in single quotes + } else { + $row.value + } + } + } else { + $completions + } + } diff --git a/modules/home/shell-conf/nushell/nushell.nix b/modules/home/shell-conf/nushell/nushell.nix index 9a18b56..8f3ed55 100644 --- a/modules/home/shell-conf/nushell/nushell.nix +++ b/modules/home/shell-conf/nushell/nushell.nix @@ -8,6 +8,7 @@ programs.nushell = { enable = true; shellAliases = { + "nuls" = "ls"; "ls" = "ls -m"; "ll" = "ls -m"; "la" = "ls -am"; @@ -16,6 +17,7 @@ "y" = "job spawn { wezterm --config-file ~/.config/wezterm/launcher.lua start --always-new-process --cwd (pwd) yazi }"; }; configFile.source = ./config.nu; + envFile.source = ./env.nu; loginFile.text = '' ${pkgs.figlet}/bin/figlet -f ($env.HOME)/.local/share/flf/wavy.flf (hostname) ''; @@ -47,27 +49,6 @@ }; }; }; - extraEnv = '' - let fish_completer = {|spans| - let completions = fish --command $'complete "--do-complete=($spans | str join " ")"' - | from tsv --flexible --noheaders --no-infer - | rename value description - - let has_paths = ($completions | any {|row| $row.value =~ '/' or $row.value =~ '\\.\\w+$' or $row.value =~ ' '}) - - if $has_paths { - $completions | update value {|row| - if $row.value =~ ' ' { - $"'($row.value)'" # Wrap in single quotes - } else { - $row.value - } - } - } else { - $completions - } - } - ''; plugins = [ pkgs.nushellPlugins.skim ]; }; } diff --git a/modules/home/yazi.nix b/modules/home/yazi.nix index cd235b9..ccfae20 100644 --- a/modules/home/yazi.nix +++ b/modules/home/yazi.nix @@ -156,7 +156,7 @@ }; opener = { edit = [ - { run = "emacsclient -r \"$@\""; desc = "emacsclient"; orphan = true; block = false; } + { run = "emacsclient -n -r \"$@\""; desc = "emacsclient"; orphan = true; block = false; } { run = "nano \"$@\""; desc = "nano"; orphan = false; block = true; } ]; extract = [ diff --git a/modules/system/kanata.nix b/modules/system/kanata.nix index 9363e74..bc02d50 100644 --- a/modules/system/kanata.nix +++ b/modules/system/kanata.nix @@ -18,12 +18,14 @@ let ;; layer mods spcnav (tap-hold $tap-timeout 300 spc (layer-while-held navigation)) + tabnav(multi lctrl lalt) + ;; 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) ;; home-row mods - a (tap-hold $tap-timeout $hold-timeout a lshift) + a (tap-hold $tap-timeout $hold-timeout a @tabnav) s (tap-hold $tap-timeout $hold-timeout s lalt) d (tap-hold $tap-timeout $hold-timeout d lctrl)