diff --git a/.dotter/global.toml b/.dotter/global.toml index edcb95d..4b5c9bd 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -59,9 +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/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" } +"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 = "~" [services.files] 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..6da73d9 --- /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 = mail-sync +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..1a2d6a4 --- /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 mail-totask -c -d -t +,T = :pipe -s -m mail-totask -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/goimapnotify/goimapnotify.yaml b/office/.config/goimapnotify/goimapnotify.yaml index 32ca462..5cc6b21 100644 --- a/office/.config/goimapnotify/goimapnotify.yaml +++ b/office/.config/goimapnotify/goimapnotify.yaml @@ -8,5 +8,4 @@ configurations: passwordCMD: "{{#if mail_personal_password_cmd}}{{mail_personal_password_cmd}}{{/if}}" boxes: - mailbox: INBOX - onNewMail: neomutt-syncmail personal-inbox - onNewMailPost: 'notify-send "Incoming mail"' + onNewMail: mail-sync personal-inbox diff --git a/office/.config/neomutt/account b/office/.config/neomutt/account deleted file mode 100644 index 6714331..0000000 --- a/office/.config/neomutt/account +++ /dev/null @@ -1,15 +0,0 @@ -# Account settings -# local maildir settings -set mbox_type = Maildir -set folder = ~/documents/mail # This has the shortcut '+' or '= ' -set spool_file = "+Inbox" # This has the shortcut '!' -set postponed = "+Drafts" -set record = "+Sent" -set trash = "+Trash" -mailboxes -notify -poll ! \ - -poll "+Archive" \ - -poll "+Jobs" \ - -poll "+Receipts" \ - -nonotify -nopoll "+Junk" \ - -nonotify -nopoll "+Sent" \ - diff --git a/office/.config/neomutt/colors b/office/.config/neomutt/colors deleted file mode 100644 index 9d0fd4c..0000000 --- a/office/.config/neomutt/colors +++ /dev/null @@ -1,207 +0,0 @@ -# # taken from https://gideonwolfe.com/posts/workflow/neomutt/intro/ -# # Header colors: -color header blue default ".*" -color header brightmagenta default "^(From)" -color header brightcyan default "^(Subject)" -color header brightwhite default "^(CC|BCC)" - -color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses -color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL -color body green default "\`[^\`]*\`" # Green text between ` and ` -color body brightblue default "^# \.*" # Headings as bold blue -color body brightcyan default "^## \.*" # Subheadings as bold cyan -color body brightgreen default "^### \.*" # Subsubheadings as bold green -color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow -color body brightcyan default "[;:][-o][)/(|]" # emoticons -color body brightcyan default "[;:][)(|]" # emoticons -color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon? -color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon? -color body red default "(BAD signature)" -color body cyan default "(Good signature)" -color body brightblack default "^gpg: Good signature .*" -color body brightyellow default "^gpg: " -color body brightyellow red "^gpg: BAD signature from.*" -mono body bold "^gpg: Good signature" -mono body bold "^gpg: BAD signature from.*" -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<>\"]" - -# Default index colors: -color index yellow default "~A" -color index_author magenta default "~A" -color index_number blue default "~A" -color index_subject cyan default "~A" - -# For new mail (i.e. arrived after last time neomutt was open): -color index brightyellow default "~N" -color index_author bold italic brightred default "~N" -color index_subject bold italic brightcyan default "~N" - -# For unread mail: -color index brightyellow default "~U" -color index_author bold brightmagenta brightblack "~U" -color index_subject underline brightcyan default "~U" - -color progress black cyan -# Nerd icons idea based on https://github.com/sheoak/neomutt-powerline-nerdfonts/ -# Dracula colors based on Dracula Theme by Paul Townsend - - -# Formatting ---------------------------------------------------------------------- -set date_format = "%a %d %h %H:%M" -set index_format=" %zc %zs %zt | %-20.20L %?X?& ? %M %-30.100s %> %?Y?%Y ? %(!%a %d %h %H:%M) %B" -set pager_format="%n %T %s%*  %{!%d %b · %H:%M} %?X? %X?%P" -set status_format = " %D %?u? %u ?%?R? %R ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? \n \n" -set compose_format="-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-" -# set vfolder_format = "%N %?n?%3n& ? %8m  · %f" -set attach_format = "%u%D  %T %-75.20d %T  %5s %m/%M" -set sidebar_format = '%D%%* %%S' -index-format-hook attachment_info '=B text/calendar ~X 1' ' ' -index-format-hook attachment_info '=B text/calendar' " " -index-format-hook attachment_info '~X 1' " " -index-format-hook attachment_info '~A' " " - - -# General Colors ------------------------------------------------------------------ -color normal default default # general text -color error color231 color212 # error messages -color message default default # messages at the bottom -color prompt default default # prompt text -color search black color10 # search highlight - - -# Statusbar Colors ---------------------------------------------------------------- -color status color141 default -color status color7 color8 '([a-zA-Z0-9\.,]|\[|\])(\s)' # bubble content 1 -color status color7 color8 '(\s)([a-zA-Z0-9\.,]|\[|\])' # bubble content 2 -color status color7 color8 '(\% )' # % symbol -color status color7 color8 '(\S)' # empty spaces -color status color8 default '(|)' # statusline "bubbles" -color status color69 black '(\` )' # bubble account variation -color status white color69 '([a-zA-Z0-9\.]+)( )' # account text -color status green color8 '' # Unread messages count -color status blue color8 '' # Read messages count icon -color status yellow color8 '' # Flagged icon -color status red color8 '' # Pending delete icon - - -# Index Colors -------------------------------------------------------------------- -color index color15 default '~N' # new messages -color index color8 default '~R' # read messages -color index color8 default '~Q' # messages which have been replied to -color index_collapsed color4 default # collapsed thread (message count text) -color index color5 default '!~Q^~p' # sent only to me and haven't been replied to -color index color22 default '~h X-Label..' # messages with a complete label -color index color6 default '~F' # flagged messages -color index color6 default '~F~N' # flagged messages (new) -color index color14 default '~F~R' # flagged messages (read) -color index color1 default '~D' # deleted messages -color index color1 default '~D~N' # deleted messages (new) -color index color9 default '~D~R' # deleted messages (read) -color index color3 default '~T' # tagged messages -color index color3 default '~T~N' # tagged messages (new) -color index color11 default '~T~R' # tagged messages (read) -color tree color8 color8 # thread tree lines/arrow -color indicator black cyan # selection indicator -color index_date color8 default # date is always the same colour -color index_label color6 default # label is always the same colour - - -# Sidebar Colors ------------------------------------------------------------------ -color sidebar_indicator color14 black # currently selected mailbox -color sidebar_highlight white color8 # highlighted, but not open, mailbox. -color sidebar_ordinary color8 default # Color to give mailboxes by default -color sidebar_divider color8 black # divider between sidebar & content -color sidebar_flagged red black # mailboxes containing flagged mail -color sidebar_new green black # mailboxes containing new mail -color sidebar_unread color7 default # mailboxes containing unread mail - - -# Message Headers ----------------------------------------------------------------- -color hdrdefault color8 default - - -# Message Body -------------------------------------------------------------------- - -# Attachments -color attachment color8 default - -# Signature -color signature color8 default - -# emails -color body color14 default '[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+' - -# hide "mailto" -color body color0 color0 '' - -# URLs -color body color3 default '(https?|ftp)://[-\.,/%~_:?&=\#a-zA-Z0-9\+]+' - -# Dividers -color body color8 default '(^[-_]*$)' - -# Important info in calendar invites -color body color6 default '^(Date\/Time|Location|Organiser|Invitees|Teams Meeting)(:| \~\~)' - -# Quotes -color quoted color61 default -color quoted1 color117 default -color quoted2 color84 default -color quoted3 color215 default -color quoted4 color212 default - -# Forward/reply headers -color body color8 default '(^(To|From|Sent|Subject):.*)' - -# Patch syntax highlighting -# color body brightwhite default '^[[:space:]].*' -# color body yellow default ^(diff).* -# color body white default ^[\-\-\-].* -# color body white default ^[\+\+\+].* -# color body green default ^[\+].* -# color body red default ^[\-].* -# color body brightblue default [@@].* -# color body cyan default ^(Signed-off-by).* -# color body brightwhite default ^(Cc) -# color body yellow default "^diff \-.*" -# color body brightwhite default "^index [a-f0-9].*" -# color body brightblue default "^---$" -# color body white default "^\-\-\- .*" -# color body white default "^[\+]{3} .*" -# color body green default "^[\+][^\+]+.*" -# color body red default "^\-[^\-]+.*" -# color body brightblue default "^@@ .*" -# color body green default "LGTM" -# color body brightmagenta default "-- Commit Summary --" -# color body brightmagenta default "-- File Changes --" -# color body brightmagenta default "-- Patch Links --" -# color body green default "^Merged #.*" -# color body red default "^Closed #.*" -# color body brightblue default "^Reply to this email.*" - - -# Misc ----------------------------------------------------------------------------- - -# no addressed to me, to me, group, cc, sent by me, mailing list -set to_chars=" " - -# unchanged mailbox, changed, read only, attach mode -set status_chars = " 󱫄" -ifdef crypt_chars set crypt_chars = " " -set flag_chars = " " - -# hide some tags -set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted" -tag-transforms "replied" "↻ " \ - "encrytpted" "" \ - "signed" "" \ - "attachment" "󰁦" \ - -# The formats must start with 'G' and the entire sequence is case sensitive. -tag-formats "replied" "GR" \ - "encrypted" "GE" \ - "signed" "GS" \ - "attachment" "GA" \ - - # don't put '+' at the beginning of wrapped lines -set markers=no diff --git a/office/.config/neomutt/keys/bind b/office/.config/neomutt/keys/bind deleted file mode 100644 index a4ffd65..0000000 --- a/office/.config/neomutt/keys/bind +++ /dev/null @@ -1,214 +0,0 @@ -bind generic,index,editor,pager,compose help -set abort_key = "" # overwrite default, frankly insane, combination - -# NOTE: For operations where message/thread are both possible: -# Generally the lower-case letter will operate on the WHOLE thread -# while the upper-case letter will operate on a specific message in the thread. -# e.g. t -> tag thread / T -> tag message -# dd -> delete thread / dD -> delete message - -# go 'back' with h but only close the app with q -bind index,pager,attach,browser,query,alias,compose q exit -bind pager,attach,browser,query,alias,compose h exit - -# view manipulation -bind attach,browser,index,pager \CF next-page -bind attach,browser,index,pager \CB previous-page -bind attach,browser,index,pager \Cu half-up -bind attach,browser,index,pager \Cd half-down -bind browser,index,pager \Ce next-line -bind browser,index,pager \Cy previous-line -bind index zz current-middle -bind index zt current-top -bind index zb current-bottom - -# line navigation -bind index,attach,browser,query G last-entry -bind index,attach,browser,query gg first-entry -bind pager G bottom -bind pager gg top -bind attach,browser,query,compose j next-entry -bind attach,browser,query,compose k previous-entry -bind index j next-undeleted -bind index k previous-undeleted -bind pager j next-line -bind pager k previous-line -bind index,pager \Cn next-entry -bind index,pager \Cp previous-entry - -# tagging -macro index J "tag current and select next entry" -macro index K ":set resolve=no:set resolve=yes" "tag current and select previous entry" -macro index t ":set resolve=no:set resolve=yes" "tag current thread" -macro index T ":set resolve=no:set resolve=yes" "tag current entry" - -# # flagging -# bind index,pager ,F modify-labels -# bind index,pager ,fc clear-flag -# bind index,pager ,\cf clear-flag -# bind index,pager ,ff flag-message -# bind index ,fs toggle-new # can't toggle new WHILE reading a msg -# macro index ,S "T~UN." "mark all messages as read" -# bind index,pager ,fl edit-label # set X-Label Header -# # Saner copy/move dialogs -# macro index,pager ,c "?" "copy a message to a mailbox" -# macro index,pager ,m "?" "move thread to a mailbox" -# macro index,pager ,M "?" "move a message to a mailbox" - -# sorting -bind index s sort-mailbox -bind index S sort-reverse - -# threads -macro index l "" "display message" -macro index "" "display message" -bind index h collapse-thread -bind index collapse-thread # TODO: Remove in favor of learning za? -bind pager,index + link-threads -bind pager,index - break-thread -bind pager,index gt next-thread # TODO: overwritten by go to trash -bind pager,index gT previous-thread -bind pager,index za collapse-thread -bind pager,index zA collapse-all -bind pager,index zr reconstruct-thread -bind pager,index zR entire-thread - -# message manipulation -bind index,pager dD delete-message -bind index,pager dd delete-thread -bind index,pager dt delete-subthread -bind index,pager u undelete-thread -bind index,pager U undelete-message -# TODO: Figure out -# macro index D ";:set resolve=no!=Archiveecho 'Message deleted':set resolve=yes" "Quick Delete" -# macro index A ";:set resolve=no!=Archiveecho 'Message archived':set resolve=yes" "Quick Archive" - -# search navigation -bind generic,index,attach,browser,pager n search-next # next result -bind generic,index,attach,browser,pager N search-opposite # previous result -bind generic,index / search -bind generic,index ? search-reverse -bind index,alias,query \C_ limit # ^/ to search and limit -bind index \\ vfolder-from-query # notmuch search -macro index / "all\n" "show all messages (undo limit)" -bind index ,/ show-limit - -# sidebar and folders -macro index,pager f "?" "change folder" -macro index,pager F "?" "change virtual folder" -bind browser,query select-entry -bind browser,query l select-entry -bind index,pager e sidebar-toggle-visible # TODO: or map to L? -bind index,pager E sidebar-toggle-virtual -bind index,pager e sidebar-open -bind index,pager ] sidebar-next -bind index,pager [ sidebar-prev -bind index,pager } sidebar-next-new -bind index,pager { sidebar-prev-new - -# message functions -# send to editor or send to editor with ALL headers etc -macro index,pager h "nvim '+setlocal buftype=nofile'" "send message to editor" -bind index,pager H view-raw-message -bind index,pager H display-toggle-weed -bind index,pager v view-attachments -bind index,pager,attach,compose | pipe-message - -# reading a message -bind pager ,q toggle-quoted - -# editor -bind editor backward-char -bind editor forward-char -bind editor \cb backward-char -bind editor \cf forward-char -bind editor \ca bol -bind editor \ce eol -bind editor \cw kill-word -bind editor \cu kill-line -bind editor history-up -bind editor history-down -bind editor \cp history-up -bind editor \cn history-down -bind editor \cr history-search - -# address book functions -bind editor complete-query -bind editor \ct complete -# add contact to Khard address book -macro index,pager ,a \ - "khard add-email" \ - "add the sender email address to khard" - -# sending -bind index,pager mm mail -bind index,pager mM recall-message # edit last from drafts -bind index,pager,attach mr group-reply # answer all -bind index,pager,attach mR reply # answer SINGLE person -bind index,pager,attach mf forward-message - -# composing -bind compose y send-message -bind compose e edit-message -bind compose p print-entry -bind compose P postpone-message -bind compose ,t edit-to -bind compose ,y edit-type -bind compose ,f edit-from -bind compose ,s edit-subject -bind compose ,c edit-cc -bind compose ,b edit-bcc -bind compose ,p edit-fcc -bind compose c pgp-menu -bind compose r rename-file -bind compose | filter-entry # TODO: figure out the difference to pipe-entry -bind compose K move-up -bind compose J move-down -macro compose a 'source "neomutt-filer attach"|' "Attach with file manager" -bind compose d edit-description -bind compose D detach-file -bind compose l view-attach -bind compose view-attach -bind compose t tag-entry -bind compose gg group-alternatives -bind compose gr group-related -bind compose gl group-multilingual -bind compose gu ungroup-attachment - -# manage attachments -macro attach s 'source "neomutt-filer saveto ~/downloads"|' "Save attachment to dir" -bind attach view-mailcap -bind attach l view-mailcap - -# mailbox navigation -macro index,pager gi "Inbox" "go to inbox" -macro index,pager gs "Sent" "go to sent" -macro index,pager gd "Drafts" "go to drafts" -macro index,pager gt "Trash" "go to trash" -macro index,pager ga "Archive" "go to archive" -macro index,pager gr "Receipts" "go to receipts" -macro index,pager gj "Jobs" "go to jobs" - -#### Misc functions and macros - -# Refresh far imap email -macro index,pager O "export MBSYNC_PRE=true; neomutt-syncmail" "refresh all e-mail" - -# Send mail to taskwarrior -macro index,pager ,t "neomutt-2task -c -d -t" "add mail to taskwarrior" -macro index,pager ,T "neomutt-2task -c" "quickadd mail to taskwarrior" - -# Write (djot-flavored) markdown and instantly transform it into a TXT/HTML result -# HTML-enabled email readers display that and others can still enjoy a txt representation -macro compose ,m \ - "set pipe_decode\ - pandoc -f gfm -t plain -o /tmp/msg.txt\ - pandoc -s -f gfm --standalone --embed-resources -o /tmp/msg.html --template email\ - unset pipe_decode\ - /tmp/msg.txt\ - /tmp/msg.html\ - " \ - "Convert markdown to HTML5 and plaintext alternative content types" - -# # open urls found in the e-mail -# macro index,pager \CU " unset pipe_decodeextract_url | fzf | clip" "get URLs" diff --git a/office/.config/neomutt/keys/unbind b/office/.config/neomutt/keys/unbind deleted file mode 100644 index 0c71e1f..0000000 --- a/office/.config/neomutt/keys/unbind +++ /dev/null @@ -1,263 +0,0 @@ -# Unbind everything.. the defaults suck balls and do crazy things - -bind generic,pager,editor,index,compose,browser,attach | noop -bind generic,pager,editor,index,compose,browser,attach a noop -bind generic,pager,editor,index,compose,browser,attach b noop -bind generic,pager,editor,index,compose,browser,attach c noop -bind generic,pager,editor,index,compose,browser,attach d noop -bind generic,pager,editor,index,compose,browser,attach e noop -bind generic,pager,editor,index,compose,browser,attach f noop -bind generic,pager,editor,index,compose,browser,attach g noop -bind generic,pager,editor,index,compose,browser,attach h noop -bind generic,pager,editor,index,compose,browser,attach i noop -bind generic,pager,editor,index,compose,browser,attach j noop -bind generic,pager,editor,index,compose,browser,attach k noop -bind generic,pager,editor,index,compose,browser,attach l noop -bind generic,pager,editor,index,compose,browser,attach m noop -bind generic,pager,editor,index,compose,browser,attach n noop -bind generic,pager,editor,index,compose,browser,attach o noop -bind generic,pager,editor,index,compose,browser,attach p noop -bind generic,pager,editor,index,compose,browser,attach r noop -bind generic,pager,editor,index,compose,browser,attach s noop -bind generic,pager,editor,index,compose,browser,attach t noop -bind generic,pager,editor,index,compose,browser,attach u noop -bind generic,pager,editor,index,compose,browser,attach v noop -bind generic,pager,editor,index,compose,browser,attach w noop -bind generic,pager,editor,index,compose,browser,attach x noop -bind generic,pager,editor,index,compose,browser,attach y noop -bind generic,pager,editor,index,compose,browser,attach z noop -bind generic,pager,editor,index,compose,browser,attach A noop -bind generic,pager,editor,index,compose,browser,attach B noop -bind generic,pager,editor,index,compose,browser,attach C noop -bind generic,pager,editor,index,compose,browser,attach D noop -bind generic,pager,editor,index,compose,browser,attach E noop -bind generic,pager,editor,index,compose,browser,attach F noop -bind generic,pager,editor,index,compose,browser,attach G noop -bind generic,pager,editor,index,compose,browser,attach H noop -bind generic,pager,editor,index,compose,browser,attach I noop -bind generic,pager,editor,index,compose,browser,attach J noop -bind generic,pager,editor,index,compose,browser,attach K noop -bind generic,pager,editor,index,compose,browser,attach L noop -bind generic,pager,editor,index,compose,browser,attach M noop -bind generic,pager,editor,index,compose,browser,attach N noop -bind generic,pager,editor,index,compose,browser,attach O noop -bind generic,pager,editor,index,compose,browser,attach P noop -bind generic,pager,editor,index,compose,browser,attach Q noop -bind generic,pager,editor,index,compose,browser,attach R noop -bind generic,pager,editor,index,compose,browser,attach S noop -bind generic,pager,editor,index,compose,browser,attach T noop -bind generic,pager,editor,index,compose,browser,attach U noop -bind generic,pager,editor,index,compose,browser,attach V noop -bind generic,pager,editor,index,compose,browser,attach W noop -bind generic,pager,editor,index,compose,browser,attach X noop -bind generic,pager,editor,index,compose,browser,attach Y noop -bind generic,pager,editor,index,compose,browser,attach Z noop - -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,index,compose,browser,attach noop -bind generic,pager,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop - -bind generic,pager,editor,index,compose,browser,attach 1 noop -bind generic,pager,editor,index,compose,browser,attach 2 noop -bind generic,pager,editor,index,compose,browser,attach 3 noop -bind generic,pager,editor,index,compose,browser,attach 4 noop -bind generic,pager,editor,index,compose,browser,attach 5 noop -bind generic,pager,editor,index,compose,browser,attach 6 noop -bind generic,pager,editor,index,compose,browser,attach 7 noop -bind generic,pager,editor,index,compose,browser,attach 8 noop -bind generic,pager,editor,index,compose,browser,attach 9 noop -bind generic,pager,editor,index,compose,browser,attach 0 noop -bind generic,pager,editor,index,compose,browser,attach ! noop -bind generic,pager,editor,index,compose,browser,attach @ noop -bind generic,pager,editor,index,compose,browser,attach $ noop -bind generic,pager,editor,index,compose,browser,attach % noop -bind generic,pager,editor,index,compose,browser,attach ^ noop -bind generic,pager,editor,index,compose,browser,attach & noop -bind generic,pager,editor,index,compose,browser,attach * noop -bind generic,pager,editor,index,compose,browser,attach ( noop -bind generic,pager,editor,index,compose,browser,attach ) noop - -bind generic,pager,editor,index,compose,browser,attach \Ca noop -bind generic,pager,editor,index,compose,browser,attach \Cb noop -bind generic,pager,editor,index,compose,browser,attach \Cc noop -bind generic,pager,editor,index,compose,browser,attach \Cd noop -bind generic,pager,editor,index,compose,browser,attach \Ce noop -bind generic,pager,editor,index,compose,browser,attach \Cf noop -bind generic,pager,editor,index,compose,browser,attach \Cg noop -bind generic,pager,editor,index,compose,browser,attach \Ch noop -bind generic,pager,editor,index,compose,browser,attach \Ci noop -bind generic,pager,editor,index,compose,browser,attach \Cj noop -bind generic,pager,editor,index,compose,browser,attach \Ck noop -bind generic,pager,editor,index,compose,browser,attach \Cl noop -bind generic,pager,editor,index,compose,browser,attach \Cm noop -bind generic,pager,editor,index,compose,browser,attach \Cn noop -bind generic,pager,editor,index,compose,browser,attach \Co noop -bind generic,pager,editor,index,compose,browser,attach \Cp noop -bind generic,pager,editor,index,compose,browser,attach \Cq noop -bind generic,pager,editor,index,compose,browser,attach \Cr noop -bind generic,pager,editor,index,compose,browser,attach \Cs noop -bind generic,pager,editor,index,compose,browser,attach \Ct noop -bind generic,pager,editor,index,compose,browser,attach \Cv noop -bind generic,pager,editor,index,compose,browser,attach \Cw noop -bind generic,pager,editor,index,compose,browser,attach \Cxe noop -bind generic,pager,editor,index,compose,browser,attach \Cx noop -bind generic,pager,editor,index,compose,browser,attach \Cy noop -bind generic,pager,editor,index,compose,browser,attach \Cz noop -bind generic,pager,editor,index,compose,browser,attach \CA noop -bind generic,pager,editor,index,compose,browser,attach \CB noop -bind generic,pager,editor,index,compose,browser,attach \CC noop -bind generic,pager,editor,index,compose,browser,attach \CD noop -bind generic,pager,editor,index,compose,browser,attach \CE noop -bind generic,pager,editor,index,compose,browser,attach \CF noop -bind generic,pager,editor,index,compose,browser,attach \CG noop -bind generic,pager,editor,index,compose,browser,attach \CH noop -bind generic,pager,editor,index,compose,browser,attach \CI noop -bind generic,pager,editor,index,compose,browser,attach \CJ noop -bind generic,pager,editor,index,compose,browser,attach \CK noop -bind generic,pager,editor,index,compose,browser,attach \CL noop -bind generic,pager,editor,index,compose,browser,attach \CM noop -bind generic,pager,editor,index,compose,browser,attach \CN noop -bind generic,pager,editor,index,compose,browser,attach \CO noop -bind generic,pager,editor,index,compose,browser,attach \CP noop -bind generic,pager,editor,index,compose,browser,attach \CQ noop -bind generic,pager,editor,index,compose,browser,attach \CR noop -bind generic,pager,editor,index,compose,browser,attach \CS noop -bind generic,pager,editor,index,compose,browser,attach \CT noop -bind generic,pager,editor,index,compose,browser,attach \CV noop -bind generic,pager,editor,index,compose,browser,attach \CW noop -bind generic,pager,editor,index,compose,browser,attach \CX noop -bind generic,pager,editor,index,compose,browser,attach \CY noop -bind generic,pager,editor,index,compose,browser,attach \CZ noop - -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop -bind generic,pager,editor,index,compose,browser,attach \C noop - -bind generic,pager,editor,index,compose,browser,attach \C1 noop -bind generic,pager,editor,index,compose,browser,attach \C2 noop -bind generic,pager,editor,index,compose,browser,attach \C3 noop -bind generic,pager,editor,index,compose,browser,attach \C4 noop -bind generic,pager,editor,index,compose,browser,attach \C5 noop -bind generic,pager,editor,index,compose,browser,attach \C6 noop -bind generic,pager,editor,index,compose,browser,attach \C7 noop -bind generic,pager,editor,index,compose,browser,attach \C8 noop -bind generic,pager,editor,index,compose,browser,attach \C9 noop -bind generic,pager,editor,index,compose,browser,attach \C0 noop -bind generic,pager,editor,index,compose,browser,attach \C! noop -bind generic,pager,editor,index,compose,browser,attach \C$ noop -bind generic,pager,editor,index,compose,browser,attach \C% noop -bind generic,pager,editor,index,compose,browser,attach \C^ noop -bind generic,pager,editor,index,compose,browser,attach \C& noop -bind generic,pager,editor,index,compose,browser,attach \C* noop -bind generic,pager,editor,index,compose,browser,attach \C( noop -bind generic,pager,editor,index,compose,browser,attach \C) noop - -bind generic,pager,editor,index,compose,browser,attach a noop -bind generic,pager,editor,index,compose,browser,attach b noop -bind generic,pager,editor,index,compose,browser,attach c noop -bind generic,pager,editor,index,compose,browser,attach d noop -bind generic,pager,editor,index,compose,browser,attach e noop -bind generic,pager,editor,index,compose,browser,attach f noop -bind generic,pager,editor,index,compose,browser,attach g noop -bind generic,pager,editor,index,compose,browser,attach h noop -bind generic,pager,editor,index,compose,browser,attach i noop -bind generic,pager,editor,index,compose,browser,attach j noop -bind generic,pager,editor,index,compose,browser,attach k noop -bind generic,pager,editor,index,compose,browser,attach l noop -bind generic,pager,editor,index,compose,browser,attach m noop -bind generic,pager,editor,index,compose,browser,attach n noop -bind generic,pager,editor,index,compose,browser,attach o noop -bind generic,pager,editor,index,compose,browser,attach p noop -bind generic,pager,editor,index,compose,browser,attach q noop -bind generic,pager,editor,index,compose,browser,attach r noop -bind generic,pager,editor,index,compose,browser,attach s noop -bind generic,pager,editor,index,compose,browser,attach t noop -bind generic,pager,editor,index,compose,browser,attach u noop -bind generic,pager,editor,index,compose,browser,attach v noop -bind generic,pager,editor,index,compose,browser,attach w noop -bind generic,pager,editor,index,compose,browser,attach x noop -bind generic,pager,editor,index,compose,browser,attach y noop -bind generic,pager,editor,index,compose,browser,attach z noop -bind generic,pager,editor,index,compose,browser,attach A noop -bind generic,pager,editor,index,compose,browser,attach B noop -bind generic,pager,editor,index,compose,browser,attach C noop -bind generic,pager,editor,index,compose,browser,attach D noop -bind generic,pager,editor,index,compose,browser,attach E noop -bind generic,pager,editor,index,compose,browser,attach F noop -bind generic,pager,editor,index,compose,browser,attach G noop -bind generic,pager,editor,index,compose,browser,attach H noop -bind generic,pager,editor,index,compose,browser,attach I noop -bind generic,pager,editor,index,compose,browser,attach J noop -bind generic,pager,editor,index,compose,browser,attach K noop -bind generic,pager,editor,index,compose,browser,attach L noop -bind generic,pager,editor,index,compose,browser,attach M noop -bind generic,pager,editor,index,compose,browser,attach N noop -bind generic,pager,editor,index,compose,browser,attach O noop -bind generic,pager,editor,index,compose,browser,attach P noop -bind generic,pager,editor,index,compose,browser,attach Q noop -bind generic,pager,editor,index,compose,browser,attach R noop -bind generic,pager,editor,index,compose,browser,attach S noop -bind generic,pager,editor,index,compose,browser,attach T noop -bind generic,pager,editor,index,compose,browser,attach U noop -bind generic,pager,editor,index,compose,browser,attach V noop -bind generic,pager,editor,index,compose,browser,attach W noop -bind generic,pager,editor,index,compose,browser,attach X noop -bind generic,pager,editor,index,compose,browser,attach Y noop -bind generic,pager,editor,index,compose,browser,attach Z noop - -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop -bind generic,pager,editor,index,compose,browser,attach noop - -bind generic,pager,editor,index,compose,browser,attach 1 noop -bind generic,pager,editor,index,compose,browser,attach 2 noop -bind generic,pager,editor,index,compose,browser,attach 3 noop -bind generic,pager,editor,index,compose,browser,attach 4 noop -bind generic,pager,editor,index,compose,browser,attach 5 noop -bind generic,pager,editor,index,compose,browser,attach 6 noop -bind generic,pager,editor,index,compose,browser,attach 7 noop -bind generic,pager,editor,index,compose,browser,attach 8 noop -bind generic,pager,editor,index,compose,browser,attach 9 noop -bind generic,pager,editor,index,compose,browser,attach 0 noop -bind generic,pager,editor,index,compose,browser,attach ! noop -bind generic,pager,editor,index,compose,browser,attach @ noop -bind generic,pager,editor,index,compose,browser,attach $ noop -bind generic,pager,editor,index,compose,browser,attach % noop -bind generic,pager,editor,index,compose,browser,attach ^ noop -bind generic,pager,editor,index,compose,browser,attach & noop -bind generic,pager,editor,index,compose,browser,attach * noop -bind generic,pager,editor,index,compose,browser,attach ( noop -bind generic,pager,editor,index,compose,browser,attach ) noop diff --git a/office/.config/neomutt/mailcap b/office/.config/neomutt/mailcap deleted file mode 100644 index 123dda9..0000000 --- a/office/.config/neomutt/mailcap +++ /dev/null @@ -1,33 +0,0 @@ -# open html emails in browser (or whatever GUI program is used to render HTML) -text/html; open %s ; nametemplate=%s.html -# render html emails inline using magic (uncomment the line below to use lynx instead) -# text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput -text/html; neomutt-renderhtml %s; nametemplate=%s.html; copiousoutput; -text/plain; $EDITOR %s ; - -# show calendar invites -text/calendar; mutt-ics; description=ics details; copiousoutput; print=khal import %s; needsterminal -application/ics; mutt-ics; description=ics details; copiousoutput; print=khal import %s; needsterminal - -# open images externally -image/*; imv %s ; - -# open videos in mpv -video/*; mpv --autofit-larger=90\%x90\% %s; needsterminal; -video/*; setsid mpv --quiet %s &; copiousoutput - -# open spreadsheets in sc-im -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; sc-im %s; needsterminal - -# documents -application/pdf; pdftotext -layout %s -; copiousoutput; print=open %s -application/msword; pandoc --from docx --to plain %s; copiousoutput -application/vnd.openxmlformats-officedocument.wordprocessingml.document; pandoc --from odt --to plain %s; copiousoutput -application/rtf; pandoc --from rtf --to plain %s; copiousoutput - - -application/pgp-encrypted; gpg -d '%s'; copiousoutput; -application/pgp-keys; gpg --import '%s'; copiousoutput; - -# open anything else externally -application/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt \; open /tmp/mutt/$(basename %s) & diff --git a/office/.config/neomutt/neomuttrc b/office/.config/neomutt/neomuttrc deleted file mode 100644 index 202bfc0..0000000 --- a/office/.config/neomutt/neomuttrc +++ /dev/null @@ -1,71 +0,0 @@ -source colors -source settings - -source keys/unbind -source keys/bind - -source account - -################## notmuch settings -# index notmuch on start and exit -startup-hook "`command -v notmuch && notmuch new 2>/dev/null`" -shutdown-hook "`command -v notmuch && notmuch new 2>/dev/null`" -# whenever changing directory fetch changes -folder-hook notmuch:// "push 'notmuch new >/dev/null'" - -set nm_query_type = "threads" -set nm_exclude_tags = "spam" -set nm_record = yes -set nm_record_tags = "-inbox,archive" -virtual-mailboxes "Inbox" "notmuch://?query=folder:Inbox" \ - "Unread" "notmuch://?query=tag:unread" \ - "Archive" "notmuch://?query=folder:Archive" \ - "Drafts" "notmuch://?query=folder:Drafts" \ - "Sent" "notmuch://?query=folder:Sent" \ - "Jobs" "notmuch://Jobs?query=folder:Jobs" \ - "Receipts" "notmuch://?query=folder:Receipts" \ - "Junk" "notmuch://?query=folder:Junk" \ - "github" "notmuch://?query=tag:github" \ - "bemoji" "notmuch://?query=tag:bemoji"\ - "All" "notmuch://?query=*"\ - "Trash" "notmuch://?query=folder:Trash" \ - -push 'Inbox' - -virtual-mailboxes "date/" "notmuch://?query=date:today.."\ - " this week" "notmuch://?query=date:week.."\ - " this month" "notmuch://?query=date:month.." - -virtual-mailboxes "attach/" "notmuch://?query=attachment:\.%20not%20attachment:\.pdf"\ - " with PDF" "notmuch://?query=attachment:\.pdf"\ - " with JPG" "notmuch://?query=attachment:\.jpg%20or%20attachment:\.png" - -# bind index,pager S modify-labels # allow +adding -removing !toggling any notmuch tags -# macro index,pager f "+flagged" "Toggle flagged tag" -# -# macro index,pager ,ff "!flaggednotmuch new" "toggle flag" -macro index,pager ,ff "!flagged" "toggle flag" -macro index,pager ,fi "+inbox" "send to inbox" -macro index,pager R " '+trashnotmuch new'" "send to trash" - - -bind index,pager w modify-labels -# macro index A "+archive -unread -inbox" -# macro index I "-inbox -unread" -# macro index S "" - -tag-transforms "unread" "U" -tag-formats "inbox" "GI" \ - "flagged" "GF" \ - "unread" "GU" \ - "test" "Gt" \ - -color index_tags red black -set index_format="%zc %zs %zt | %-20.20L %?X?& ? %M %-30.100s %* %?GF?%GF ? %(!%a %d %h %H:%M)" - -# conditional dates, showing "09:48" for today's msg, "Mon 27 Aug" for this year's msg, -# "22 Dec '24" for previous years -# set index_format="%-30.100s %* %<[y?%<[d?%[%H:%M]&%[%a %d %h]>&%[%d %h \'%y]>" - - -# - [ ] show 'Inbox' etc in index IF we are in query results diff --git a/office/.config/neomutt/profile.gmail b/office/.config/neomutt/profile.gmail deleted file mode 100644 index b7fd46f..0000000 --- a/office/.config/neomutt/profile.gmail +++ /dev/null @@ -1,2 +0,0 @@ -color status color3 black '(\` )' # bubble account variation -macro generic ":source ~/.config/neomutt/profile.private" diff --git a/office/.config/neomutt/profile.private b/office/.config/neomutt/profile.private deleted file mode 100644 index 34ef5fe..0000000 --- a/office/.config/neomutt/profile.private +++ /dev/null @@ -1,2 +0,0 @@ -color status color69 black '(\` )' # bubble account variation -macro generic ":source ~/.config/neomutt/profile.gmail" diff --git a/office/.config/neomutt/settings b/office/.config/neomutt/settings deleted file mode 100644 index 1eb3413..0000000 --- a/office/.config/neomutt/settings +++ /dev/null @@ -1,128 +0,0 @@ -set mail_check = 60 -set mail_check_stats - -# at least for rapid prototyping -set quit -# no pause for info messages -set sleep_time = 0 -# mark read (not just seen) after -set pager_read_delay = 1 -# get rid of headers when passing messages along -set pipe_decode -# apply commands to all tagged messages automatically -set auto_tag -# dont wait for user input after shell cmds, auto-view, piping, etc -set wait_key = no -# dont pre-process mail for ~b/~B searches -set thorough_search = no -# make it impossible to delete flagged mails -set flag_safe - -################### Pager settings -# filetypes and mailcap -set mailcap_path = "~/.config/neomutt/mailcap:~/.mailcap:/usr/share/neomutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap" -# Consult mime.types for determining types of these attachments -mime_lookup application/octet-stream -# This requires a ~/.mailcap entry with the copiousoutput flag, such as: -# text/html; lynx -dump -width ${COLUMNS:-80} %s; nametemplate=%s.html; copiousoutput -auto_view application/ics -auto_view text/calendar -auto_view text/plain -auto_view text/html -# Prefer plain text to html but multipart to plain for those only sending that -alternative_order text/calendar application/ics text/plain text/enriched text/html multipart/mixed multipart/related text/plain text/* - -# look for attachments also in multipart/alternatives -set count_alternatives = yes -# AFAIK we do not have to manually ensure dir existence -set header_cache= "~/.cache/neomutt/hcache/" -# recommended https://github.com/neomutt/neomutt/issues/3259#issuecomment-1043693471 -set header_cache_backend = "lmdb" -set header_cache_compress_method = "lz4" -set header_cache_compress_level = 9 - -################### Compose settings -# allow editing headers while writing mail -set edit_headers -# separate signature from mail -set sig_dashes -# automatically fill in from and subject for replies -set fast_reply -# subject for forwarding -set forward_format = "Fwd: %s" -# default send back to reply-to: header instead of from: header -set reply_to -# default to reply as person e-mail was originally sent to -set reverse_name -# include original msg in reply -set include -# include original msg as quote in fwd -set forward_quote -# forward attachments with mail -set mime_forward = no -# attachments saved with body -set fcc_attach -# we use mimeo in this house -set mime_type_query_command = "mimeo -m" -# send settings -set sendmail = "/usr/bin/msmtp" -set sendmail_wait = 10 -# spellchecker -set ispell = "enchant-2 -a" - -################## Display Settings -# allow escape codes for color etc -set allow_ansi -# thread based on the regexes below -set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" -set quote_regex = "^( {0,4}[>|:#%]| {0,4}[A-Za-z0-9]+[>|]+)+" -#### Thread ordering -set use_threads=reverse -set sort='last-date' -set sort_aux = date -set collapse_all = yes -set uncollapse_new = no -set thread_received = yes -set narrow_tree = yes - -# sidebar view options -set sidebar_width = 20 -set sidebar_visible = no -set sidebar_component_depth = 0 -set sidebar_divider_char = '│' -set sidebar_next_new_wrap = yes -set sidebar_sort = 'unsorted' -# Shorten mailbox names -set sidebar_short_path = yes -# Delete everything up to the last / character -set sidebar_delim_chars="/" -# Indent folders whose names we've shortened -set sidebar_folder_indent = yes -# Indent with two spaces -# set sidebar_indent_string = ' - ' -set sidebar_indent_string=" " - -# statusbar view options -set status_chars = " *%A" -# pager view options -set pager_index_lines = 10 -set pager_context = 3 -# do not go to next msg if at bottom of pager -set pager_stop -set menu_scroll = yes -# show tildes for blank lines -set tilde -# no + markers if a line goes off-screen -unset markers -set wrap = 100 -# hide headers except for those explicitly unignored -ignore * -unignore From To Cc Bcc Date Subject Message-ID -unhdr_order * -unignore From To Cc Bcc Date Subject Message-ID - -# TODO: Remove stderr ignore when khard fixes its deprecation warnings -# https://github.com/lucc/khard/issues/335 -set query_command = "khard email --parsable --search-in-source-files '%s' 2>/dev/null" -# Makes notmuch return threads rather than messages -set nm_query_type = "threads" 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/bin/neomutt-renderhtml b/office/.local/bin/mail-renderhtml similarity index 93% rename from office/.local/bin/neomutt-renderhtml rename to office/.local/bin/mail-renderhtml index 9d4a7a0..0289a61 100755 --- a/office/.local/bin/neomutt-renderhtml +++ b/office/.local/bin/mail-renderhtml @@ -3,7 +3,7 @@ # requires: html2text, glow or bat # author: CEUK -fpath=$(mktemp --suffix=-neomutt-render.html) +fpath=$(mktemp --suffix=-mail-render.html) #shellcheck disable=SC2064 # we want to expand it instantly trap "rm -f -- ${fpath@Q}" EXIT diff --git a/office/.local/bin/neomutt-syncmail b/office/.local/bin/mail-sync similarity index 100% rename from office/.local/bin/neomutt-syncmail rename to office/.local/bin/mail-sync diff --git a/office/.local/bin/neomutt-2task b/office/.local/bin/mail-totask similarity index 92% rename from office/.local/bin/neomutt-2task rename to office/.local/bin/mail-totask index 71fc583..3e329e0 100755 --- a/office/.local/bin/neomutt-2task +++ b/office/.local/bin/mail-totask @@ -5,9 +5,9 @@ Creates a new task with corresponding description and tags. Description and tags can be supplied via commandline through `-d` and `-t` options, or interactively by using the options without supplying a string for them. E.g.: -`mutt2task` => task: Reply to from -`mutt2task -d "hello" -t one two` => task: hello +one +two -`mutt2task -d -t` => asks you interactively for description and tags +`mail-totask` => task: Reply to from +`mail-totask -d "hello" -t one two` => task: hello +one +two +`mail-totask -d -t` => asks you interactively for description and tags """ import argparse diff --git a/office/.local/bin/neomutt-filer b/office/.local/bin/neomutt-filer deleted file mode 100755 index 02f6105..0000000 --- a/office/.local/bin/neomutt-filer +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash -# A simple utility script for neomutt to use your favorite cli -# file manager to work with files in neomutt. -# Can add attachments to emails or save attachments in a chosen directory. -# -# Use it as `neomutt-filer attach ` -# or `neomutt-filer saveto ` -# -# Can be bound to neomutt macros like the following: -# -# macro compose A 'source "neomutt-filer attach"|' "Attach with file manager" -# macro attach S 'source "neomutt-filer saveto"|' "Save attachment to dir" -# -# read more at the following GH issues: -# https://github.com/neomutt/neomutt/issues/1515 -- switch folders with external program -# https://github.com/neomutt/neomutt/issues/1669 -- attach files with fzf - -_file_picker() { - if command -v vifm >/dev/null 2>&1; then - vifm --choose-files - "$@" - # yazi & ranger untested - elif command -v yazi >/dev/null 2>&1; then - yazi "$@" --chooser-file - - elif command -v ranger >/dev/null 2>&1; then - ranger --choosefiles - "$@" - elif command -v fzf >/dev/null 2>&1; then - fzf -m --prompt='Choose one/multiple file(s) to attach >' "$@" - fi -} -_dir_picker() { - if command -v vifm >/dev/null 2>&1; then - vifm --choose-dir - --on-choose exit "$@" - # yazi & ranger untested - # elif command -v yazi >/dev/null 2>&1; then - # yazi "$@" --chooser-file - - # elif command -v ranger >/dev/null 2>&1; then - # ranger --choosefiles - "$@" - elif command -v fzf >/dev/null 2>&1; then - find "$@" -type d -print | fzf --prompt='Choose dir >' - fi -} - -attachfile() { - _file_picker "$@" | - while IFS=$'\n' read -r attachment; do - printf "push '%s'\n" "$attachment" - done -} - -savetodir() { - _dir_picker "$@" | xargs printf "push '%sy'\n" -} - -_usage() { - echo """ -Usage: neomutt-filer [options...] -Subcommands: - attach Pick files to attach - saveto Pick a directory to save into - """ -} - -case "${1:-}" in -attach) - shift - attachfile "$@" - ;; -saveto) - shift - savetodir "$@" - ;; --h | --help | *) _usage ;; -esac 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/office/README.md b/office/README.md index 44c70a7..725c646 100644 --- a/office/README.md +++ b/office/README.md @@ -1,6 +1,6 @@ # office module -neomutt - terminal mail client +aerc - terminal mail client [mbsync](https://isync.sourceforge.io/mbsync.html) - mirror your Imapped mail directory locally with two-way synchronization [notmuch](https://notmuchmail.org/) - index and search your mail msmtp - send mail through shell commands @@ -16,11 +16,11 @@ Take care that most of the credential/account setup of course is highly specific ## mail The current mail setup uses `mbsync` (from the isync project) to locally mirror the GMail imap folder. -It is run through a `neomutt-syncmail` script which can invoke pre- and post-sync hooks +It is run through a `mail-sync` script which can invoke pre- and post-sync hooks (e.g. run your incoming mail through filters as soon as they arrive or ingest them into full-text search engines).[^1] The sync script also automatically unlocks any pass directory so that credentials can be put into their respective applications and the directory closes again after use. -`msmtp` is used for mail sending by neomutt (and git if using git send-email). -`neomutt` then picks up the mail directory filled by `mbsync` and lets you browse it, respond to mail or create new ones. +`msmtp` is used for mail sending by aerc (and git if using git send-email). +`aerc` then picks up the mail directory filled by `mbsync` and lets you browse it, respond to mail or create new ones. [^1]: That being said, the script is a little dusty and could probably use a little overhaul. It *works* but could be more fantastic I feel. 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) },