diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-18 00:30:32 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-18 00:30:32 +0530 |
| commit | 302f83b23b364b08dc47725266db5e20437d71e4 (patch) | |
| tree | 9fd2caa0940e2e0652e70aca03d5364935530b94 /modules/communication/neomutt/macros.nix | |
| parent | 59b820146763424db380b4f5ed82ccaf0fae923b (diff) | |
| download | home-manager-config-302f83b23b364b08dc47725266db5e20437d71e4.tar.gz home-manager-config-302f83b23b364b08dc47725266db5e20437d71e4.zip | |
feat(neomutt): add vim-style delete/copy keybindings, gf/gF swap, and private configs
- Add `dd`/`D` delete keybindings (single/thread) with vim-style `d` as
prefix
- Extend copy (`y`/`yy`) to work in both index and pager views
- Add `gT` for previous-unread-mailbox (counterpart to `gt`)
- Swap `gf`/`gF` so `gf` limits and `gF` clears filter (via macro)
- Fix `binds` → `macros` in macros.nix and add `description` fields
- Add `ZQ` (quit without saving) macro alongside existing `ZZ`
- Add private email.nix and git.nix with personal account/identity
config
Diffstat (limited to 'modules/communication/neomutt/macros.nix')
| -rw-r--r-- | modules/communication/neomutt/macros.nix | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/modules/communication/neomutt/macros.nix b/modules/communication/neomutt/macros.nix index ae1d84e..e65436c 100644 --- a/modules/communication/neomutt/macros.nix +++ b/modules/communication/neomutt/macros.nix @@ -1,8 +1,7 @@ # Macros - neomutt macros for sync, URL extraction, flag legend, and quit { config, lib, ... }: - { - config.programs.neomutt.binds = lib.mkIf config.communication.neomutt.enable [ + config.programs.neomutt.macros = lib.mkIf config.communication.neomutt.enable [ { map = [ "index" @@ -10,6 +9,7 @@ ]; key = "O"; action = "<enter-command>set my_wait_key=$wait_key wait_key=no<enter><sync-mailbox><shell-escape>${lib.getExe config.scripts.neomutt-sync.package}<enter><sync-mailbox><enter-command>set wait_key=$my_wait_key<enter>"; + description = "sync mailbox (run neomutt-sync)"; } { # gx: extract links from the current message and open one, vim-netrw style @@ -19,6 +19,7 @@ ]; key = "gx"; action = "<pipe-message>urlscan<Enter>"; + description = "extract links from message (netrw-style)"; } { map = [ @@ -27,12 +28,29 @@ ]; key = "gl"; action = "<shell-escape>less ~/.config/neomutt/flag_legend.txt<enter>"; + description = "show flag legend"; + } + { + # gF: clear the current limit/filter and show every message again, + # the counterpart to gf (interactive limit prompt) in binds.nix + map = [ "index" ]; + key = "gF"; + action = "<limit>~A<enter>"; + description = "clear limit/filter, show all messages"; } { # ZZ: save and quit, vim-style (sync mailbox, then quit) map = [ "index" ]; key = "ZZ"; action = "<sync-mailbox><quit>"; + description = "save changes and quit"; + } + { + # ZQ: quit without saving, vim-style counterpart to ZZ + map = [ "index" ]; + key = "ZQ"; + action = "<exit>"; + description = "quit without saving"; } ]; } |
