mail: add task2mutt and switch scripts to neomutt
This commit is contained in:
parent
d81e29de50
commit
1df0de7563
1 changed files with 22 additions and 8 deletions
|
@ -476,10 +476,21 @@ in {
|
|||
macro pager U "<modify-labels>+unread\n"
|
||||
macro pager u "<modify-labels>-unread\n"
|
||||
|
||||
bind index l noop
|
||||
bind pager l noop
|
||||
macro index l "<modify-labels>" # set tags manual
|
||||
macro pager l "<modify-labels>" # set tags manual
|
||||
|
||||
# taskwarrior
|
||||
# -----------
|
||||
# from https://www.nixternal.com/mark-e-mails-in-mutt-as-tasks-in-taskwarrior/
|
||||
bind index t noop
|
||||
bind pager t noop
|
||||
macro index t "<modify-labels>" # set tags manual
|
||||
macro pager t "<modify-labels>" # set tags manual
|
||||
bind index T noop
|
||||
bind pager T noop
|
||||
macro index T "<pipe-message>${pkgs.writers.writeDash "mutt2task" ''
|
||||
${pkgs.taskwarrior}/bin/task add +email E-mail: $( ${pkgs.gnugrep}/bin/grep 'Subject' $* | awk -F: '{print $2}' )
|
||||
''}<enter>"
|
||||
|
||||
# top index bar in email view
|
||||
set pager_index_lines=7
|
||||
|
@ -507,21 +518,24 @@ in {
|
|||
|
||||
environment.systemPackages = let
|
||||
|
||||
mailSync = pkgs.writeShellScriptBin "mail-sync" ''
|
||||
mailSync = pkgs.writers.writeDashBin "mail-sync" ''
|
||||
${pkgs.muchsync}/bin/muchsync mailfetcher@workhorse.private --nonew
|
||||
'';
|
||||
mailSend = pkgs.writeShellScriptBin "mail-send" ''
|
||||
mailSend = pkgs.writers.writeDashBin "mail-send" ''
|
||||
${pkgs.msmtp}/bin/msmtp-queue -r
|
||||
'';
|
||||
mailView = pkgs.writeShellScriptBin "mail-view" ''
|
||||
${pkgs.alot}/bin/alot "$@"
|
||||
mailView = pkgs.writers.writeDashBin "mail-view" ''
|
||||
${pkgs.neomutt}/bin/neomutt"$@"
|
||||
'';
|
||||
mail = pkgs.writeShellScriptBin "mail" ''
|
||||
mutt = pkgs.writers.writeDashBin "mutt" ''
|
||||
${pkgs.neomutt}/bin/neomutt"$@"
|
||||
'';
|
||||
mail = pkgs.writers.writeDashBin "mail" ''
|
||||
${mailSync}/bin/mail-sync
|
||||
${mailView}/bin/mail-view
|
||||
${mailSend}/bin/mail-send
|
||||
${mailSync}/bin/mail-sync
|
||||
'';
|
||||
in [ pkgs.notmuch pkgs.alot pkgs.muchsync mail mailSync mailView mailSend pkgs.neomutt ];
|
||||
in [ pkgs.notmuch pkgs.alot pkgs.muchsync mail mailSync mailView mailSend pkgs.neomutt mutt ];
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue