diff options
Diffstat (limited to 'modules/communication/neomutt')
| -rw-r--r-- | modules/communication/neomutt/.neomuttrc | 3 | ||||
| -rw-r--r-- | modules/communication/neomutt/assertions.nix | 8 | ||||
| -rw-r--r-- | modules/communication/neomutt/macros.nix | 8 | ||||
| -rw-r--r-- | modules/communication/neomutt/neomutt.nix | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/modules/communication/neomutt/.neomuttrc b/modules/communication/neomutt/.neomuttrc index 877e265..34d5a8e 100644 --- a/modules/communication/neomutt/.neomuttrc +++ b/modules/communication/neomutt/.neomuttrc @@ -12,7 +12,8 @@ set abort_key = "<Esc>" # attachments: use our mailcap for dedicated openers, # and auto-render html/images inline where sensible set mailcap_path = "~/.config/neomutt/mailcap" -auto_view text/html image/png image/jpeg image/gif application/pdf +auto_view text/plain +alternative_order text/html image/png image/jpeg image/gif application/pdf # Nerd Font icon-based flag/attachment/crypto indicators # order: new, old, deleted, flagged, replied, old(unused), tagged, encrypt, ... diff --git a/modules/communication/neomutt/assertions.nix b/modules/communication/neomutt/assertions.nix index c4ce62a..5fad5c9 100644 --- a/modules/communication/neomutt/assertions.nix +++ b/modules/communication/neomutt/assertions.nix @@ -1,4 +1,4 @@ -# Assertions - Validates neomutt dependencies (less, bat, kitty, w3m) are enabled +# Assertions - Validates neomutt dependencies (less, bat, kitty, chawan) are enabled { config, ... }: { assertions = [ @@ -24,10 +24,10 @@ ''; } { - assertion = !config.communication.neomutt.enable || config.web.w3m.enable; + assertion = !config.communication.neomutt.enable || config.web.chawan.enable; message = '' - communication.neomutt is enabled but web.w3m.enable is not. - neomutt uses w3m for HTML email rendering. Please enable web.w3m. + communication.neomutt is enabled but web.chawan.enable is not. + neomutt uses chawan for HTML email rendering. Please enable web.chawan. ''; } ]; diff --git a/modules/communication/neomutt/macros.nix b/modules/communication/neomutt/macros.nix index bc18e43..d8b6f55 100644 --- a/modules/communication/neomutt/macros.nix +++ b/modules/communication/neomutt/macros.nix @@ -11,7 +11,7 @@ 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: open the message body in interactive w3m -- real vim-style + # gx: open the message body in interactive chawan -- 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. @@ -23,19 +23,19 @@ action = "<pipe-message>urlscan<enter>"; } { - # Ctrl-B in the pager: same interactive w3m view as gx, kept as + # Ctrl-B in the pager: same interactive chawan 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>"; + action = "<enter-command>set my_pipe_decode=$pipe_decode pipe_decode=yes<enter><pipe-message>${lib.getExe config.web.chawan.package} -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>"; + action = "<pipe-entry>${lib.getExe config.web.chawan.package} -cols 100 -T text/html<enter>"; } { # gF: clear the current limit/filter and show every message again, diff --git a/modules/communication/neomutt/neomutt.nix b/modules/communication/neomutt/neomutt.nix index 792f90e..623c3dd 100644 --- a/modules/communication/neomutt/neomutt.nix +++ b/modules/communication/neomutt/neomutt.nix @@ -18,7 +18,7 @@ "x-scheme-handler/mailto" = "neomutt.desktop"; }; xdg.configFile."neomutt/mailcap".text = '' - text/html; ${lib.getExe' config.web.w3m.package "w3m"} -dump -cols 100 -T text/html '%s'; copiousoutput; nametemplate=%s.html + text/html; ${lib.getExe config.web.chawan.package} '%s'; nametemplate=%s.html image/*; xdg-open '%s' & application/pdf; xdg-open '%s'; nametemplate=%s.pdf video/*; xdg-open '%s' & |
