mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-17 20:52:09 -08:00
feat: neomutt auto open html emails in w3m
This commit is contained in:
parent
c8700244d7
commit
3a6f88043e
2 changed files with 19 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
|
@ -44,4 +44,10 @@
|
|||
};
|
||||
addKeysToAgent = "yes";
|
||||
};
|
||||
|
||||
# text/html; ~/.mutt/view_attachment.sh %s html; test=test -n "$DISPLAY"
|
||||
home.file.".mailcap".text = ''
|
||||
text/html; ${pkgs.w3m}/bin/w3m %s; nametemplate=%s.html; needsterminal
|
||||
text/html; ${pkgs.w3m}/bin/w3m -v -F -T text/html -dump %s; copiousoutput
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -22,6 +22,12 @@ in
|
|||
|
||||
macro index,pager \cs "<pipe-message> ${pkgs.urlscan}/bin/urlscan<Enter>" "call urlscan to extract URLs out of a message"
|
||||
macro attach,compose \cs "<pipe-entry> ${pkgs.urlscan}/bin/urlscan<Enter>" "call urlscan to extract URLs out of a message"
|
||||
|
||||
auto_view text/html
|
||||
alternative_order text/enriched text/plain text/html text
|
||||
|
||||
bind index,pager V noop ## Unbinds V from version
|
||||
macro index,pager V "<view-attachments><search>html<enter><view-mailcap><exit>"
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -99,4 +105,10 @@ in
|
|||
--client-secret "''$(cat ${secrets.youwen_ucsb_client_secret.path})"
|
||||
'')
|
||||
];
|
||||
|
||||
# text/html; ~/.mutt/view_attachment.sh %s html; test=test -n "$DISPLAY"
|
||||
home.file.".mailcap".text = ''
|
||||
text/html; ${pkgs.w3m}/bin/w3m %s; nametemplate=%s.html; needsterminal
|
||||
text/html; ${pkgs.w3m}/bin/w3m -v -F -T text/html -dump %s; copiousoutput
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue