diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-23 00:56:24 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-23 00:56:24 +0530 |
| commit | 2ad7b06ced0ffa39d20e6be41466e5bd834ee956 (patch) | |
| tree | 86bc522072c09c80098bff8854d2377137a6c39c /modules/communication/neomutt/macros.nix | |
| parent | a61001ad8696f6d9a5ebe0f18a71d747941ec9d0 (diff) | |
| download | home-manager-config-2ad7b06ced0ffa39d20e6be41466e5bd834ee956.tar.gz home-manager-config-2ad7b06ced0ffa39d20e6be41466e5bd834ee956.zip | |
feat(w3m): add module with desktop entry + integrate into neomutt
- modules/web/w3m: enable/package options, desktop entry via kitty,
assertion
- modules/web/w3m: delegate to programs.w3m under the hood
- modules/web/w3m: default package to programs.w3m.finalPackage
- modules/desktop/xdg: add portal config with common.default = "*"
- neomutt/nix: use lib.getExe' config.web.w3m.package for w3m refs
- neomutt/assertions: add w3m dependency assertion
- users/arpit: enable web.w3m
Diffstat (limited to 'modules/communication/neomutt/macros.nix')
| -rw-r--r-- | modules/communication/neomutt/macros.nix | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/modules/communication/neomutt/macros.nix b/modules/communication/neomutt/macros.nix index 0548a0f..87c05d1 100644 --- a/modules/communication/neomutt/macros.nix +++ b/modules/communication/neomutt/macros.nix @@ -11,13 +11,31 @@ 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>"; } { - # gx: extract links from the current message and open one, vim-netrw style + # gx: open the message body in interactive w3m -- real vim-style + # cursor navigation (hjkl, Tab/Shift-Tab between links, Enter to + # follow, B back, q to return to neomutt). Replaces the old + # urlscan-based link picker. map = [ "index" "pager" ]; key = "gx"; - action = "<pipe-message>urlscan<Enter>"; + action = "<pipe-message>urlscan<enter>"; + } + { + # Ctrl-B in the pager: same interactive w3m view as gx, kept as + # a second binding since Ctrl-B is a common muscle-memory key + # for "open this in a browser-like view". + map = [ "pager" ]; + key = "\\Cb"; + action = "<enter-command>set my_pipe_decode=$pipe_decode pipe_decode=yes<enter><pipe-message>${lib.getExe' config.web.w3m.package "w3m"} -T text/html<enter><enter-command>set pipe_decode=$my_pipe_decode<enter>"; + } + { + # Ctrl-B on a specific attachment (not just the top-level + # message): pipe-entry sends the selected attachment instead. + map = [ "attach" ]; + key = "\\Cb"; + action = "<pipe-entry>${lib.getExe' config.web.w3m.package "w3m"} -cols 100 -T text/html<enter>"; } { map = [ @@ -32,7 +50,7 @@ # the counterpart to gf (interactive limit prompt) in binds.nix map = [ "index" ]; key = "gF"; - action = "<limit>~A<enter>"; + action = "<limit>all<enter>"; } { # ZZ: save and quit, vim-style (sync mailbox, then quit) |
