diff options
author | Aaditya Dhruv <[email protected]> | 2025-07-19 01:59:11 -0500 |
---|---|---|
committer | Aaditya Dhruv <[email protected]> | 2025-07-19 02:01:07 -0500 |
commit | 2d7c5191838711f92581755f7f97d63a53fc3c49 (patch) | |
tree | 7baef29ac2aa959e1231ff0254a9d9570b7c4ec8 | |
parent | 6d2dbbb7fd0df585fcdf35ca4673bc2a86a15f0a (diff) |
Update neomutt config with better file browser and fixed aliases
-rwxr-xr-x | src/config/files/neomutt/mutt_generate_attachment_commands | 7 | ||||
-rw-r--r-- | src/config/tasks/main.yaml | 8 | ||||
-rw-r--r-- | src/config/templates/neomutt/neomuttrc.j2 | 3 |
3 files changed, 17 insertions, 1 deletions
diff --git a/src/config/files/neomutt/mutt_generate_attachment_commands b/src/config/files/neomutt/mutt_generate_attachment_commands new file mode 100755 index 0000000..2f1f011 --- /dev/null +++ b/src/config/files/neomutt/mutt_generate_attachment_commands @@ -0,0 +1,7 @@ +#!/bin/bash + +NNN_OPTS=d nnn -p /tmp/nnn_pick +rm -f /tmp/nnn_attach_cmds +for f in $(cat /tmp/nnn_pick); do + echo "push \"<attach-file> ${f}<enter>\"" >> /tmp/nnn_attach_cmds +done diff --git a/src/config/tasks/main.yaml b/src/config/tasks/main.yaml index 461084b..36f4746 100644 --- a/src/config/tasks/main.yaml +++ b/src/config/tasks/main.yaml @@ -108,6 +108,14 @@ dest: "/home/{{ username }}/.mutt/neomuttrc" backup: yes + - name: Setup Neomutt - mutt_generate_attachment_commands + become: true + become_user: "{{ username }}" + ansible.builtin.copy: + src: neomutt/mutt_generate_attachment_commands + dest: "/home/{{ username }}/.local/bin/" + backup: yes + - name: Setup Neomutt - Mailcap become: true become_user: "{{ username }}" diff --git a/src/config/templates/neomutt/neomuttrc.j2 b/src/config/templates/neomutt/neomuttrc.j2 index a6dd88c..d3164c6 100644 --- a/src/config/templates/neomutt/neomuttrc.j2 +++ b/src/config/templates/neomutt/neomuttrc.j2 @@ -61,7 +61,7 @@ set forward_quote set reverse_name set include alternates {% for item in config.mail.aliases -%} -"{{ item.email }}" +"{{ item.email }}"{{ ' ' }} {%- endfor %} # GPG settings @@ -75,6 +75,7 @@ bind index,pager \Cj sidebar-next bind index,pager \Co sidebar-open macro index S "<shell-escape>mbsync -a<enter>" "sync email" macro index a ":set confirmappend=no delete=yes\n<tag-prefix><save-message>+Archive\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n" +macro compose A "<shell-escape>mutt_generate_attachment_commands<enter><enter-command>source /tmp/nnn_attach_cmds<enter>" "attach nnn" bind editor <Tab> complete-query bind editor \Ct complete |