summaryrefslogtreecommitdiffstats
path: root/.bin/nmutt
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-23 18:28:03 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-23 18:28:03 +0000
commit0f08d04698c814955116b6bae50752e64b774d8f (patch)
tree8cf9a33557093eebfd25aab2872e97639c7e2f62 /.bin/nmutt
downloaddots-0f08d04698c814955116b6bae50752e64b774d8f.tar.gz
Thu Dec 23 06:28:03 PM UTC 2021
Diffstat (limited to '.bin/nmutt')
-rwxr-xr-x.bin/nmutt19
1 files changed, 19 insertions, 0 deletions
diff --git a/.bin/nmutt b/.bin/nmutt
new file mode 100755
index 0000000..9a2bb28
--- /dev/null
+++ b/.bin/nmutt
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+NMUTT_CONFIGURATION_FILE="${HOME}/.config/neomutt/personal"
+
+get_param() {
+ grep "${2}" "${1}" |
+ head -n 1 |
+ rev |
+ cut -d " " -f 1 |
+ rev |
+ tr -d '"'
+}
+
+# export server/username for get-mailbox-imap script
+export MAIL_SERVER=$(get_param "${NMUTT_CONFIGURATION_FILE}" "my_server")
+export MAIL_USERNAME=$(get_param "${NMUTT_CONFIGURATION_FILE}" "my_user")
+
+export MAIL_PASSWORD=$(get-pass "mailbox")
+exec neomutt ${@}
remember that computers suck.