Compare commits

...

16 commits

Author SHA1 Message Date
e84584fb0d
wezterm: Remove emoji picker key bind
I use my own 'bemoji' picker everywhere, including wezterm.
2025-09-24 08:25:02 +02:00
e0a8db1194
aerc: Enable mailto functionality for aerc
Explanation here:
https://man.sr.ht/~rjarry/aerc/configurations/mailto.md

I built a custom script 'aerc-in-terminal' since I want to expand the
$TERMINAL env var and use that instead. `.desktop` files do not allow
expanding vars (since they don't run in a user shell), so this is a
compromise.
2025-09-24 08:25:02 +02:00
4328cbba39
notmuch: Remove move-and-untag pre hook 2025-09-24 08:25:01 +02:00
c130b2a6b6
notmuch: Update hooks 2025-09-24 08:25:01 +02:00
38b02f5680
aerc: Add notmuch inbox mapping
Some simple mapping (inbox, sent, trash, archive, drafts) to the
Personal map file, with the option to extend for private mappings with
dotter.
2025-09-24 08:25:00 +02:00
547e9e9971
aerc: Add mail type formatting
Mails get symbols in the flag column if they are sent by me, CC or BCC
me, or they are tagged as a 'list' (from a mailing list).

Added some additional info to status bar (current folder, recent and
unread counts), and extended the flag column slightly to accomodate more
flags.
2025-09-24 08:25:00 +02:00
a735c209f5
aerc: Add flag formatting 2025-09-24 08:24:59 +02:00
54ee018021
aerc: Add configuration to replace neomutt usage
Starting to replace neomutt in my workflow with aerc:
it is a little more lightweight, directly supports notmuch directories
and has a relatively sane configuration style (mostly just ini-like)
with 'go-templating' baked in.

In general, the configuration just feels less 'cobbled-together' than
before. I can make changes without worrying what other things are going
to break by doing so. I understand the complete configuration and
styling, instead of mostly relying on other people's formatting lines
for the styles.

I am still learning some of the configuration possibilities but it
already functions as a neomutt replacement.
2025-09-24 08:24:59 +02:00
8fdffef644
aerc: Add accounts configuration template
Uses private from-email and email aliases fields.
2025-09-24 08:24:58 +02:00
9dcda2a53d
dotter: Add sample file containing all private variables
This helps to show what is 'hidden' in the public repository and also
shows me at a glance all the dotter-supplied variables to keep an
overview of where we inject stuff.
2025-09-24 08:24:57 +02:00
87bc21ef19
neomutt: Add display and bind changes 2025-09-24 08:24:57 +02:00
b52d58dd58
services: Kill waybar processes before starting service 2025-09-24 08:24:54 +02:00
1c95446ce0
dotter: Remove unnecessary explicit symbolic links 2025-09-24 08:24:53 +02:00
c2e64a17e0
mako: Include color configuration
Include the color config for mako from ~/.local/state/mako/style instead
of hardcoding it or templating it into the config file.

This means we have to ensure the directory and file exist before running
mako which we do with an `env.d` startup script.
2025-09-24 08:24:52 +02:00
6086f47023
sh: Use dotter default var helper for credentials 2025-09-24 08:24:52 +02:00
e57cfb77fc
dotter: Add default variable template helper 2025-09-24 08:24:51 +02:00
22 changed files with 584 additions and 97 deletions

View file

@ -4,6 +4,7 @@
default_target_type = "symbolic"
[helpers]
with_default = ".dotter/helpers/var_with_default.rhai"
# BASE: A base system. Sets up a nice xdg (zsh) shell environment, utility scripts and
# a development environment based on git and nvim.
@ -28,8 +29,6 @@ sh = "~"
vcs = "~"
[nvim.files]
"nvim/.config/nvim/spell/de.utf-8.add.spl" = { target = "~/.config/nvim/spell/de.utf-8.add.spl", type = "symbolic" }
"nvim/.config/nvim/spell/en.utf-8.add.spl" = { target = "~/.config/nvim/spell/en.utf-8.add.spl", type = "symbolic" }
nvim = "~"
[scripts.files]
@ -57,10 +56,12 @@ pass = "~"
[office.files]
"office/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
"office/.config/glow/email.json" = { target = "~/.config/glow/email.json", type = "symbolic" }
"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" }
@ -92,18 +93,11 @@ writing = "~"
depends = ["linux", "desktop", "multimedia", "qutebrowser"]
[desktop.files]
"desktop/.config/flavours/templates" = { target = "~/.config/flavours/templates", type = "symbolic" }
"desktop/.config/waybar/config" = { target = "~/.config/waybar/config", type = "symbolic" }
"desktop/.config/mako/config" = { target = "~/.config/mako/config", type = "template", prepend = "# TEMPLATED BY DOTTER\n" }
"desktop/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
desktop = "~"
[multimedia.files]
"multimedia/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
"multimedia/.config/mpv/scripts" = { target = "~/.config/mpv/scripts", type = "symbolic" }
"multimedia/.config/ncmpcpp/config" = { target = "~/.config/ncmpcpp/config", type = "symbolic" }
"multimedia/.config/mpv/fonts/uosc_icons.otf" = { target = "~/.config/mpv/fonts/uosc_icons.otf", type = "symbolic" }
"multimedia/.config/mpv/fonts/uosc_textures.ttf" = { target = "~/.config/mpv/fonts/uosc_textures.ttf", type = "symbolic" }
"multimedia/.config/vimiv/styles/base16" = { target = "~/.config/vimiv/styles/base16", type = "template" }
multimedia = "~"

View file

@ -0,0 +1,12 @@
// tests the type of variable passed in
// if 'no' type (does not exist or cant be parsed)
// we return the second, 'default' variable
fn choose(a, b) {
if type_of(a) != "()" {
return a;
}
return b;
}
choose(params[0], params[1])

32
.dotter/sample.toml Normal file
View file

@ -0,0 +1,32 @@
includes = []
packages = ["workstation"]
[files]
[variables]
multimedia_beets_musicbrainz_user = ""
multimedia_beets_musicbrainz_pass = ""
multimedia_mopidy_subidy_url = ""
multimedia_mopidy_subidy_user = ""
multimedia_mopidy_subidy_pass = ""
cred_llm_groq_api_key = ""
cred_llm_gh_copilot_token = ""
cred_llm_anthropic_api_key = ""
cred_llm_gemini_api_key = ""
mail_personal_host = ""
mail_personal_username_cmd = ""
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"]

View file

@ -73,13 +73,9 @@ start = "/* Start flavours */"
end = "/* End flavours */"
[[items]]
# MAKO DOES NOT SUPPORT INCLUDES YET
template = "mako"
file = "~/.config/mako/config"
light = false
rewrite = false
start = "# Start flavours"
end = "# End flavours"
file = "~/.local/state/mako/style"
rewrite = true
hook = "killall mako"
[[items]]

View file

@ -9,11 +9,9 @@ default-timeout=5000
ignore-timeout=1
font=monospace 14
# Intentionally left empty, automatically filled by flavours
# on switching theme.
# Start flavours
# End flavours
# this requires the file to exist
# or mako will not start
include=~/.local/state/mako/style
[urgency=critical]
#on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga

View file

@ -0,0 +1,5 @@
#!/usr/bin/env sh
# Ensure the directory and file for mako style exists or it errors out on startup
[ -e "${XDG_STATE_HOME:-$HOME/.local/state}/mako" ] || mkdir -p "${XDG_STATE_HOME:-$HOME/.local/state}/mako"
[ -f "${XDG_STATE_HOME:-$HOME/.local/state}/mako/style" ] || touch "${XDG_STATE_HOME:-$HOME/.local/state}/mako/style"

View file

@ -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}}

View file

@ -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 <mail@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

View file

@ -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]

View file

@ -0,0 +1,218 @@
# Binds are of the form <key sequence> = <command to run>
# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>"
# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit
gT = :prev-tab<Enter>
gt = :next-tab<Enter>
<C-PgUp> = :prev-tab<Enter>
<C-PgDn> = :next-tab<Enter>
\[t = :prev-tab<Enter>
\]t = :next-tab<Enter>
<C-t> = :term<Enter>
? = :help keys<Enter>
<C-c> = :prompt 'Quit?' quit<Enter>
<C-q> = :prompt 'Quit?' quit<Enter>
<C-z> = :suspend<Enter>
[messages]
q = :quit<Enter> # quick quitting
j = :next<Enter>
\]m = :next<Enter>
<Down> = :next<Enter>
<C-d> = :next 50%<Enter>
<C-f> = :next 100%<Enter>
k = :prev<Enter>
\[m = :prev<Enter>
<Up> = :prev<Enter>
<C-u> = :prev 50%<Enter>
<C-b> = :prev 100%<Enter>
gg = :select 0<Enter>
G = :select -1<Enter>
\]e = :next-folder<Enter>
\[e = :prev-folder<Enter>
\}e = :next-folder -u<Enter>
\{e = :prev-folder -u<Enter>
<C-Down> = :next-folder<Enter>
<C-Up> = :prev-folder<Enter>
H = :collapse-folder<Enter>
L = :expand-folder<Enter>
<C-Left> = :collapse-folder<Enter>
<C-Right> = :expand-folder<Enter>
gi = :cf Inbox<Enter>
gs = :cf Sent<Enter>
gd = :cf Drafts<Enter>
ga = :cf Archive<Enter>
gA = :cf All<Enter>
gr = :cf Trash<Enter>
v = :mark -t<Enter>
V = :mark -V<Enter>
J = :mark -t<Enter>:next<Enter>
K = :mark -t<Enter>:prev<Enter>
T = :prompt "Mark filter: " :mark<Enter>
zt = :toggle-threads<Enter>
zc = :fold<Enter>
zC = :fold -a<Enter>
zo = :unfold<Enter>
zO = :unfold -a<Enter>
za = :fold -t<Enter>
zA = :fold -t -a<Enter>
zz = :align center<Enter>
zt = :align top<Enter>
zb = :align bottom<Enter>
<Enter> = :view<Enter>
l = :view<Enter>
# remove filters
<Space>/ = :filter<Enter>
<Space>\ = :filter<Enter>
,F = :tag<Space>
,s = :tag !unread<Enter>
,u = :tag !urgent<Enter>
,d = :tag !todo<Enter>
,i = :tag !important<Enter>
,f = :tag !flagged<Enter>
,w = :tag !wait<Enter>
,l = :tag !delegated<Enter>
,j = :tag !junk<Enter>
,J = :tag !junk<Enter>:archive flat<Enter> # archive message as junk
<space>s = :filter tag:unread<Enter>
<space>u = :filter tag:urgent<Enter>
<space>d = :filter tag:todo<Enter>
<space>i = :filter tag:important or tag:flagged<Enter>
<space>f = :filter tag:flagged<Enter>
<space>w = :filter tag:wait<Enter>
<space>l = :filter tag:delegated<Enter>
d = :move Trash<Enter>
D = :choose -o y 'Really delete this message' :delete<Enter>
a = :archive flat<Enter> # archive message
A = :unmark -a<Enter>:mark -T<Enter>:archive flat<Enter> # archive thread
M = :menu -d :move<Enter> # move mail
m = :compose<Enter>
f = :forward<Enter>
F = :bounce<space>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
rR = :reply<Enter>
rQ = :reply -q<Enter>
c = :cf<space>
! = :term<space>
| = :pipe<space>
/ = :search<space>
\ = :filter<space>
n = :next-result<Enter>
N = :prev-result<Enter>
<Esc> = :clear<Enter>
s = :split<Enter>
S = :vsplit<Enter>
# 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<Enter>
# pa = :patch apply <Tab>
# pd = :patch drop <Tab>
# pb = :patch rebase<Enter>
# pt = :patch term<Enter>
# ps = :patch switch <Tab>
[messages:folder=Drafts]
m = :recall<Enter>
[messages:folder=Trash]
d = :choose -o y 'Really delete this message' :delete<Enter>
D = :delete<Enter>
[view]
/ = :toggle-key-passthrough<Enter>/
q = :close<Enter>
h = :close<Enter>
O = :open<Enter>
o = :open<Enter>
S = :menu -c 'vifm --choose-dir - --on-choose exit' :save<Enter> # save current with
| = :pipe<space>
d = :move Trash<Enter>
D = :choose -o y 'Really delete this message' :delete<Enter>
a = :archive flat<Enter> # archive message
A = :unmark -a<Enter>:mark -T<Enter>:archive flat<Enter> # archive thread
M = :menu -d :move<Enter> # move mail
<C-y> = :copy-link<space>
<C-u> = :open-link<space>
m = :compose<Enter>
f = :forward<Enter>
F = :bounce<space>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
rR = :reply<Enter>
rQ = :reply -q<Enter>
H = :toggle-headers<Enter>
J = :next-part<Enter>
K = :prev-part<Enter>
<C-Up> = :prev-part<Enter>
<C-Down> = :next-part<Enter>
<C-n> = :next<Enter>
<C-p> = :prev<Enter>
<C-Right> = :next<Enter>
<C-Left> = :prev<Enter>
tr = :pipe trans -show-original n -b -no-autocorrect<Enter> # translate message
[view::passthrough]
$noinherit = true
$ex = <C-x>
<Esc> = :toggle-key-passthrough<Enter>
[compose]
# Keybindings used when the embedded terminal is not selected in the compose view
$noinherit = true
$ex = <C-x>
$complete = <C-o>
<C-Up> = :prev-field<Enter>
<C-Down> = :next-field<Enter>
<C-p> = :prev-field<Enter>
<C-n> = :next-field<Enter>
<tab> = :next-field<Enter>
<backtab> = :prev-field<Enter>
<A-p> = :switch-account -p<Enter>
<A-n> = :switch-account -n<Enter>
<C-Left> = :switch-account -p<Enter>
<C-Right> = :switch-account -n<Enter>
[compose::editor]
# Keybindings used when the embedded terminal is selected in the compose view
$noinherit = true
$ex = <C-x>
[compose::review]
# Keybindings used when reviewing a message to be sent
# Inline comments are used as descriptions on the review screen
y = :send<Enter> # Send
n = :abort<Enter> # Abort (discard message, no confirmation)
s = :sign<Enter> # Toggle signing
x = :encrypt<Enter> # Toggle encryption to all recipients
v = :preview<Enter> # Preview message
p = :postpone<Enter> # Postpone
q = :choose -o d discard abort -o p postpone postpone<Enter> # Abort or postpone
e = :edit<Enter> # Edit (body and headers)
a = :attach -m<Enter> # Add attachment
d = :detach<space> # Remove attachment
[terminal]
$noinherit = true
$ex = <C-x>

View file

@ -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

View file

@ -48,13 +48,13 @@ color progress black cyan
# Formatting ----------------------------------------------------------------------
set date_format = "%a %d %h %H:%M"
set index_format=" %zc %zs %zt | %-35.35L %?X?& ? %M %-30.100s %> %?Y?%Y ? %(!%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 = '%B%<F? [%F]>%* %<Z?%Z/>%S'
set sidebar_format = '%D%<F? [%F]>%* %<Z?%Z/>%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' " "

View file

@ -42,27 +42,31 @@ macro index K ":set resolve=no<enter><tag-thread><previous-undeleted>:set resolv
macro index t ":set resolve=no<enter><tag-thread>:set resolve=yes<enter>" "tag current thread"
macro index T ":set resolve=no<enter><tag-entry>:set resolve=yes<enter>" "tag current entry"
# flagging
bind index,pager ,F set-flag
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~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
bind index,pager ,fl edit-label # set X-Label Header
# # 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~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
# bind index,pager ,fl edit-label # set X-Label Header
# # Saner copy/move dialogs
# macro index,pager ,c "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
# macro index,pager ,m "<tag-thread><tag-prefix><save-message>?<toggle-mailboxes>" "move thread to a mailbox"
# macro index,pager ,M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
# sorting
bind index <space>s sort-mailbox
bind index <space>S sort-reverse
# threads
bind index l display-message
bind index <return> display-message
macro index l "<display-message><skip-headers>" "display message"
macro index <return> "<display-message><skip-headers>" "display message"
bind index h collapse-thread
bind index <space><space> 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
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
@ -76,13 +80,8 @@ 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<enter><clear-flag>!<save-message>=Archive<enter><enter><sync-mailbox><enter><enter-command>echo 'Message deleted'<enter>:set resolve=yes<enter>" "Quick Delete"
macro index A ";:set resolve=no<enter><clear-flag>!<save-message>=Archive<enter><enter><sync-mailbox><enter><enter-command>echo 'Message archived'<enter>:set resolve=yes<enter>" "Quick Archive"
# Saner copy/move dialogs
macro index,pager ,c "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index,pager ,m "<tag-thread><tag-prefix><save-message>?<toggle-mailboxes>" "move thread to a mailbox"
macro index,pager ,M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
# macro index D ";:set resolve=no<enter><clear-flag>!<save-message>=Archive<enter><enter><sync-mailbox><enter><enter-command>echo 'Message deleted'<enter>:set resolve=yes<enter>" "Quick Delete"
# macro index A ";:set resolve=no<enter><clear-flag>!<save-message>=Archive<enter><enter><sync-mailbox><enter><enter-command>echo 'Message archived'<enter>:set resolve=yes<enter>" "Quick Archive"
# search navigation
bind generic,index,attach,browser,pager n search-next # next result
@ -176,16 +175,28 @@ bind compose gr group-related
bind compose gl group-multilingual
bind compose gu ungroup-attachment
# manage attachments
macro attach s '<enter-command>source "neomutt-filer saveto ~/downloads"|<enter>' "Save attachment to dir"
bind attach <return> view-mailcap
bind attach l view-mailcap
# questions
# https://github.com/ceuk/mutt_dotfiles/blob/master/.config/mutt/keys/binds.muttrc
# macro index \# "<edit-label>\n" "Mark as Complete"
# macro index <return> "<display-message>\n<skip-headers>\n"
# macro index x "<limit>all\n" "show all messages (undo limit)"
# macro index \ci "<limit>~F\n" "Limit by flagged"
# mailbox navigation
macro index,pager gi "<change-vfolder>Inbox<enter>" "go to inbox"
macro index,pager gs "<change-vfolder>Sent<enter>" "go to sent"
macro index,pager gd "<change-vfolder>Drafts<enter>" "go to drafts"
macro index,pager gt "<change-vfolder>Trash<enter>" "go to trash"
macro index,pager ga "<change-vfolder>Archive<enter>" "go to archive"
macro index,pager gr "<change-vfolder>Receipts<enter>" "go to receipts"
macro index,pager gj "<change-vfolder>Jobs<enter>" "go to jobs"
#### Misc functions and macros
# Refresh far imap email
macro index,pager O "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; neomutt-syncmail<enter>" "refresh all e-mail"
# Send mail to taskwarrior
macro index,pager ,t "<pipe-message>neomutt-2task -c -d -t<enter>" "add mail to taskwarrior"
macro index,pager ,T "<pipe-message>neomutt-2task -c<enter>" "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
@ -199,38 +210,5 @@ macro compose ,m \
<tag-entry><previous-entry><tag-entry><group-alternatives>" \
"Convert markdown to HTML5 and plaintext alternative content types"
#
#
# # mailbox navigation
macro index,pager gi "<change-folder>=Inbox<enter>" "go to inbox"
# macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
# macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
# macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
# macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
# macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
# # pager navigation
# bind pager,attach h exit
# bind pager l view-attachments
# bind pager k previous-line
# bind pager j next-line
# bind pager gg top
# bind pager G bottom
#
# # markdown to html for composition
# # TODO: Check if this is working - F is a spelling mistake no?
# macro compose ,m "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=UTF-8\n" "Convert from MD to HTML"
#
#
# # since we unbound the original g
# bind index,pager r noop # to avoid accidentally sending replies
# bind index,pager rr group-reply
# bind index,pager ro reply
# # open urls found in the e-mail
# macro index,pager \CU "<enter-command> unset pipe_decode<enter><pipe-message>extract_url | fzf | clip<enter>" "get URLs"
#
# # Refresh far imap email
# macro index O "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; neomutt-syncmail<enter>" "refresh all e-mail"
#
# # Send mail to taskwarrior
# macro index,pager ,T "<pipe-message>neomutt-2task -c -d -t<enter>" "add mail as task to taskwarrior with custom description and tags"
# macro index,pager ,t "<pipe-message>neomutt-2task -c<enter>" "add mail as task to taskwarrior"

View file

@ -19,10 +19,15 @@ video/*; setsid mpv --quiet %s &; copiousoutput
# open spreadsheets in sc-im
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; sc-im %s; needsterminal
# open anything else externally
application/pdf; open %s;
# 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/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt \; open /tmp/mutt/$(basename %s) &
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) &

View file

@ -5,3 +5,67 @@ 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 '<shell-escape>notmuch new >/dev/null<enter>'"
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 '<change-vfolder>Inbox<enter>'
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 "<modify-labels>+flagged" "Toggle flagged tag"
#
# macro index,pager ,ff "<modify-labels>!flagged<enter><sync-mailbox><shell-escape>notmuch new<enter>" "toggle flag"
macro index,pager ,ff "<modify-labels>!flagged<enter>" "toggle flag"
macro index,pager ,fi "<modify-labels>+inbox<enter><sync-mailbox>" "send to inbox"
macro index,pager R "<push> '<modify-labels>+trash<enter><shell-escape>notmuch new<enter>'" "send to trash"
bind index,pager w modify-labels
# macro index A "<modify-labels>+archive -unread -inbox<enter>"
# macro index I "<modify-labels>-inbox -unread<enter>"
# macro index S "<modify-labels>"
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

View file

@ -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
#

View file

@ -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

View file

@ -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 "$@"

View file

@ -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

View file

@ -1,6 +1,9 @@
#!/bin/sh
#shellcheck disable=SC1091
[ -r ./conf ] && . ./conf
pgrep -x waybar && pkill -x waybar
exec 2>&1
exec chpst -e "$TURNSTILE_ENV_DIR" waybar

View file

@ -3,15 +3,7 @@
#
# Received from dotter variables
{{#if cred_llm_groq_api_key}}
export GROQ_API_KEY="{{cred_llm_groq_api_key}}"
{{/if}}
{{#if cred_llm_groq_api_key}}
export GH_COPILOT_TOKEN="{{cred_llm_gh_copilot_token}}"
{{/if}}
{{#if cred_llm_groq_api_key}}
export ANTHROPIC_API_KEY="{{cred_llm_anthropic_api_key}}"
{{/if}}
{{#if cred_llm_groq_api_key}}
export GEMINI_API_KEY="{{cred_llm_gemini_api_key}}"
{{/if}}
export GROQ_API_KEY="{{with_default cred_llm_groq_api_key ''}}"
export GH_COPILOT_TOKEN="{{with_default cred_llm_gh_copilot_token ''}}"
export ANTHROPIC_API_KEY="{{with_default cred_llm_anthropic_api_key ''}}"
export GEMINI_API_KEY="{{with_default cred_llm_gemini_api_key ''}}"

View file

@ -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) },