diff --git a/README.md b/README.md index f290673..36e32e1 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ``` git > global git config & aliases lftp > sftp management +mail > mail config - mutt/mbsync mpd > music player daemon config ncmpcpp > ncurses mpc++ ui/colour settings & playlists npm > npm configuration (ha ha) @@ -16,7 +17,7 @@ weechat > irc client ui/colour configuration zsh > shell, aliases and cool stuff ``` -`git clone git@github.com:grawlinson/dotfiles.git ~/.dotfiles` +`git clone https://github.com/grawlinson/dotfiles.git ~/.dotfiles` Clone repository, then setup as desired. diff --git a/SOFTWARE.md b/SOFTWARE.md index 22fe97c..ccc63fa 100644 --- a/SOFTWARE.md +++ b/SOFTWARE.md @@ -9,7 +9,7 @@ * ownCloud client * KeepassX2 * PulseAudio+pavucontrol -* Fonts (infinality-bundle ibfonts-meta-extended) +* Fonts (ttf-dejavu, noto-fonts, powerline-fonts) * LaTeX (texlive-most) ## Browsers @@ -43,6 +43,7 @@ ## Terminal +* termite * weechat * zsh * screenfetch+scrot @@ -51,5 +52,8 @@ * lftp * nvim * unzip -* rxvt-unicode * tmux +* ncdu +* (neo)mutt +* notmuch +* isync (aka mbsync) diff --git a/mail/.config/mutt/accounts/gmail b/mail/.config/mutt/accounts/gmail new file mode 100644 index 0000000..5505a10 --- /dev/null +++ b/mail/.config/mutt/accounts/gmail @@ -0,0 +1,19 @@ +# clear previously defined mailboxes +#unmailboxes * + +set mbox = "+gmail/Archive" +set postponed = "+gmail/Drafts" +set trash = "+gmail/Trash" +unset record # gmail automatically records outgoing emails + +set realname = "George Rawlinson" +set from = "george@rawlinson.net.nz" + +# smtp settings +set smtp_pass= `pass mail/george@rawlinson.net.nz` +set smtp_url=smtp://$from@smtp.gmail.com:587 + +# gmail specific macros +macro index A "+gmail/Archive" "move message to the archive" +macro index S "+gmail/Spam" "mark message as spam" +macro index D "+gmail/Trash" "move message to the trash" diff --git a/mail/.config/mutt/accounts/nullpointer b/mail/.config/mutt/accounts/nullpointer new file mode 100644 index 0000000..e0ae5f0 --- /dev/null +++ b/mail/.config/mutt/accounts/nullpointer @@ -0,0 +1,19 @@ +# clear previously defined mailboxes +#unmailboxes * + +set mbox = "+nullpointer/Archive" +set postponed = "+nullpointer/Drafts" +set trash = "+nullpointer/Trash" +set record = $XDG_DATA_HOME/mutt/record/sent + +set realname = "George Rawlinson" +set from = "george@nullpointer.io" + +# smtp settings +set smtp_pass = `pass mail/george@nullpointer.io` +set smtp_url=smtp://$from@mail.gandi.net:587 + +# nullpointer specific macros +macro index A "+nullpointer/Archive" "move message to the archive" +macro index S "+nullpointer/Spam" "mark message as spam" +macro index D "+nullpointer/Trash" "move message to the trash" diff --git a/mail/.config/mutt/bindings b/mail/.config/mutt/bindings new file mode 100644 index 0000000..c1aff8e --- /dev/null +++ b/mail/.config/mutt/bindings @@ -0,0 +1,9 @@ +# sidebar +bind index,pager \Ck sidebar-prev # select previous folder +bind index,pager \Cj sidebar-next # select next folder +bind index,pager \Co sidebar-open # open selected folder +bind index,pager B sidebar-toggle-visible # toggle sidebar + +# message - todo +#bind index,pager k previous-line +#bind index,pager j next-line diff --git a/mail/.config/mutt/colours b/mail/.config/mutt/colours new file mode 100644 index 0000000..25d270d --- /dev/null +++ b/mail/.config/mutt/colours @@ -0,0 +1,38 @@ +# sidebar colours +color sidebar_new blue black # mailboxes containing new mail +color sidebar_highlight black green # cursor to select mailbox +color sidebar_indicator black blue # current open mailbox +color sidebar_divider blue black # divider between sidebar/index + +# general ui +color status blue black # colour for status line +color indicator black blue # currently selected message +color tree cyan default # arrow in threads + +# mail colours +color index magenta black ~N # new messages +color index yellow black ~O # old messages +color index red black ~D # to-be-deleted +color index yellow black ~P # self-mail + +# index +color index_flags red black '~N' # new messages +color index_flags red black '~O' # old messages +color index_flags yellow black '~P' # self-mail +color index_flags blue black '~Q' # messages replied to +color index_author default black '.*' # author colour +color index_date green default # date colour +color index_label default brightgreen # ??? + +# quoting depths +color quoted green default +color quoted1 green default +color quoted2 blue default +color quoted3 blue default + +# urls +color body yellow black "(https|http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" + +# email addresses +color body yellow black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ +color body yellow black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" diff --git a/mail/.config/mutt/hooks b/mail/.config/mutt/hooks new file mode 100644 index 0000000..5694e3c --- /dev/null +++ b/mail/.config/mutt/hooks @@ -0,0 +1,5 @@ +# folder hooks for different accounts +folder-hook gmail/* source ~/.config/mutt/accounts/gmail +folder-hook nullpointer/* source ~/.config/mutt/accounts/nullpointer + +source ~/.config/mutt/accounts/gmail # default account diff --git a/mail/.config/mutt/layout b/mail/.config/mutt/layout new file mode 100644 index 0000000..7057a6d --- /dev/null +++ b/mail/.config/mutt/layout @@ -0,0 +1,35 @@ +# sidebar +set sidebar_visible # show sidebar +set sidebar_divider_char = "│" # divider between sidebar + index +set sidebar_width = 22 # sidebar width +set sidebar_format = "%B%?F? [%F]?%* %?N?%N?" # display folder name + unread count + +# status bar +set status_chars = " *%A" +set status_format = "───[ Folder: %f ]───[%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" + +# email composition +ignore * # ignore all headers +unhdr_order * +unignore from: to: cc: date: subject: # show only from/to/cc/date/subject +hdr_order from: to: cc: date: subject: + +# pager +set pager_context = 5 # lines of context in pager +set pager_index_lines = 10 # lines of mailbox shown in pager +set pager_stop # don't go to next message at bottom of pager +set smart_wrap # attempt to wrap messages in pager +set tilde # vim-like end of msg +unset markers # no line-wrap markers +alternative_order text/plain text/enriched text/html # display preference in order + +# index +set date_format = "%y-%m-%d %H:%M" # YY-MM-DD HH:SS +set index_format = "[%Z] %D %-20.20F %s" # [message status flags] date author_name subject +set sort = threads # sort threaded mails +set strict_threads # don't define threads only by subject +set sort_aux = reverse-last-date-received # most recent mails at top +set sort_browser = reverse-date # ? +set uncollapse_jump # don't collapse on an unread message +#set sort_re # thread based on regex +#set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" diff --git a/mail/.config/mutt/macros b/mail/.config/mutt/macros new file mode 100644 index 0000000..0d44b4a --- /dev/null +++ b/mail/.config/mutt/macros @@ -0,0 +1 @@ +# todo - switch account macros + tag behaviour (A/S/T) diff --git a/mail/.config/mutt/mailboxes b/mail/.config/mutt/mailboxes new file mode 100644 index 0000000..c649dec --- /dev/null +++ b/mail/.config/mutt/mailboxes @@ -0,0 +1,12 @@ +mailboxes = +gmail/INBOX \ + +gmail/Archive \ + +gmail/Drafts \ + +gmail/Sent \ + +gmail/Spam \ + +gmail/Trash \ + +nullpointer/INBOX \ + +nullpointer/Archive \ + +nullpointer/Drafts \ + +nullpointer/Sent \ + +nullpointer/Spam \ + +nullpointer/Trash diff --git a/mail/.config/mutt/mailcap b/mail/.config/mutt/mailcap new file mode 100644 index 0000000..f659f14 --- /dev/null +++ b/mail/.config/mutt/mailcap @@ -0,0 +1,2 @@ +# pdf documents +application/pdf; okular %s; diff --git a/mail/.config/mutt/muttrc b/mail/.config/mutt/muttrc new file mode 100644 index 0000000..254b887 --- /dev/null +++ b/mail/.config/mutt/muttrc @@ -0,0 +1,38 @@ +# conform to XDG base directory specification +set header_cache = $XDG_CACHE_HOME/mutt/headers +set message_cachedir = $XDG_DATA_HOME/mutt/messages +set mailcap_path = $XDG_CONFIG_HOME/mutt/mailcap +set record = $XDG_DATA_HOME/mutt/record/sent +set tmpdir = $XDG_RUNTIME_DIR +set certificate_file = $XDG_DATA_HOME/mutt/certificates +# i like having a clean uncluttered $HOME, sue me + +# general +set mail_check = 0 # mbsync used for mail synchronisation +set timeout = 5 # wait 5s for user input +set sleep_time = 0 # disable pausing +set beep_new # beep when new mail received + +# mailbox +set mbox_type = Maildir # mailbox format +set folder = ~/.mail # mailbox storage directory +set spoolfile = "+gmail/INBOX" # default mailbox + +# ssl configuration +set ssl_starttls # use STARTTLS if not set +set ssl_force_tls # force TLS negotation + +# composing configuration +set editor = "nvim +/^$ +nohlsearch" # place cursor after headers + turn off search highlighting +set edit_headers # enable header editing when composing +set mime_forward = ask-no # ask if fwd msg as attachments + +# grab rest of the config +source ~/.config/mutt/colours +source ~/.config/mutt/mailboxes +source ~/.config/mutt/layout +source ~/.config/mutt/bindings +source ~/.config/mutt/macros +source ~/.config/mutt/hooks + +#set read_only # set read-only when messing around with settings diff --git a/mail/.config/systemd/user/mbsync@.service b/mail/.config/systemd/user/mbsync@.service new file mode 100644 index 0000000..75bcf42 --- /dev/null +++ b/mail/.config/systemd/user/mbsync@.service @@ -0,0 +1,9 @@ +[Unit] +Description=Mailbox synchronization service for user %I + +[Service] +Type=oneshot +ExecStart=/usr/bin/mbsync -Va +User=%i +StandardOutput=syslog +StandardError=syslog diff --git a/mail/.config/systemd/user/mbsync@.timer b/mail/.config/systemd/user/mbsync@.timer new file mode 100644 index 0000000..9f995f0 --- /dev/null +++ b/mail/.config/systemd/user/mbsync@.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Mailbox synchronization timer + +[Timer] +OnBootSec=5min +OnUnitActiveSec=5min +Unit=mbsync@%i.service + +[Install] +WantedBy=timers.target diff --git a/mail/.mbsyncrc b/mail/.mbsyncrc new file mode 100644 index 0000000..35c07eb --- /dev/null +++ b/mail/.mbsyncrc @@ -0,0 +1,123 @@ +# global config - applied to all channels +Create Both +Expunge Both +SyncState * + +# gmail +IMAPAccount gmail + Host imap.gmail.com + User george@rawlinson.net.nz + PassCmd "pass mail/george@rawlinson.net.nz" # get password from pass + AuthMechs LOGIN + SSLType IMAPS + CertificateFile /etc/ssl/certs/ca-certificates.crt + +# remote storage +IMAPStore gmail-remote + Account gmail + +# local storage +MaildirStore gmail-local + Path ~/.mail/gmail/ # must append slash to specify directory + Inbox ~/.mail/gmail/INBOX # place inbox inside mail dir + +# folders +Channel gmail-inbox + Master :gmail-remote:INBOX + Slave :gmail-local:INBOX + +Channel gmail-archive + Master :gmail-remote:"[Gmail]/All Mail" + Slave :gmail-local:Archive + +Channel gmail-drafts + Master :gmail-remote:"[Gmail]/Drafts" + Slave :gmail-local:Drafts + +Channel gmail-sent + Master :gmail-remote:"[Gmail]/Sent Mail" + Slave :gmail-local:Sent + +Channel gmail-spam + Master :gmail-remote:"[Gmail]/Spam" + Slave :gmail-local:Spam + +Channel gmail-trash + Master :gmail-remote:"[Gmail]/Bin" + Slave :gmail-local:Trash + +# all folders except above +Channel gmail-folders + Master :gmail-remote: + Slave :gmail-local: + Patterns * ![Gmail]* !INBOX !Archive !Drafts !Sent !Spam !Trash + +# group all channels, so they can be sync'd with one command `mbsync gmail` +Group gmail + Channel gmail-trash + Channel gmail-inbox + Channel gmail-archive + Channel gmail-drafts + Channel gmail-sent + Channel gmail-spam + Channel gmail-folders + +# nullpointer +IMAPAccount nullpointer + Host mail.gandi.net + User george@nullpointer.io + PassCmd "pass mail/george@nullpointer.io" # get password from pass + AuthMechs LOGIN + SSLType IMAPS + CertificateFile /etc/ssl/certs/ca-certificates.crt + +# remote storage +IMAPStore nullpointer-remote + Account nullpointer + +# local storage +MaildirStore nullpointer-local + Path ~/.mail/nullpointer/ # must append slash to specify directory + Inbox ~/.mail/nullpointer/INBOX # place inbox inside mail dir + +# folders +Channel nullpointer-inbox + Master :nullpointer-remote:INBOX + Slave :nullpointer-local:INBOX + +Channel nullpointer-archive + Master :nullpointer-remote:Archive + Slave :nullpointer-local:Archive + +Channel nullpointer-drafts + Master :nullpointer-remote:Drafts + Slave :nullpointer-local:Drafts + +Channel nullpointer-sent + Master :nullpointer-remote:Sent + Slave :nullpointer-local:Sent + +Channel nullpointer-spam + Master :nullpointer-remote:Spam + Slave :nullpointer-local:Spam + +Channel nullpointer-trash + Master :nullpointer-remote:Trash + Slave :nullpointer-local:Trash + +# all folders except above +Channel nullpointer-folders + Master :nullpointer-remote: + Slave :nullpointer-local: + Patterns * !INBOX !Archive !Drafts !Sent !Spam !Trash + +# group all channels, so they can be sync'd with one command `mbsync nullpointer` +Group nullpointer + Channel nullpointer-trash + Channel nullpointer-inbox + Channel nullpointer-archive + Channel nullpointer-drafts + Channel nullpointer-sent + Channel nullpointer-spam + Channel nullpointer-folders + diff --git a/zsh/.oh-my-zsh/custom/mutt.zsh b/zsh/.oh-my-zsh/custom/mutt.zsh new file mode 100644 index 0000000..98c7ff3 --- /dev/null +++ b/zsh/.oh-my-zsh/custom/mutt.zsh @@ -0,0 +1,2 @@ +# conform to XDG base directory specification +alias mutt='mutt -F ~/.config/mutt/muttrc'