diff options
author | Yigit Sever | 2021-10-12 01:01:01 +0300 |
---|---|---|
committer | Yigit Sever | 2021-10-12 01:01:01 +0300 |
commit | 22bafa21869fb47d8f6568a0e047c226926f20e0 (patch) | |
tree | 90b18965b589d95e27e166186ddc32ca8f92471b | |
parent | 20e42aa0d070f0c09ab20bf4ab42c3495a807e1c (diff) | |
download | dotfiles-22bafa21869fb47d8f6568a0e047c226926f20e0.tar.gz dotfiles-22bafa21869fb47d8f6568a0e047c226926f20e0.tar.bz2 dotfiles-22bafa21869fb47d8f6568a0e047c226926f20e0.zip |
mutt: free from the shackles
-rw-r--r-- | .config/msmtp/config | 47 | ||||
-rw-r--r-- | .config/mutt/accounts/1-ceng_argor.muttrc | 54 | ||||
-rw-r--r-- | .config/mutt/accounts/2-metu_argor.muttrc | 48 | ||||
-rw-r--r-- | .config/mutt/accounts/3-ceng_stu.muttrc | 51 | ||||
-rw-r--r-- | .config/mutt/accounts/4-metu_stu.muttrc | 48 | ||||
-rw-r--r-- | .config/mutt/accounts/5-xyz.muttrc | 53 | ||||
-rw-r--r-- | .config/mutt/muttrc | 177 | ||||
-rwxr-xr-x | .local/bin/mailsync | 76 | ||||
-rwxr-xr-x | .local/bin/openfile | 10 | ||||
-rw-r--r-- | .mbsyncrc | 131 |
10 files changed, 673 insertions, 22 deletions
diff --git a/.config/msmtp/config b/.config/msmtp/config new file mode 100644 index 0000000..8b8e782 --- /dev/null +++ b/.config/msmtp/config | |||
@@ -0,0 +1,47 @@ | |||
1 | defaults | ||
2 | auth on | ||
3 | tls on | ||
4 | tls_trust_file /etc/ssl/certs/ca-certificates.crt | ||
5 | logfile ~/.config/msmtp/msmtp.log | ||
6 | |||
7 | account ceng_argor | ||
8 | host mailhost.ceng.metu.edu.tr | ||
9 | domain mailhost.ceng.metu.edu.tr | ||
10 | port 587 | ||
11 | from yigit@ceng.metu.edu.tr | ||
12 | user yigit | ||
13 | passwordeval "pass mutt-wizard-ceng_argor" | ||
14 | tls_starttls on | ||
15 | tls_certcheck off | ||
16 | |||
17 | account metu_argor | ||
18 | host smtp.metu.edu.tr | ||
19 | port 465 | ||
20 | from ysever@metu.edu.tr | ||
21 | user ysever | ||
22 | passwordeval "pass mutt-wizard-metu_argor" | ||
23 | tls_starttls off | ||
24 | |||
25 | account ceng_stu | ||
26 | host mailhost.ceng.metu.edu.tr | ||
27 | domain mailhost.ceng.metu.edu.tr | ||
28 | port 587 | ||
29 | from e2482057@ceng.metu.edu.tr | ||
30 | user e2482057 | ||
31 | passwordeval "pass mutt-wizard-ceng_stu" | ||
32 | tls_certcheck off | ||
33 | |||
34 | account metu_stu | ||
35 | host smtp.metu.edu.tr | ||
36 | port 465 | ||
37 | from e248205@metu.edu.tr | ||
38 | user e248205 | ||
39 | passwordeval "pass mutt-wizard-metu_stu" | ||
40 | tls_starttls off | ||
41 | |||
42 | account xyz | ||
43 | host mail.yigitsever.com | ||
44 | port 587 | ||
45 | from yigit@yigitsever.com | ||
46 | user yigit | ||
47 | passwordeval "pass mutt-wizard-xyz" | ||
diff --git a/.config/mutt/accounts/1-ceng_argor.muttrc b/.config/mutt/accounts/1-ceng_argor.muttrc new file mode 100644 index 0000000..1656992 --- /dev/null +++ b/.config/mutt/accounts/1-ceng_argor.muttrc | |||
@@ -0,0 +1,54 @@ | |||
1 | # vim: filetype=neomuttrc | ||
2 | # muttrc file for account ceng_argor | ||
3 | set realname = "Yigit Sever" | ||
4 | set from = "yigit@ceng.metu.edu.tr" | ||
5 | set sendmail = "msmtp -a ceng_argor" | ||
6 | alias me Yigit Sever <yigit@ceng.metu.edu.tr> | ||
7 | set folder = "/home/yigit/.local/share/mail/ceng_argor" | ||
8 | set header_cache = /home/yigit/.cache/mutt-wizard/ceng_argor/headers | ||
9 | set message_cachedir = /home/yigit/.cache/mutt-wizard/ceng_argor/bodies | ||
10 | set mbox_type = Maildir | ||
11 | |||
12 | bind index,pager gg noop | ||
13 | bind index,pager g noop | ||
14 | bind index,pager M noop | ||
15 | bind index,pager C noop | ||
16 | bind index gg first-entry | ||
17 | macro index o "<shell-escape>mailsync -V ceng_argor<enter>" "run mbsync to sync ceng_argor" | ||
18 | unmailboxes * | ||
19 | |||
20 | set spoolfile = "+INBOX" | ||
21 | set record = "+Sent" | ||
22 | set postponed = "+Drafts" | ||
23 | set trash = "+Trash" | ||
24 | |||
25 | named-mailboxes " 📬 inbox" =INBOX | ||
26 | named-mailboxes " 📦 archive" "=Archive" | ||
27 | named-mailboxes " 📜 drafts" "=Drafts" | ||
28 | named-mailboxes " 🐦 sent" "=Sent" | ||
29 | named-mailboxes " 🚮 trash" "=Trash" | ||
30 | named-mailboxes " 📥 tray" "=Tray" | ||
31 | |||
32 | macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" # mw-autogenerated | ||
33 | macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" # mw-autogenerated | ||
34 | macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" # mw-autogenerated | ||
35 | macro index,pager gs "<change-folder>=Sent<enter>" "go to sent" # mw-autogenerated | ||
36 | macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent" # mw-autogenerated | ||
37 | macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent" # mw-autogenerated | ||
38 | macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts" # mw-autogenerated | ||
39 | macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts" # mw-autogenerated | ||
40 | macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts" # mw-autogenerated | ||
41 | macro index,pager gt "<change-folder>=Trash<enter>" "go to trash" # mw-autogenerated | ||
42 | macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash" # mw-autogenerated | ||
43 | macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash" # mw-autogenerated | ||
44 | macro index,pager gS "<change-folder>=spam<enter>" "go to spam" # mw-autogenerated | ||
45 | macro index,pager MS ";<save-message>=spam<enter>" "move mail to spam" # mw-autogenerated | ||
46 | macro index,pager CS ";<copy-message>=spam<enter>" "copy mail to spam" # mw-autogenerated | ||
47 | macro index,pager ga "<change-folder>=Archive<enter>" "go to archive" # mw-autogenerated | ||
48 | macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive" # mw-autogenerated | ||
49 | macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive" # mw-autogenerated | ||
50 | macro index,pager gy "<change-folder>=Tray<enter>" "go to tray" # mw-autogenerated | ||
51 | macro index,pager My ";<save-message>=Tray<enter>" "move mail to tray" # mw-autogenerated | ||
52 | macro index,pager Cy ";<copy-message>=Tray<enter>" "copy mail to tray" # mw-autogenerated | ||
53 | |||
54 | set status_format="Ceng ArGor: %f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" | ||
diff --git a/.config/mutt/accounts/2-metu_argor.muttrc b/.config/mutt/accounts/2-metu_argor.muttrc new file mode 100644 index 0000000..cbbb53a --- /dev/null +++ b/.config/mutt/accounts/2-metu_argor.muttrc | |||
@@ -0,0 +1,48 @@ | |||
1 | # vim: filetype=neomuttrc | ||
2 | # muttrc file for account metu_argor | ||
3 | set realname = "Yigit Sever" | ||
4 | set from = "ysever@metu.edu.tr" | ||
5 | set sendmail = "msmtp -a metu_argor" | ||
6 | alias me Yigit Sever <ysever@metu.edu.tr> | ||
7 | set folder = "/home/yigit/.local/share/mail/metu_argor" | ||
8 | set header_cache = /home/yigit/.cache/mutt-wizard/metu_argor/headers | ||
9 | set message_cachedir = /home/yigit/.cache/mutt-wizard/metu_argor/bodies | ||
10 | set mbox_type = Maildir | ||
11 | |||
12 | bind index,pager gg noop | ||
13 | bind index,pager g noop | ||
14 | bind index,pager M noop | ||
15 | bind index,pager C noop | ||
16 | bind index gg first-entry | ||
17 | macro index o "<shell-escape>mailsync -V metu_argor<enter>" "run mbsync to sync metu_argor" | ||
18 | unmailboxes * | ||
19 | |||
20 | set spoolfile = "+INBOX" | ||
21 | set record = "+sent-mail" | ||
22 | set postponed = "+drafts" | ||
23 | set trash = "+Trash" | ||
24 | |||
25 | named-mailboxes " 📬 inbox" =INBOX | ||
26 | named-mailboxes " 📦 archive" "=Archive" | ||
27 | named-mailboxes " 📜 drafts" "=drafts" | ||
28 | named-mailboxes " 🐦 sent" "=sent-mail" | ||
29 | named-mailboxes " 🚮 trash" "=Trash" | ||
30 | named-mailboxes " 📥 tray" "=Tray" | ||
31 | |||
32 | macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" # mw-autogenerated | ||
33 | macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" # mw-autogenerated | ||
34 | macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" # mw-autogenerated | ||
35 | macro index,pager gs "<change-folder>=sent-mail<enter>" "go to sent" # mw-autogenerated | ||
36 | macro index,pager Ms ";<save-message>=sent-mail<enter>" "move mail to sent" # mw-autogenerated | ||
37 | macro index,pager Cs ";<copy-message>=sent-mail<enter>" "copy mail to sent" # mw-autogenerated | ||
38 | macro index,pager gd "<change-folder>=drafts<enter>" "go to drafts" # mw-autogenerated | ||
39 | macro index,pager Md ";<save-message>=drafts<enter>" "move mail to drafts" # mw-autogenerated | ||
40 | macro index,pager Cd ";<copy-message>=drafts<enter>" "copy mail to drafts" # mw-autogenerated | ||
41 | macro index,pager gt "<change-folder>=Trash<enter>" "go to trash" # mw-autogenerated | ||
42 | macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash" # mw-autogenerated | ||
43 | macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash" # mw-autogenerated | ||
44 | macro index,pager ga "<change-folder>=Archive<enter>" "go to archive" # mw-autogenerated | ||
45 | macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive" # mw-autogenerated | ||
46 | macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive" # mw-autogenerated | ||
47 | |||
48 | set status_format="METU ArGor: %f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" | ||
diff --git a/.config/mutt/accounts/3-ceng_stu.muttrc b/.config/mutt/accounts/3-ceng_stu.muttrc new file mode 100644 index 0000000..5e7472c --- /dev/null +++ b/.config/mutt/accounts/3-ceng_stu.muttrc | |||
@@ -0,0 +1,51 @@ | |||
1 | # vim: filetype=neomuttrc | ||
2 | # muttrc file for account ceng_stu | ||
3 | set realname = "Yigit Sever" | ||
4 | set from = "e2482057@ceng.metu.edu.tr" | ||
5 | set sendmail = "msmtp -a ceng_stu" | ||
6 | alias me Yigit Sever <e2482057@ceng.metu.edu.tr> | ||
7 | set folder = "/home/yigit/.local/share/mail/ceng_stu" | ||
8 | set header_cache = /home/yigit/.cache/mutt-wizard/ceng_stu/headers | ||
9 | set message_cachedir = /home/yigit/.cache/mutt-wizard/ceng_stu/bodies | ||
10 | set mbox_type = Maildir | ||
11 | |||
12 | bind index,pager gg noop | ||
13 | bind index,pager g noop | ||
14 | bind index,pager M noop | ||
15 | bind index,pager C noop | ||
16 | bind index gg first-entry | ||
17 | macro index o "<shell-escape>mailsync -V ceng_stu<enter>" "run mbsync to sync ceng_stu" | ||
18 | unmailboxes * | ||
19 | |||
20 | set spoolfile = "+INBOX" | ||
21 | set record = "+Sent" | ||
22 | set postponed = "+Drafts" | ||
23 | set trash = "+Trash" | ||
24 | |||
25 | named-mailboxes " 📬 inbox" =INBOX | ||
26 | named-mailboxes " 📦 archive" "=Archive" | ||
27 | named-mailboxes " 📜 drafts" "=Drafts" | ||
28 | named-mailboxes " 🐦 sent" "=Sent" | ||
29 | named-mailboxes " 🚮 trash" "=Trash" | ||
30 | named-mailboxes " 📥 tray" "=Tray" | ||
31 | |||
32 | macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" # mw-autogenerated | ||
33 | macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" # mw-autogenerated | ||
34 | macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" # mw-autogenerated | ||
35 | macro index,pager gs "<change-folder>=Sent<enter>" "go to sent" # mw-autogenerated | ||
36 | macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent" # mw-autogenerated | ||
37 | macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent" # mw-autogenerated | ||
38 | macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts" # mw-autogenerated | ||
39 | macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts" # mw-autogenerated | ||
40 | macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts" # mw-autogenerated | ||
41 | macro index,pager gt "<change-folder>=Trash<enter>" "go to trash" # mw-autogenerated | ||
42 | macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash" # mw-autogenerated | ||
43 | macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash" # mw-autogenerated | ||
44 | macro index,pager gS "<change-folder>=spam<enter>" "go to spam" # mw-autogenerated | ||
45 | macro index,pager MS ";<save-message>=spam<enter>" "move mail to spam" # mw-autogenerated | ||
46 | macro index,pager CS ";<copy-message>=spam<enter>" "copy mail to spam" # mw-autogenerated | ||
47 | macro index,pager ga "<change-folder>=Archive<enter>" "go to archive" # mw-autogenerated | ||
48 | macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive" # mw-autogenerated | ||
49 | macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive" # mw-autogenerated | ||
50 | |||
51 | set status_format="Ceng Student: %f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" | ||
diff --git a/.config/mutt/accounts/4-metu_stu.muttrc b/.config/mutt/accounts/4-metu_stu.muttrc new file mode 100644 index 0000000..959586d --- /dev/null +++ b/.config/mutt/accounts/4-metu_stu.muttrc | |||
@@ -0,0 +1,48 @@ | |||
1 | # vim: filetype=neomuttrc | ||
2 | # muttrc file for account metu_stu | ||
3 | set realname = "Yigit Sever" | ||
4 | set from = "e248205@metu.edu.tr" | ||
5 | set sendmail = "msmtp -a metu_stu" | ||
6 | alias me Yigit Sever <e248205@metu.edu.tr> | ||
7 | set folder = "/home/yigit/.local/share/mail/metu_stu" | ||
8 | set header_cache = /home/yigit/.cache/mutt-wizard/metu_stu/headers | ||
9 | set message_cachedir = /home/yigit/.cache/mutt-wizard/metu_stu/bodies | ||
10 | set mbox_type = Maildir | ||
11 | |||
12 | bind index,pager gg noop | ||
13 | bind index,pager g noop | ||
14 | bind index,pager M noop | ||
15 | bind index,pager C noop | ||
16 | bind index gg first-entry | ||
17 | macro index o "<shell-escape>mailsync -V metu_stu<enter>" "run mbsync to sync metu_stu" | ||
18 | unmailboxes * | ||
19 | |||
20 | set spoolfile = "+INBOX" | ||
21 | set record = "+sent-mail" | ||
22 | set postponed = "+drafts" | ||
23 | set trash = "+Trash" | ||
24 | |||
25 | named-mailboxes " 📬 inbox" =INBOX | ||
26 | named-mailboxes " 📦 archive" "=Archive" | ||
27 | named-mailboxes " 📜 drafts" "=drafts" | ||
28 | named-mailboxes " 🐦 sent" "=sent-mail" | ||
29 | named-mailboxes " 🚮 trash" "=Trash" | ||
30 | named-mailboxes " 📥 tray" "=Tray" | ||
31 | |||
32 | macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" # mw-autogenerated | ||
33 | macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" # mw-autogenerated | ||
34 | macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" # mw-autogenerated | ||
35 | macro index,pager gs "<change-folder>=sent-mail<enter>" "go to sent" # mw-autogenerated | ||
36 | macro index,pager Ms ";<save-message>=sent-mail<enter>" "move mail to sent" # mw-autogenerated | ||
37 | macro index,pager Cs ";<copy-message>=sent-mail<enter>" "copy mail to sent" # mw-autogenerated | ||
38 | macro index,pager gd "<change-folder>=drafts<enter>" "go to drafts" # mw-autogenerated | ||
39 | macro index,pager Md ";<save-message>=drafts<enter>" "move mail to drafts" # mw-autogenerated | ||
40 | macro index,pager Cd ";<copy-message>=drafts<enter>" "copy mail to drafts" # mw-autogenerated | ||
41 | macro index,pager gt "<change-folder>=Trash<enter>" "go to trash" # mw-autogenerated | ||
42 | macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash" # mw-autogenerated | ||
43 | macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash" # mw-autogenerated | ||
44 | macro index,pager ga "<change-folder>=Archive<enter>" "go to archive" # mw-autogenerated | ||
45 | macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive" # mw-autogenerated | ||
46 | macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive" # mw-autogenerated | ||
47 | |||
48 | set status_format="METU Student: %f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" | ||
diff --git a/.config/mutt/accounts/5-xyz.muttrc b/.config/mutt/accounts/5-xyz.muttrc new file mode 100644 index 0000000..f4b5432 --- /dev/null +++ b/.config/mutt/accounts/5-xyz.muttrc | |||
@@ -0,0 +1,53 @@ | |||
1 | # vim: filetype=neomuttrc | ||
2 | # muttrc file for account xyz | ||
3 | set realname = "yigit sever" | ||
4 | set from = "yigit@yigitsever.com" | ||
5 | set sendmail = "msmtp -a xyz" | ||
6 | alias me yigit sever <yigit@yigitsever.com> | ||
7 | set folder = "/home/yigit/.local/share/mail/xyz" | ||
8 | set header_cache = /home/yigit/.cache/mutt-wizard/xyz/headers | ||
9 | set message_cachedir = /home/yigit/.cache/mutt-wizard/xyz/bodies | ||
10 | set mbox_type = Maildir | ||
11 | |||
12 | bind index,pager gg noop | ||
13 | bind index,pager g noop | ||
14 | bind index,pager M noop | ||
15 | bind index,pager C noop | ||
16 | bind index gg first-entry | ||
17 | macro index o "<shell-escape>mailsync -V xyz<enter>" "run mbsync to sync xyz" | ||
18 | unmailboxes * | ||
19 | |||
20 | set spoolfile = "+INBOX" | ||
21 | set record = "+Sent" | ||
22 | set postponed = "+Drafts" | ||
23 | set trash = "+Trash" | ||
24 | |||
25 | named-mailboxes " 📬 inbox" =INBOX | ||
26 | named-mailboxes " 📦 archive" "=Archive" | ||
27 | named-mailboxes " 📜 drafts" "=Drafts" | ||
28 | named-mailboxes " 🐦 sent" "=Sent" | ||
29 | named-mailboxes " 🚮 junk" "=Junk" | ||
30 | named-mailboxes " ----- lists ----- " "=." | ||
31 | named-mailboxes " 🔢 l/crypto" "=lists/crypto" | ||
32 | named-mailboxes " 📅 l/remind" "=lists/remind" | ||
33 | |||
34 | macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" # mw-autogenerated | ||
35 | macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" # mw-autogenerated | ||
36 | macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" # mw-autogenerated | ||
37 | macro index,pager gs "<change-folder>=Sent<enter>" "go to sent" # mw-autogenerated | ||
38 | macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent" # mw-autogenerated | ||
39 | macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent" # mw-autogenerated | ||
40 | macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts" # mw-autogenerated | ||
41 | macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts" # mw-autogenerated | ||
42 | macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts" # mw-autogenerated | ||
43 | macro index,pager gj "<change-folder>=Junk<enter>" "go to junk" # mw-autogenerated | ||
44 | macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk" # mw-autogenerated | ||
45 | macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk" # mw-autogenerated | ||
46 | macro index,pager ga "<change-folder>=Archive<enter>" "go to archive" # mw-autogenerated | ||
47 | macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive" # mw-autogenerated | ||
48 | macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive" # mw-autogenerated | ||
49 | macro index,pager gc "<change-folder>=crypto<enter>" "go to crypto" | ||
50 | macro index,pager Mc ";<save-message>=crypto<enter>" "move mail to crypto" | ||
51 | macro index,pager Cc ";<copy-message>=crypto<enter>" "copy mail to crypto" | ||
52 | |||
53 | set status_format="yigitsever.com: %f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" | ||
diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc index 6bb2b11..55762c0 100644 --- a/.config/mutt/muttrc +++ b/.config/mutt/muttrc | |||
@@ -1,15 +1,160 @@ | |||
1 | # vim: filetype=neomuttrc | 1 | # vim: filetype=neomuttrc |
2 | source /usr/local/share/mutt-wizard/mutt-wizard.muttrc # mw-autogenerated | 2 | ############ |
3 | source /home/yigit/.config/mutt/accounts/1-ceng_argor.muttrc # mw-autogenerated | 3 | # stolen # |
4 | macro index,pager i1 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/1-ceng_argor.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@ceng.metu.edu.tr" # mw-autogenerated | 4 | ############ |
5 | macro index,pager i2 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/2-metu_argor.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to ysever@metu.edu.tr" # mw-autogenerated | 5 | set mailcap_path = /home/yigit/.config/mutt/mailcap |
6 | macro index,pager i3 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/3-ceng_stu.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to e2482057@ceng.metu.edu.tr" # mw-autogenerated | 6 | set date_format="%y/%m/%d %I:%M%p" |
7 | macro index,pager i4 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/4-metu_stu.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to e248205@metu.edu.tr" # mw-autogenerated | 7 | set smtp_authenticators = 'gssapi:login' |
8 | macro index,pager i5 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/5-xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@yigitsever.com" # mw-autogenerated | 8 | set rfc2047_parameters = yes |
9 | set mark_old = no # Unread mail stay unread until read | ||
10 | set mime_forward = yes # attachments are forwarded with mail | ||
11 | set fast_reply # skip to compose when replying | ||
12 | set fcc_attach # save attachments with the body | ||
13 | set forward_format = "Fwd: %s" # format of subject when forwarding | ||
14 | set forward_quote # include message in forwards | ||
15 | set reverse_name # reply as whomever it was to | ||
16 | set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example) | ||
17 | auto_view text/html # automatically show html (mailcap uses w3m) | ||
18 | auto_view application/pgp-encrypted | ||
19 | alternative_order text/plain text/enriched text/html | ||
20 | bind index,pager i noop | ||
21 | bind index,pager g noop | ||
22 | bind index \Cf noop | ||
23 | |||
24 | # General rebindings | ||
25 | bind index j next-entry | ||
26 | bind index k previous-entry | ||
27 | bind attach <return> view-mailcap | ||
28 | bind attach l view-mailcap | ||
29 | bind editor <space> noop | ||
30 | bind index G last-entry | ||
31 | bind index gg first-entry | ||
32 | bind pager,attach h exit | ||
33 | bind pager j next-line | ||
34 | bind pager k previous-line | ||
35 | bind pager l view-attachments | ||
36 | bind index D delete-message | ||
37 | bind index U undelete-message | ||
38 | bind index L limit | ||
39 | bind index h noop | ||
40 | bind index l display-message | ||
41 | bind index,query <space> tag-entry | ||
42 | macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder" | ||
43 | bind index,pager H view-raw-message | ||
44 | bind browser l select-entry | ||
45 | bind pager,browser gg top-page | ||
46 | bind pager,browser G bottom-page | ||
47 | bind index,pager,browser d half-down | ||
48 | bind index,pager,browser u half-up | ||
49 | bind index,pager S sync-mailbox | ||
50 | bind index,pager R group-reply | ||
51 | bind index \031 previous-undeleted # Mouse wheel | ||
52 | bind index \005 next-undeleted # Mouse wheel | ||
53 | bind pager \031 previous-line # Mouse wheel | ||
54 | bind pager \005 next-line # Mouse wheel | ||
55 | bind editor <Tab> complete-query | ||
56 | |||
57 | macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read" | ||
58 | macro index O "<shell-escape>mbsync -a<enter>" "run mbsync to sync all mail" | ||
59 | macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern" | ||
60 | macro index a "<limit>all\n" "show all messages (undo limit)" | ||
61 | |||
62 | # Sidebar mappings | ||
63 | set sidebar_visible = yes | ||
64 | set sidebar_width = 20 | ||
65 | set sidebar_short_path = yes | ||
66 | set sidebar_next_new_wrap = yes | ||
67 | set mail_check_stats | ||
68 | bind index,pager \Ck sidebar-prev | ||
69 | bind index,pager \Cj sidebar-next | ||
70 | bind index,pager \Co sidebar-open | ||
71 | bind index,pager \Cp sidebar-prev-new | ||
72 | bind index,pager \Cn sidebar-next-new | ||
73 | bind index,pager B sidebar-toggle-visible | ||
74 | |||
75 | # Default index colors: | ||
76 | color index yellow default '.*' | ||
77 | color index_author red default '.*' | ||
78 | color index_number blue default | ||
79 | color index_subject cyan default '.*' | ||
80 | |||
81 | # New mail is boldened: | ||
82 | color index brightyellow black "~N" | ||
83 | color index_author brightred black "~N" | ||
84 | color index_subject brightcyan black "~N" | ||
85 | |||
86 | # Tagged mail is highlighted: | ||
87 | color index brightyellow blue "~T" | ||
88 | color index_author brightred blue "~T" | ||
89 | color index_subject brightcyan blue "~T" | ||
90 | |||
91 | # Other colors and aesthetic settings: | ||
92 | mono bold bold | ||
93 | mono underline underline | ||
94 | mono indicator reverse | ||
95 | mono error bold | ||
96 | color normal default default | ||
97 | color indicator brightblack white | ||
98 | color sidebar_highlight red default | ||
99 | color sidebar_divider brightblack black | ||
100 | color sidebar_flagged red black | ||
101 | color sidebar_new green black | ||
102 | color normal brightyellow default | ||
103 | color error red default | ||
104 | color tilde black default | ||
105 | color message cyan default | ||
106 | color markers red white | ||
107 | color attachment white default | ||
108 | color search brightmagenta default | ||
109 | color status brightyellow black | ||
110 | color hdrdefault brightgreen default | ||
111 | color quoted green default | ||
112 | color quoted1 blue default | ||
113 | color quoted2 cyan default | ||
114 | color quoted3 yellow default | ||
115 | color quoted4 red default | ||
116 | color quoted5 brightred default | ||
117 | color signature brightgreen default | ||
118 | color bold black default | ||
119 | color underline black default | ||
120 | color normal default default | ||
121 | |||
122 | # Regex highlighting: | ||
123 | color header blue default ".*" | ||
124 | color header brightmagenta default "^(From)" | ||
125 | color header brightcyan default "^(Subject)" | ||
126 | color header brightwhite default "^(CC|BCC)" | ||
127 | color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses | ||
128 | color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL | ||
129 | color body green default "\`[^\`]*\`" # Green text between ` and ` | ||
130 | color body brightblue default "^# \.*" # Headings as bold blue | ||
131 | color body brightcyan default "^## \.*" # Subheadings as bold cyan | ||
132 | color body brightgreen default "^### \.*" # Subsubheadings as bold green | ||
133 | color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow | ||
134 | color body brightcyan default "[;:][-o][)/(|]" # emoticons | ||
135 | color body brightcyan default "[;:][)(|]" # emoticons | ||
136 | color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon? | ||
137 | color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon? | ||
138 | color body red default "(BAD signature)" | ||
139 | color body cyan default "(Good signature)" | ||
140 | color body brightblack default "^gpg: Good signature .*" | ||
141 | color body brightyellow default "^gpg: " | ||
142 | color body brightyellow red "^gpg: BAD signature from.*" | ||
143 | mono body bold "^gpg: Good signature" | ||
144 | mono body bold "^gpg: BAD signature from.*" | ||
145 | color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" | ||
9 | 146 | ||
10 | bind generic z noop | 147 | bind generic z noop |
11 | bind generic Z noop | 148 | bind generic Z noop |
12 | 149 | ||
150 | source /home/yigit/.config/mutt/accounts/1-ceng_argor.muttrc | ||
151 | macro index,pager i1 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/1-ceng_argor.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@ceng.metu.edu.tr" | ||
152 | macro index,pager i2 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/2-metu_argor.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to ysever@metu.edu.tr" | ||
153 | macro index,pager i3 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/3-ceng_stu.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to e2482057@ceng.metu.edu.tr" | ||
154 | macro index,pager i4 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/4-metu_stu.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to e248205@metu.edu.tr" | ||
155 | macro index,pager i5 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/5-xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@yigitsever.com" | ||
156 | |||
157 | # to set vim autocommands | ||
13 | set tmpdir="/tmp/neomutt" | 158 | set tmpdir="/tmp/neomutt" |
14 | 159 | ||
15 | # character set for outgoing messages | 160 | # character set for outgoing messages |
@@ -64,20 +209,12 @@ set sleep_time=0 | |||
64 | set abort_nosubject=no | 209 | set abort_nosubject=no |
65 | set abort_unmodified=no | 210 | set abort_unmodified=no |
66 | 211 | ||
67 | # # Cache message headers here. This takes very little space and makes opening large folders much faster. | ||
68 | # # See header-caching | ||
69 | # # Big conf file does this for us, ~y | ||
70 | # set header_cache=~/.config/mutt/cache/headers/ | ||
71 | |||
72 | # # Make things faster at the cost of a negligible amount of disk space. | ||
73 | # # See <file:///usr/share/doc/neomutt/manual.html#body-caching>. | ||
74 | # # Big conf file does this for us | ||
75 | # set message_cachedir=~/.config/mutt/cache/ | ||
76 | |||
77 | # TODO: maybe check out <https://github.com/pimutils/mates.rs>. | 212 | # TODO: maybe check out <https://github.com/pimutils/mates.rs>. |
78 | set query_command="khard email --parsable '%s'" | 213 | set query_command="khard email --parsable '%s'" |
79 | # The editor menu is "command-line mode", i.e., what you when hitting colon. | 214 | # The editor menu is "command-line mode", i.e., what you when hitting colon. |
80 | # See <file:///usr/share/doc/neomutt/manual.html#editor-map>. | 215 | # See <file:///usr/share/doc/neomutt/manual.html#editor-map>. |
216 | unset query_command | ||
217 | # TODO: and we are immediately unsetting it, dunno why <12-10-21, yigit> # | ||
81 | 218 | ||
82 | # When a message contains both plain text and HTML, prefer viewing plain text. | 219 | # When a message contains both plain text and HTML, prefer viewing plain text. |
83 | alternative_order text/plain text/html | 220 | alternative_order text/plain text/html |
@@ -87,8 +224,8 @@ bind editor <Tab> complete-query | |||
87 | # The format string reduces the amount of information compared to the default and doesn't use hyphens for padding. | 224 | # The format string reduces the amount of information compared to the default and doesn't use hyphens for padding. |
88 | # See <http://www.mutt.org/doc/manual/#status-format>. | 225 | # See <http://www.mutt.org/doc/manual/#status-format>. |
89 | # set status_format="%f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" | 226 | # set status_format="%f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" |
90 | # set index_format="hi" | ||
91 | set index_format="%2C %Z %?X?A& ? %[%e %b %y %R] %-15.15F %s (%-4.4c)" | 227 | set index_format="%2C %Z %?X?A& ? %[%e %b %y %R] %-15.15F %s (%-4.4c)" |
228 | set sidebar_format = "%D%?F? [%F]?%* %?N?%N/? %?S?%S?" | ||
92 | 229 | ||
93 | # See <file:///usr/share/doc/neomutt/manual.html#compose-format>). | 230 | # See <file:///usr/share/doc/neomutt/manual.html#compose-format>). |
94 | # Also get rid of the hyphens again. | 231 | # Also get rid of the hyphens again. |
@@ -106,8 +243,6 @@ set crypt_opportunistic_encrypt = no | |||
106 | set pgp_self_encrypt = yes | 243 | set pgp_self_encrypt = yes |
107 | set pgp_default_key = 198466C2F5664940F73A1715B87B63C533C38A88 | 244 | set pgp_default_key = 198466C2F5664940F73A1715B87B63C533C38A88 |
108 | 245 | ||
109 | unset query_command | ||
110 | |||
111 | macro index,pager A \ | 246 | macro index,pager A \ |
112 | "<pipe-message>khard add-email<return>" \ | 247 | "<pipe-message>khard add-email<return>" \ |
113 | "add the sender email address to khard" | 248 | "add the sender email address to khard" |
@@ -145,5 +280,3 @@ color index_flags color239 default "EDAS" | |||
145 | color index_subject color239 default "~f @igi-global.com" | 280 | color index_subject color239 default "~f @igi-global.com" |
146 | color index_author color239 default "~f @igi-global.com" | 281 | color index_author color239 default "~f @igi-global.com" |
147 | color index_flags color239 default "~f @igi-global.com" | 282 | color index_flags color239 default "~f @igi-global.com" |
148 | |||
149 | set sidebar_format = "%D%?F? [%F]?%* %?N?%N/? %?S?%S?" | ||
diff --git a/.local/bin/mailsync b/.local/bin/mailsync new file mode 100755 index 0000000..ae0801c --- /dev/null +++ b/.local/bin/mailsync | |||
@@ -0,0 +1,76 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Sync mail and give notification if there is new mail. | ||
4 | |||
5 | # Run only if user logged in (prevent cron errors) | ||
6 | pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;} | ||
7 | # Run only if not already running in other instance | ||
8 | pgrep -x mbsync >/dev/null && { notify-send --app-name="mailsync" "mbsync is already running" "you should fix this" ; exit ;} | ||
9 | |||
10 | if [[ -f "$HOME/.local/share/.dnd" ]]; then | ||
11 | echo "do not disturb is on" | ||
12 | exit | ||
13 | fi | ||
14 | |||
15 | # Checks for internet connection and set notification script. | ||
16 | ping -q -c 1 1.1.1.1 > /dev/null || ping -q -c 1 1.0.0.1 > /dev/null || ping -q -c 1 example.org || { echo "No internet connection detected."; exit ;} | ||
17 | command -v notify-send >/dev/null || echo "Note that \`libnotify\` or \`libnotify-send\` should be installed for pop-up mail notifications with this script." | ||
18 | |||
19 | # Required to display notifications if run as a cronjob: | ||
20 | export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus | ||
21 | export DISPLAY=:0.0 | ||
22 | |||
23 | # For individual configurations: | ||
24 | [ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store" | ||
25 | |||
26 | # Settings are different for MacOS (Darwin) systems. | ||
27 | if [ "$(uname)" = "Darwin" ]; then | ||
28 | notify() { osascript -e "display notification \"$2 in $1\" with title \"You've got Mail\" subtitle \"Account: $account\"" && sleep 2 ;} | ||
29 | messageinfo() { osascript -e "display notification with title \"📧 $from\" subtitle \"$subject\"" ;} | ||
30 | else | ||
31 | notify() { notify-send --icon="mail_new" --app-name="excerpt" "\`$1\`" "📬 $2 new mail(s)" ;} | ||
32 | messageinfo() { notify-send --icon="mail-mark-unread" --app-name="mutt" "📧 $from" "$subject" ;} | ||
33 | fi | ||
34 | |||
35 | # Check account for new mail. Notify if there is new content. | ||
36 | syncandnotify() { | ||
37 | acc="$(echo "$account" | sed "s/.*\///")" | ||
38 | if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi | ||
39 | new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null) | ||
40 | newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) | ||
41 | if [ "$newcount" -gt "0" ]; then | ||
42 | notify "$acc" "$newcount" & | ||
43 | for file in $new; do | ||
44 | # Extract subject and sender from mail. | ||
45 | from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//') | ||
46 | subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n 1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n') | ||
47 | messageinfo & | ||
48 | done | ||
49 | fi | ||
50 | } | ||
51 | |||
52 | # Sync accounts passed as argument or all. | ||
53 | if [ "$#" -eq "0" ]; then | ||
54 | accounts="$(awk '/^Channel/ {print $2}' "$HOME/.mbsyncrc")" | ||
55 | else | ||
56 | for arg in "$@"; do | ||
57 | [ "${arg%${arg#?}}" = '-' ] && opts="${opts:+${opts} }${arg}" && shift 1 | ||
58 | done | ||
59 | accounts=$* | ||
60 | fi | ||
61 | |||
62 | # ( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null | ||
63 | |||
64 | # Parallelize multiple accounts | ||
65 | for account in $accounts | ||
66 | do | ||
67 | syncandnotify & | ||
68 | done | ||
69 | |||
70 | wait | ||
71 | # ( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null | ||
72 | |||
73 | notmuch new 2>/dev/null | ||
74 | |||
75 | #Create a touch file that indicates the time of the last run of mailsync | ||
76 | touch "$HOME/.config/mutt/.mailsynclastrun" | ||
diff --git a/.local/bin/openfile b/.local/bin/openfile new file mode 100755 index 0000000..cf3c6c3 --- /dev/null +++ b/.local/bin/openfile | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Helps open a file with xdg-open from mutt in a external program without weird side effects. | ||
4 | tempdir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard/files" | ||
5 | file="$tempdir/$(basename "$1")" | ||
6 | [ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid -f xdg-open" | ||
7 | mkdir -p "$tempdir" | ||
8 | cp -f "$1" "$file" | ||
9 | $opener "$file" >/dev/null 2>&1 | ||
10 | find "${tempdir:?}" -mtime +1 -type f -delete | ||
diff --git a/.mbsyncrc b/.mbsyncrc new file mode 100644 index 0000000..703c2f0 --- /dev/null +++ b/.mbsyncrc | |||
@@ -0,0 +1,131 @@ | |||
1 | IMAPStore ceng_argor-remote | ||
2 | Host imap.ceng.metu.edu.tr | ||
3 | Port 993 | ||
4 | User yigit | ||
5 | PassCmd "pass mutt-wizard-ceng_argor" | ||
6 | AuthMechs LOGIN | ||
7 | SSLType IMAPS | ||
8 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
9 | |||
10 | MaildirStore ceng_argor-local | ||
11 | Subfolders Verbatim | ||
12 | Path ~/.local/share/mail/ceng_argor/ | ||
13 | Inbox ~/.local/share/mail/ceng_argor/INBOX | ||
14 | Flatten . | ||
15 | |||
16 | Channel ceng_argor | ||
17 | Expunge Both | ||
18 | Far :ceng_argor-remote: | ||
19 | Near :ceng_argor-local: | ||
20 | Patterns * !"[Gmail]/All Mail" | ||
21 | Create Both | ||
22 | SyncState * | ||
23 | MaxMessages 0 | ||
24 | ExpireUnread no | ||
25 | # End profile | ||
26 | |||
27 | IMAPStore metu_argor-remote | ||
28 | Host imap.metu.edu.tr | ||
29 | Port 993 | ||
30 | User ysever | ||
31 | PassCmd "pass mutt-wizard-metu_argor" | ||
32 | AuthMechs LOGIN | ||
33 | SSLType IMAPS | ||
34 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
35 | |||
36 | MaildirStore metu_argor-local | ||
37 | Subfolders Verbatim | ||
38 | Path ~/.local/share/mail/metu_argor/ | ||
39 | Inbox ~/.local/share/mail/metu_argor/INBOX | ||
40 | Flatten . | ||
41 | |||
42 | Channel metu_argor | ||
43 | Expunge Both | ||
44 | Far :metu_argor-remote: | ||
45 | Near :metu_argor-local: | ||
46 | Patterns * !"[Gmail]/All Mail" | ||
47 | Create Both | ||
48 | SyncState * | ||
49 | MaxMessages 0 | ||
50 | ExpireUnread no | ||
51 | # End profile | ||
52 | |||
53 | IMAPStore ceng_stu-remote | ||
54 | Host imap.ceng.metu.edu.tr | ||
55 | Port 993 | ||
56 | User e2482057 | ||
57 | PassCmd "pass mutt-wizard-ceng_stu" | ||
58 | AuthMechs LOGIN | ||
59 | SSLType IMAPS | ||
60 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
61 | |||
62 | MaildirStore ceng_stu-local | ||
63 | Subfolders Verbatim | ||
64 | Path ~/.local/share/mail/ceng_stu/ | ||
65 | Inbox ~/.local/share/mail/ceng_stu/INBOX | ||
66 | Flatten . | ||
67 | |||
68 | Channel ceng_stu | ||
69 | Expunge Both | ||
70 | Far :ceng_stu-remote: | ||
71 | Near :ceng_stu-local: | ||
72 | Patterns * !"[Gmail]/All Mail" | ||
73 | Create Both | ||
74 | SyncState * | ||
75 | MaxMessages 0 | ||
76 | ExpireUnread no | ||
77 | # End profile | ||
78 | |||
79 | IMAPStore metu_stu-remote | ||
80 | Host imap.metu.edu.tr | ||
81 | Port 993 | ||
82 | User e248205 | ||
83 | PassCmd "pass mutt-wizard-metu_stu" | ||
84 | AuthMechs LOGIN | ||
85 | SSLType IMAPS | ||
86 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
87 | |||
88 | MaildirStore metu_stu-local | ||
89 | Subfolders Verbatim | ||
90 | Path ~/.local/share/mail/metu_stu/ | ||
91 | Inbox ~/.local/share/mail/metu_stu/INBOX | ||
92 | Flatten . | ||
93 | |||
94 | Channel metu_stu | ||
95 | Expunge Both | ||
96 | Far :metu_stu-remote: | ||
97 | Near :metu_stu-local: | ||
98 | Patterns * !"[Gmail]/All Mail" | ||
99 | Create Both | ||
100 | SyncState * | ||
101 | MaxMessages 0 | ||
102 | ExpireUnread no | ||
103 | # End profile | ||
104 | |||
105 | |||
106 | IMAPStore xyz-remote | ||
107 | Host mail.yigitsever.com | ||
108 | Port 993 | ||
109 | User yigit | ||
110 | PassCmd "pass mutt-wizard-xyz" | ||
111 | AuthMechs LOGIN | ||
112 | SSLType IMAPS | ||
113 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
114 | |||
115 | MaildirStore xyz-local | ||
116 | Subfolders Verbatim | ||
117 | Path ~/.local/share/mail/xyz/ | ||
118 | Inbox ~/.local/share/mail/xyz/INBOX | ||
119 | |||
120 | Channel xyz | ||
121 | Expunge Both | ||
122 | Far :xyz-remote: | ||
123 | Near :xyz-local: | ||
124 | Remove Both | ||
125 | Patterns * !"[Gmail]/All Mail" | ||
126 | Create Both | ||
127 | SyncState * | ||
128 | MaxMessages 0 | ||
129 | ExpireUnread no | ||
130 | # End profile | ||
131 | |||