diff --git a/.dotter/global.toml b/.dotter/global.toml index edcb95d..e695c82 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -59,6 +59,9 @@ pass = "~" "office/.config/goimapnotify/goimapnotify.yaml" = { target = "~/.config/goimapnotify/goimapnotify.yaml", type = "template" } "office/.config/isync/mbsyncrc" = { target = "~/.config/isync/mbsyncrc", type = "template" } "office/.config/msmtp/config" = { target = "~/.config/msmtp/config", type = "template" } +"office/.config/aerc/accounts.conf" = { target = "~/.config/aerc/accounts.conf", type = "template" } +"office/.config/aerc/Personal.qmap" = { target = "~/.config/aerc/Personal.qmap", type = "template" } +"office/.config/notmuch/default/hooks/post-new" = { target = "~/.config/notmuch/default/hooks/post-new", type = "template" } "office/.config/neomutt/account" = { target = "~/.config/neomutt/account", type = "template" } "office/.config/neomutt/profile.gmail" = { target = "~/.config/neomutt/profile.gmail", type = "template" } "office/.config/neomutt/profile.private" = { target = "~/.config/neomutt/profile.private", type = "template" } diff --git a/.dotter/sample.toml b/.dotter/sample.toml index 20b3e15..869f496 100644 --- a/.dotter/sample.toml +++ b/.dotter/sample.toml @@ -23,3 +23,10 @@ mail_personal_password_cmd = "" mail_notmuch_name = "" mail_notmuch_primary_email = "" mail_notmuch_other_email = "" +mail_notmuch_hook_labels = [ + "+list -- from:notifications@github.com" +] + +mail_aerc_from_email = "" +mail_aerc_aliases_email = "" +mail_aerc_notmuch_label_map = ["list = tag:list and not tag:trash"] diff --git a/office/.config/aerc/Personal.qmap b/office/.config/aerc/Personal.qmap new file mode 100644 index 0000000..0053a53 --- /dev/null +++ b/office/.config/aerc/Personal.qmap @@ -0,0 +1,16 @@ +Inbox = tag:inbox AND not tag:list +Archive = tag:archive AND not tag:junk AND not tag:spam +All = '*' +Drafts = tag:draft +Sent = tag:sent +Trash = tag:trash + +# tags +label/unread = tag:unread and not tag:trash +label/replied = tag:replied and not tag:trash +label/important = tag:flagged or tag:important and not tag:trash +label/junk = tag:junk and not tag:trash + +{{#each mail_aerc_notmuch_label_map}} +{{this}} +{{/each}} diff --git a/office/.config/aerc/accounts.conf b/office/.config/aerc/accounts.conf new file mode 100644 index 0000000..1e68aa4 --- /dev/null +++ b/office/.config/aerc/accounts.conf @@ -0,0 +1,21 @@ +[Personal] +source = notmuch://~/documents/mail +maildir-store = ~/documents/mail +query-map = ~/.config/aerc/Personal.qmap +default = Inbox +folders-sort = Inbox,Drafts,Sent +check-mail-cmd = neomutt-syncmail +exclude-tags = spam +multi-file-strategy = act-dir-delete-rest +restrict-delete = true + +outgoing = msmtp +from = {{with_default mail_aerc_from_email "Jane Doe "}} +{{#if mail_aerc_aliases_email}} +aliases = {{mail_aerc_aliases_email}} +{{/if}} +use-envelope-from = true +copy-to = Sent +pgp-opportunistic-encrypt = true + +address-book-cmd = khard email --parsable --remove-first-line %s diff --git a/office/.config/aerc/aerc.conf b/office/.config/aerc/aerc.conf new file mode 100644 index 0000000..0cc2fce --- /dev/null +++ b/office/.config/aerc/aerc.conf @@ -0,0 +1,107 @@ +[general] +enable-osc8 = true + +[ui] +dirlist-tree = true +fuzzy-complete = true +dialog-position = bottom + +styleset-name = simple + +index-columns = flags>6,name<20%,subject,date>= +this-week-time-format = Mon 02 +sidebar-width = 15 + +# column-separator = "│" +column-flags = {{.Flags | join ""}} \ + {{map .Labels (exclude .Folder) \ + (case `^new$` (.Style "" "attention")) \ + (case `^unread$` (.Style "" "accent")) \ + (case `^attachment$` (.Style "󰁦" "subdued")) \ + (case `^replied$` (.Style "↻" "subdued")) \ + (case `^forwarded$` (.Style "f" "")) \ + (case `^flagged$` (.Style "!" "highlight")) \ + (case `^important$` (.Style "" "highlight")) \ + (case `^list$` "") \ + (default "") \ + | join "" }} \ + {{if contains .AccountFrom.Address (.From | emails | join ", ")}}{{end}}\ + {{if contains .AccountFrom.Address (.Cc | emails | join ", ")}}{{end}}\ + {{if contains .AccountFrom.Address (.Bcc | emails | join ", ")}}{{end}} + +column-subject = {{(.Style .ThreadPrefix "subdued")}}{{if .ThreadFolded}}{{printf (.Style "%d " "subdued") .ThreadCount}}{{end}}{{.Subject}} + +icon-new = "" +icon-old = "" +icon-attachment = "" +icon-replied = "" +icon-forwarded = "" +icon-deleted = "" +icon-flagged = "" +icon-marked = "" +icon-signed = "" +icon-encrypted = "" +icon-unknown = "" +icon-invalid = "" + +threading-enabled = true +reverse-thread-order = true +show-thread-context = true +thread-prefix-folded = "+ " +thread-prefix-tip = "" +thread-prefix-indent = "" +thread-prefix-stem = "│" +thread-prefix-limb = "─" +thread-prefix-folded = "+" +thread-prefix-unfolded = "" +thread-prefix-first-child = "┬" +thread-prefix-has-siblings = "├" +thread-prefix-orphan = "┌" +thread-prefix-dummy = "┬" +thread-prefix-lone = " " +thread-prefix-last-sibling = "╰" + +[statusline] +column-left = {{.Account}}>{{compactDir .Folder}} {{.ContentInfo}} +column-center = {{.PendingKeys}} # RUE shows 'recent&unread/existing' +column-right = {{.RUE}} | {{.TrayInfo}} | {{cwd}} | {{dateFormat now "Mon Jan 2 15:04:05 2006"}} + +[viewer] + +[compose] +file-picker-cmd = vifm --choose-files - +reply-to-self = false +empty-subject-warning = true +no-attachment-warning = ^[^>]*(attach(ed|ment)|an(ge)?hang) + +[multipart-converters] +text/html=pandoc -f commonmark_x -t html --standalone --embed-resources --template email +# TODO: change to djot when new pandoc version in repos + +[filters] +.filename,~.*.ics = calendar +text/plain = wrap -w 100 | colorize +text/calendar = calendar +message/delivery-status = colorize +message/rfc822 = colorize +text/html = pandoc -f html -t plain +application/pdf = pdftotext - -l 10 -nopgbrk -q - | wrap -w 100 +application/msword = pandoc -f docx -t plain +application/vnd.openxmlformats-officedocument.wordprocessingml.document = pandoc -f docx -t plain +application/vnd.oasis.opendocument.text = pandoc -f odt -t plain +.headers = colorize +# text/html = ! html # ! for interactive applications + +[openers] +# does not have filename checking for openers? +.filename,~.*.ics = wezterm -e nvim - + +[hooks] +mail-deleted = notmuch new +mail-added = notmuch new +mail-sent = notmuch new +flag-changed = notmuch new +tag-modified = notmuch new +aerc-shutdown = notmuch new + +[templates] diff --git a/office/.config/aerc/binds.conf b/office/.config/aerc/binds.conf new file mode 100644 index 0000000..a33819f --- /dev/null +++ b/office/.config/aerc/binds.conf @@ -0,0 +1,218 @@ +# Binds are of the form = +# To use '=' in a key sequence, substitute it with "Eq": "" +# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit +gT = :prev-tab +gt = :next-tab + = :prev-tab + = :next-tab +\[t = :prev-tab +\]t = :next-tab + = :term +? = :help keys + = :prompt 'Quit?' quit + = :prompt 'Quit?' quit + = :suspend + +[messages] +q = :quit # quick quitting + +j = :next +\]m = :next + = :next + = :next 50% + = :next 100% + +k = :prev +\[m = :prev + = :prev + = :prev 50% + = :prev 100% +gg = :select 0 +G = :select -1 + +\]e = :next-folder +\[e = :prev-folder +\}e = :next-folder -u +\{e = :prev-folder -u + = :next-folder + = :prev-folder +H = :collapse-folder +L = :expand-folder + = :collapse-folder + = :expand-folder + +gi = :cf Inbox +gs = :cf Sent +gd = :cf Drafts +ga = :cf Archive +gA = :cf All +gr = :cf Trash + +v = :mark -t +V = :mark -V +J = :mark -t:next +K = :mark -t:prev +T = :prompt "Mark filter: " :mark + +zt = :toggle-threads +zc = :fold +zC = :fold -a +zo = :unfold +zO = :unfold -a +za = :fold -t +zA = :fold -t -a + +zz = :align center +zt = :align top +zb = :align bottom + + = :view +l = :view + +# remove filters +/ = :filter +\ = :filter +,F = :tag +,s = :tag !unread +,u = :tag !urgent +,d = :tag !todo +,i = :tag !important +,f = :tag !flagged +,w = :tag !wait +,l = :tag !delegated +,j = :tag !junk +,J = :tag !junk:archive flat # archive message as junk +s = :filter tag:unread +u = :filter tag:urgent +d = :filter tag:todo +i = :filter tag:important or tag:flagged +f = :filter tag:flagged +w = :filter tag:wait +l = :filter tag:delegated + +d = :move Trash +D = :choose -o y 'Really delete this message' :delete +a = :archive flat # archive message +A = :unmark -a:mark -T:archive flat # archive thread +M = :menu -d :move # move mail + +m = :compose +f = :forward +F = :bounce +rr = :reply -a +rq = :reply -aq +rR = :reply +rQ = :reply -q + +c = :cf +! = :term +| = :pipe + +/ = :search +\ = :filter +n = :next-result +N = :prev-result + = :clear + +s = :split +S = :vsplit + +# send mails to taskwarrior +,t = :pipe -s -m neomutt-2task -c -d -t +,T = :pipe -s -m neomutt-2task -c + +# # TODO: Investigate use +# pl = :patch list +# pa = :patch apply +# pd = :patch drop +# pb = :patch rebase +# pt = :patch term +# ps = :patch switch + +[messages:folder=Drafts] +m = :recall +[messages:folder=Trash] +d = :choose -o y 'Really delete this message' :delete +D = :delete + +[view] +/ = :toggle-key-passthrough/ +q = :close +h = :close +O = :open +o = :open +S = :menu -c 'vifm --choose-dir - --on-choose exit' :save # save current with +| = :pipe + +d = :move Trash +D = :choose -o y 'Really delete this message' :delete +a = :archive flat # archive message +A = :unmark -a:mark -T:archive flat # archive thread +M = :menu -d :move # move mail + + = :copy-link + = :open-link + +m = :compose +f = :forward +F = :bounce +rr = :reply -a +rq = :reply -aq +rR = :reply +rQ = :reply -q + +H = :toggle-headers +J = :next-part +K = :prev-part + = :prev-part + = :next-part + = :next + = :prev + = :next + = :prev + +tr = :pipe trans -show-original n -b -no-autocorrect # translate message + +[view::passthrough] +$noinherit = true +$ex = + = :toggle-key-passthrough + +[compose] +# Keybindings used when the embedded terminal is not selected in the compose view +$noinherit = true +$ex = +$complete = + = :prev-field + = :next-field + = :prev-field + = :next-field + = :next-field + = :prev-field + = :switch-account -p + = :switch-account -n + = :switch-account -p + = :switch-account -n + +[compose::editor] +# Keybindings used when the embedded terminal is selected in the compose view +$noinherit = true +$ex = + +[compose::review] +# Keybindings used when reviewing a message to be sent +# Inline comments are used as descriptions on the review screen +y = :send # Send +n = :abort # Abort (discard message, no confirmation) +s = :sign # Toggle signing +x = :encrypt # Toggle encryption to all recipients +v = :preview # Preview message +p = :postpone # Postpone +q = :choose -o d discard abort -o p postpone postpone # Abort or postpone +e = :edit # Edit (body and headers) +a = :attach -m # Add attachment +d = :detach # Remove attachment + +[terminal] +$noinherit = true +$ex = diff --git a/office/.config/aerc/stylesets/simple b/office/.config/aerc/stylesets/simple new file mode 100644 index 0000000..66e8165 --- /dev/null +++ b/office/.config/aerc/stylesets/simple @@ -0,0 +1,14 @@ +# vim: ft=dosini +# +# aerc default styleset +# +# This styleset uses the terminal defaults as its base, by not setting anything. +# For more details see the 'default' styleset in aerc, or the +# aerc-stylesets(7) manpage. + +[user] +attention.fg = 1 +accent.fg = 4 +highlight.fg = 3 +subdued.fg = 2 +subdued.dim = true diff --git a/office/.config/notmuch/config b/office/.config/notmuch/config index fe92f8b..860e3c0 100644 --- a/office/.config/notmuch/config +++ b/office/.config/notmuch/config @@ -48,8 +48,8 @@ other_email=mo82rimu@studserv.uni-leipzig.de;moehme@ruc.dk; # in the mail store. # [new] -tags=unread;inbox -ignore=.uidvalidity;.mbsyncstate;Trash;Junk +tags=unread;inbox; +ignore=.uidvalidity;.mbsyncstate; # Search configuration # diff --git a/office/.config/notmuch/default/hooks/post-new b/office/.config/notmuch/default/hooks/post-new new file mode 100755 index 0000000..656e744 --- /dev/null +++ b/office/.config/notmuch/default/hooks/post-new @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +echo " + +-unread -- folder:Trash OR folder:Archive +-unread -flagged -todo -- folder:Trash + +{{#each mail_notmuch_hook_labels}} +{{this}} +{{/each}} +" | + notmuch tag --batch diff --git a/office/.local/bin/aerc-in-terminal b/office/.local/bin/aerc-in-terminal new file mode 100755 index 0000000..8a714bd --- /dev/null +++ b/office/.local/bin/aerc-in-terminal @@ -0,0 +1,3 @@ +#!/bin/sh +# If the user has set $TERMINAL, use it, otherwise fall back to foot. +exec "${TERMINAL:-foot}" -e --class float aerc "$@" diff --git a/office/.local/share/applications/aerc.desktop b/office/.local/share/applications/aerc.desktop new file mode 100644 index 0000000..2921b65 --- /dev/null +++ b/office/.local/share/applications/aerc.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +Version=1.0 +Name=aerc + +GenericName=Mail Client +GenericName[de]=Email Client +Comment=Launches the aerc email client +Comment[de]=Startet den aerc Email-Client +Keywords=Email,Mail,IMAP,SMTP +Categories=Office;Network;Email;ConsoleOnly + +Type=Application +Icon=utilities-terminal +Terminal=false +Exec=aerc-in-terminal %u +MimeType=x-scheme-handler/mailto diff --git a/terminal/.config/wezterm/maps.lua b/terminal/.config/wezterm/maps.lua index 12e7848..57d0740 100644 --- a/terminal/.config/wezterm/maps.lua +++ b/terminal/.config/wezterm/maps.lua @@ -3,6 +3,7 @@ local act = wezterm.action local keys = { { key = "L", mods = "CTRL|SHIFT", action = "DisableDefaultAssignment" }, + { key = "U", mods = "CTRL|SHIFT", action = "DisableDefaultAssignment" }, { key = "[", mods = "CTRL", action = act.ScrollToPrompt(-1) }, { key = "]", mods = "CTRL", action = act.ScrollToPrompt(1) },