/* function format argument */
{ temp, " 🌡 %s°C | ",
"/sys/class/thermal/thermal_zone1/temp"},
- { num_files, "✉ %s | ",
- "/home/mrl/.local/share/offlineimap/mail/INBOX/new" },
+ { num_files, "N✉ %s | ",
+ "/home/mrl/.local/share/offlineimap/mail/net/INBOX/new" },
+ { num_files, "R✉ %s | ",
+ "/home/mrl/.local/share/offlineimap/mail/ru/INBOX/new" },
{ keymap, "%s | ", NULL },
#ifdef LAPTOP
// { wifi_essid, "W %s ", "wlp1s0" },
--- /dev/null
+set spoolfile=+/INBOX/
+set postponed=+/Drafts/
+# source net on first open
+source ~/.config/mutt/net.muttrc
+
# Basic information
-set from="Mart Lubbers <mart@martlubbers.net>"
alternates "(mart@cs\.ru\.nl|m\.lubbers@cs\.ru\.nl|mart@martlubbers\.net|Mart\.Lubbers@ru\.nl)"
set use_from=yes
set reverse_name=yes
set envelope_from=yes
set mbox_type=Maildir
-set folder=~/.local/share/offlineimap/mail
-set spoolfile=+/INBOX/
-set record=+/Sent/
-set postponed=+/Drafts/
set mask="!^\\.[^.]"
source ~/.local/share/offlineimap/mailboxes
# Set the correct msmtp account for the different addresses
send2-hook '~f mart@martlubbers.net'\
'set sendmail="checkattach.sh msmtp -a net"'
-send2-hook '((~f m.lubbers@cs.ru.nl)|(~f m.lubbers@science.ru.nl)|(~f mart@cs.ru.nl)|(~f m.lubbers@cs.ru.nl))'\
+send2-hook '((~f m.lubbers@cs.ru.nl)|(~f m.lubbers@science.ru.nl)|(~f mart@cs.ru.nl))'\
+ 'set sendmail="checkattach.sh msmtp -a ru"'
+send2-hook '((~f mart.lubbers@ru.nl))'\
'set sendmail="checkattach.sh msmtp -a ru"'
# Macro for switching to the ru address
alias identity_1 Mart Lubbers <mart@martlubbers.net>
alias identity_2 Mart Lubbers <mart@cs.ru.nl>
macro compose v "<edit-from>^Uidentity\_<tab>" "Select from"
-macro compose <esc>1 "<esc>f^UMart Lubbers <mart@martlubbers.net><enter>"
-macro compose <esc>2 "<esc>f^UMart Lubbers <mart@cs.ru.nl><enter>"
+macro compose <esc>1 "<esc>f^UMart Lubbers <mart@martlubbers.net><enter>ps"
+macro compose <esc>2 "<esc>f^UMart Lubbers <mart@cs.ru.nl><enter>ps"
+macro compose <esc>3 "<esc>f^UMart Lubbers <mart.lubbers@ru.nl><enter>pc"
+
+macro index,compose <esc>1 "<enter-command>source ~/.config/mutt/net.muttrc<enter><change-folder>=INBOX<enter>"
+macro index,compose <esc>2 "<enter-command>source ~/.config/mutt/ru.muttrc<enter><change-folder>=INBOX<enter>"
+folder-hook ~/.local/share/offlineimap/mail/net/* 'source ~/.config/mutt/net.muttrc'
+folder-hook ~/.local/share/offlineimap/mail/ru/* 'source ~/.config/mutt/ru.muttrc'
# Key bindings
bind index gg first-entry
# Misc options
set timeout=2
+set sleep_time=0
set mail_check=0
set include=yes
set delete=yes
set sort_browser=alpha
set sort=threads
set sort_aux=date
-set editor="vim -c '%!proofpoint_decoder'"
+set editor="vim -c '%'"
set duplicate_threads=yes
ignore headers *
unignore headers from to subject date cc
set mailcap_path=~/.config/mutt/mailcap
set mailcap_sanitize=yes
-set display_filter="proofpoint_decoder"
# w3m --dump
auto_view text/html
--- /dev/null
+set from="Mart Lubbers <mart@martlubbers.net>"
+set folder=~/.local/share/offlineimap/mail/net
+set record=+/Sent/
+
+# reload common things that depend on $folder
+source ~/.config/mutt/common.muttrc
--- /dev/null
+set from="Mart Lubbers <mart@cs.ru.nl>"
+set folder=~/.local/share/offlineimap/mail/ru
+set record=+/INBOX.Sent/
+
+# reload common things that depend on $folder
+source ~/.config/mutt/common.muttrc
[user]
name=Mart Lubbers
primary_email=mart@martlubbers.net
-other_email=martlubbers@gmail.com,mart-lubbers@hotmail.com,mail@rooslubbers.nl,mart@cs.ru.nl
+other_email=martlubbers@gmail.com,mart-lubbers@hotmail.com,mail@rooslubbers.nl,mart@cs.ru.nl,mart.lubbers@ru.nl,mlubbers@cs.ru.nl
# Configuration for "notmuch new"
#
[general]
-pythonfile = ~/.config/offlineimap/offlineimap.py
metadata = ~/.local/share/offlineimap
-accounts = net
+accounts = net,ru
ui = blinkenlights
+pythonfile = ~/.config/offlineimap/offlineimap.py
+
+[mbnames]
+enabled = yes
+filename = ~/.local/share/offlineimap/mailboxes
+header = "mailboxes "
+peritem = "~/.local/share/offlineimap/mail/%(accountname)s/%(foldername)s/"
+sep = " "
+footer = "\n"
+incremental = yes
[Account net]
-localrepository = Local
-remoterepository = Remote
+localrepository = netLocal
+remoterepository = netRemote
autorefresh = 6
quick = 10
postsynchook = newmail.sh
-#proxy = SOCKS5:localhost:8008
-[Repository Local]
+[Account ru]
+localrepository = ruLocal
+remoterepository = ruRemote
+autorefresh = 6
+quick = 10
+postsynchook = newmail.sh
+
+[Repository netLocal]
type = Maildir
-localfolders = ~/.local/share/offlineimap/mail
+localfolders = ~/.local/share/offlineimap/mail/net
-[Repository Remote]
+[Repository ruLocal]
+type = Maildir
+localfolders = ~/.local/share/offlineimap/mail/ru
+
+[Repository netRemote]
type = IMAP
folderfilter = lambda x: folderfilter(x)
-remotepasseval = mailpasswd()
+remotepasseval = mailpasswdnet()
remotehost = lubbers.email
remoteuser = mart@martlubbers.net
ssl = yes
holdconnectionopen = yes
idlefolders = ['INBOX']
-[mbnames]
-enabled = yes
-filename = ~/.local/share/offlineimap/mailboxes
-header = "mailboxes "
-peritem = "~/.local/share/offlineimap/mail/%(foldername)s/"
-sep = " "
-footer = "\n"
-incremental = yes
+[Repository ruRemote]
+type = IMAP
+remotepasseval = mailpasswdru()
+remotehost = post.science.ru.nl
+remoteuser = mlubbers
+ssl = yes
+sslcacertfile = /etc/ssl/certs/ca-certificates.crt
+keepalive = 60
+holdconnectionopen = yes
+idlefolders = ['INBOX']
import re
-def mailpasswd():
+def mailpasswdnet():
return subprocess.check_output('pass mail/mart@martlubbers.net',
shell='/bin/bash').strip()
-
+def mailpasswdru():
+ return subprocess.check_output('pass science.ru.nl/mlubbers',
+ shell='/bin/bash').strip()
def folderfilter(x):
match = re.match('archive\.(\d\d\d\d).(\d\d)', x)
#!/bin/sh
tmux -f ~/.config/tmux/config\
- new-session -s mail -d 'update && offlineimap' \;\
- new-window 'mutt' \;\
- new-window 'ssh ygdrassil' \;\
- new-session -s work \;\
- attach-session -t mail \;\
+ new-session -s mail -d 'offlineimap -a net' \;\
+ split-window -h 'offlineimap -a ru' \;\
+ split-window -v 'update' \;\
+ new-window 'mutt' \;\
+ new-session -s work \;\
+ attach-session -t mail \;\
select-window -t:1
exec tmux attach
#!/bin/sh
NUL=">/dev/null 2>&1"
-offlineimap -o -u ttyui
vdirsyncer sync
cmd() {