From 5a4d0051bee748d5538cf650a97c3298186dcd16 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 17 Sep 2025 16:48:43 +0200 Subject: [PATCH 01/12] zsh: Fix carapace and fzf-tab compatibility As mentioned in https://github.com/carapace-sh/carapace-bin/issues/2819#issuecomment-3092307945, fzf-tab directory completes are empty if you try to complete on a directory without any prior input. I.e.: `ls -hal ~/.config/a` shows output (dirs starting with a). `ls -hal ~/.config/` is empty. This fixes the issue by making the query string use the full inserted value. --- terminal/.config/zsh/.zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/terminal/.config/zsh/.zshrc b/terminal/.config/zsh/.zshrc index ae3ff19..4bea925 100644 --- a/terminal/.config/zsh/.zshrc +++ b/terminal/.config/zsh/.zshrc @@ -128,6 +128,9 @@ eval "$(zoxide init zsh)" eval "$(atuin init zsh)" export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional source <(carapace _carapace) +# make fzf-tab compatible with carapace +# see +zstyle ':fzf-tab:*' query-string '' # Speed up autocomplete, force prefix mapping zstyle ':completion:*' accept-exact '*(N)' From eb7f47fee594db42a4ac48d856771a3f8098d0c7 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 17 Sep 2025 16:48:43 +0200 Subject: [PATCH 02/12] wezterm: Unmap debug overlay mappings Unmap the custom set Debug overlay mapping since I haven't had to use it in absolute ages. Additionally we also unmap the default mapping for the debug overlay - which frees up the key combination to be passed through to TUIs. --- terminal/.config/wezterm/maps.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/terminal/.config/wezterm/maps.lua b/terminal/.config/wezterm/maps.lua index 1b66ed9..12e7848 100644 --- a/terminal/.config/wezterm/maps.lua +++ b/terminal/.config/wezterm/maps.lua @@ -2,7 +2,8 @@ local wezterm = require("wezterm") local act = wezterm.action local keys = { - { key = "O", mods = "CTRL", action = act.ShowDebugOverlay }, + { key = "L", mods = "CTRL|SHIFT", action = "DisableDefaultAssignment" }, + { key = "[", mods = "CTRL", action = act.ScrollToPrompt(-1) }, { key = "]", mods = "CTRL", action = act.ScrollToPrompt(1) }, { -- vertical pane From 821693dc7c305952750fdcfaa17802911d030b7f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 17 Sep 2025 16:48:43 +0200 Subject: [PATCH 03/12] neomutt: New key mapping style First we unbind all existing key mappings and then we slowly build up our own again. May be somewhat unnecessary but I have been getting _very_ confused with neomutt mappings just popping up all over the place and never quite sure if they were from me or default settings or where exactly they were configured. This provides a clean slate to build upon. --- office/.config/neomutt/keys/bind | 225 ++++++++++++++++++++++++ office/.config/neomutt/keys/unbind | 263 +++++++++++++++++++++++++++++ office/.config/neomutt/maps | 93 ---------- office/.config/neomutt/neomuttrc | 4 +- 4 files changed, 491 insertions(+), 94 deletions(-) create mode 100644 office/.config/neomutt/keys/bind create mode 100644 office/.config/neomutt/keys/unbind delete mode 100644 office/.config/neomutt/maps diff --git a/office/.config/neomutt/keys/bind b/office/.config/neomutt/keys/bind new file mode 100644 index 0000000..21c64cb --- /dev/null +++ b/office/.config/neomutt/keys/bind @@ -0,0 +1,225 @@ +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 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~UN." "mark all messages as read" +bind index,pager ,fl edit-label # set X-Label Header + +# sorting +bind index s sort-mailbox +bind index S sort-reverse + +# threads +bind index l display-message +bind 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 +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" + +# 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" + +# 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 + +macro attach s 'source "neomutt-filer saveto ~/downloads"|' "Save attachment to dir" +bind attach view-mailcap +bind attach l view-mailcap + +# questions +# https://github.com/ceuk/mutt_dotfiles/blob/master/.config/mutt/keys/binds.muttrc +# macro index \# "\n" "Mark as Complete" +# macro index "\n\n" +# macro index x "all\n" "show all messages (undo limit)" +# macro index \ci "~F\n" "Limit by flagged" + + +# +# +# # 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 gj "=Junk" "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 " unset pipe_decodeextract_url | fzf | clip" "get URLs" +# +# # Refresh far imap email +# macro index 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 as task to taskwarrior with custom description and tags" +# macro index,pager ,t "neomutt-2task -c" "add mail as task to taskwarrior" diff --git a/office/.config/neomutt/keys/unbind b/office/.config/neomutt/keys/unbind new file mode 100644 index 0000000..0c71e1f --- /dev/null +++ b/office/.config/neomutt/keys/unbind @@ -0,0 +1,263 @@ +# 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/maps b/office/.config/neomutt/maps deleted file mode 100644 index 508ba69..0000000 --- a/office/.config/neomutt/maps +++ /dev/null @@ -1,93 +0,0 @@ -# index navigation -bind index l display-message -bind index L limit -bind index,pager g noop # don't send group-replies with g -bind index gg first-entry -bind index G last-entry -bind index collapse-thread -macro index J "tag current and select next entry" -macro index K "tag current and select previous entry" -macro index t "tag current entry" - - -# 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 s toggle-new -bind index S set-flag -macro index \CS "T~UN." "mark all messages as read" -bind index,pager w display-toggle-weed - -# Thread manipulation -bind pager d noop -bind index,pager dD delete-message -bind index,pager dd delete-subthread -bind index,pager dt delete-thread -bind pager,index gt next-thread -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 -# 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" - -# Email completion bindings -bind editor complete-query -bind editor ^T complete -# add contact to Khard address book -macro index,pager ,a \ - "khard add-email" \ - "add the sender email address to khard" - -# 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 gj "=Junk" "go to junk" -# sidebar navigation -bind index,pager B sidebar-toggle-visible -bind index,pager sidebar-next -bind index,pager sidebar-prev -bind index,pager sidebar-open -# search navigation -macro index a "all\n" "show all messages (undo limit)" -bind browser,index,pager N search-opposite # vim-like search -bind index \\ vfolder-from-query # notmuch search -# 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 -macro compose ,m "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=UTF-8\n" "Convert from MD to HTML" - -# attach and save file attachments -macro compose a 'source "neomutt-filer attach"|' "Attach with file manager" -macro attach s 'source "neomutt-filer saveto"|' "Save attachment to dir" - -# 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 " unset pipe_decodeextract_url | fzf | clip" "get URLs" - -# Refresh far imap email -macro index 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 as task to taskwarrior with custom description and tags" -macro index,pager ,t "neomutt-2task -c" "add mail as task to taskwarrior" diff --git a/office/.config/neomutt/neomuttrc b/office/.config/neomutt/neomuttrc index 84fcf1c..e768713 100644 --- a/office/.config/neomutt/neomuttrc +++ b/office/.config/neomutt/neomuttrc @@ -1,5 +1,7 @@ source colors source settings -source maps + +source keys/unbind +source keys/bind source account From 3ccd5b3032e1df1401408a4e872df9c40cdd1e84 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 17 Sep 2025 16:48:43 +0200 Subject: [PATCH 04/12] neomutt: Set spell checker to enchant We do not explicitly make use of the spell checker through neomutt yet but just in case we default to the nice enchant 2 spellcheck API wrapper. --- office/.config/neomutt/settings | 2 ++ 1 file changed, 2 insertions(+) diff --git a/office/.config/neomutt/settings b/office/.config/neomutt/settings index 3f3636c..6006e9b 100644 --- a/office/.config/neomutt/settings +++ b/office/.config/neomutt/settings @@ -67,6 +67,8 @@ 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 From f36add111a9e288563eb8848fe16ea8133cce216 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 17 Sep 2025 16:48:43 +0200 Subject: [PATCH 05/12] neomutt: Do not auto sort sidebar The sidebar will be sorted in the order it is defined in the settings. --- office/.config/neomutt/settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/office/.config/neomutt/settings b/office/.config/neomutt/settings index 6006e9b..1eb3413 100644 --- a/office/.config/neomutt/settings +++ b/office/.config/neomutt/settings @@ -91,7 +91,7 @@ set sidebar_visible = no set sidebar_component_depth = 0 set sidebar_divider_char = '│' set sidebar_next_new_wrap = yes -set sidebar_sort = 'path' +set sidebar_sort = 'unsorted' # Shorten mailbox names set sidebar_short_path = yes # Delete everything up to the last / character From 4693f3f6ddb84c54cedc5e8e297d2072b951e67b Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 17 Sep 2025 16:48:43 +0200 Subject: [PATCH 06/12] notmuch: Set default tags for incoming email --- office/.config/notmuch/config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/office/.config/notmuch/config b/office/.config/notmuch/config index 332f29d..697ef60 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= -ignore= +tags=unread;inbox +ignore=Trash;Junk # Search configuration # @@ -61,7 +61,7 @@ ignore= # query will override that exclusion. # [search] -exclude_tags=deleted;spam; +exclude_tags=deleted;spam # Maildir compatibility configuration # From a1a12cc54cb2c97abad75d2ad368e0db7b314939 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 17 Sep 2025 16:48:43 +0200 Subject: [PATCH 07/12] neomutt: Add html-email creation pipeline to compose menu Hitting `,m` in the compose menu creates a dual txt/html email group when the highlighted file is written in (djot) markdown. Delete the original message afterwards to create a fully functional html email with plaintext fallback. Completely taken from: https://tom.wemyss.net/posts/neomutt-markdown-email/ with many thanks. What an amazing use of pipelines in neomutt! --- office/.config/neomutt/keys/bind | 11 ++++++++ .../local/share/pandoc/templates/email.html | 25 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 writing/pandoc/local/share/pandoc/templates/email.html diff --git a/office/.config/neomutt/keys/bind b/office/.config/neomutt/keys/bind index 21c64cb..29f5712 100644 --- a/office/.config/neomutt/keys/bind +++ b/office/.config/neomutt/keys/bind @@ -187,6 +187,17 @@ bind attach l view-mailcap # macro index x "all\n" "show all messages (undo limit)" # macro index \ci "~F\n" "Limit by flagged" +# 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" # # diff --git a/writing/pandoc/local/share/pandoc/templates/email.html b/writing/pandoc/local/share/pandoc/templates/email.html new file mode 100644 index 0000000..8c15480 --- /dev/null +++ b/writing/pandoc/local/share/pandoc/templates/email.html @@ -0,0 +1,25 @@ + + + + + + +$for(css)$ + +$endfor$ + +$for(header-includes)$ + $header-includes$ +$endfor$ + + + $body$ + $for(include-after)$ + $include-after$ + $endfor$ + + From 60012b5d5c2ac168c9498d0ee122d7c2305787ad Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 18 Sep 2025 19:40:49 +0200 Subject: [PATCH 08/12] notmuch: Ingore uidvalidity and mbsyncstate files Will loudly complain about them otherwise. --- office/.config/notmuch/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/office/.config/notmuch/config b/office/.config/notmuch/config index 697ef60..fe92f8b 100644 --- a/office/.config/notmuch/config +++ b/office/.config/notmuch/config @@ -49,7 +49,7 @@ other_email=mo82rimu@studserv.uni-leipzig.de;moehme@ruc.dk; # [new] tags=unread;inbox -ignore=Trash;Junk +ignore=.uidvalidity;.mbsyncstate;Trash;Junk # Search configuration # From 8ca75b4a14125a78b4df7860a7becfb9080f2448 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 21 Sep 2025 09:05:48 +0200 Subject: [PATCH 09/12] dotter: Add llm and goimapnotify template links --- .dotter/global.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.dotter/global.toml b/.dotter/global.toml index 9efd8c6..a277ab2 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -11,6 +11,7 @@ depends = ["shell", "vcs", "nvim", "scripts", "ssh", "terminal", "bootstrap"] [shell.files] "sh/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" } +"sh/.config/sh/env.d/llm-api.sh" = { target = "~/.config/sh/env.d/llm-api.sh", type = "template" } sh = "~" [vcs.files] @@ -53,6 +54,7 @@ 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/neomutt/account" = { target = "~/.config/neomutt/account", type = "template" } From d1c37d36a92f13a3be4bcccc08847728f5d1a232 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 21 Sep 2025 08:56:32 +0200 Subject: [PATCH 10/12] dotter: Default to symlinks Dotter can default any found file to symbolic links as described here: https://github.com/SuperCuber/dotter/wiki/5.-Built%E2%80%90ins,-Helpers,-and-Settings#settings This way whenever we add a file we do not have to set it for files which contain the '{{ }}' pattern - which dotter otherwise automatically picks up as template files. --- .dotter/global.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.dotter/global.toml b/.dotter/global.toml index a277ab2..69d2ab9 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -1,3 +1,8 @@ +[settings] +# ensures '{{ }}' in files is not picked up as template +# but means we have to manually set any file that is template +default_target_type = "symbolic" + [helpers] # BASE: A base system. Sets up a nice xdg (zsh) shell environment, utility scripts and @@ -36,7 +41,6 @@ ssh = "~" [terminal.files] "terminal/.config/vifm" = "~/.config/vifm" -"terminal/.config/vifm/vifmrc" = { target = "~/.config/vifm/vifmrc", type = "symbolic" } terminal = "~" [linux] @@ -74,13 +78,11 @@ social = "~" [writing.files] "writing/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" } "writing/jrnl/config" = "~/.config" -"writing/papis/config/papis/papistui.yaml" = { target = "~/.config/papis/papistui.yaml", type = "symbolic" } "writing/papis/config" = "~/.config" "writing/sioyek/config/sioyek/prefs_user.config" = { target = "~/.config/sioyek/prefs_user.config", type = "template", prepend = "# TEMPLATED BY DOTTER\n" } "writing/sioyek/config" = "~/.config" "writing/zathura/config" = "~/.config" "writing/zk/config" = "~/.config" -"writing/zk/config/sh/alias.d/zk.sh" = { target = "~/.config/sh/alias.d/zk.sh", type = "symbolic" } "writing/pandoc/local" = "~/.local" writing = "~" From 91b523dac5d9c359142b6eb090cecc8f501de197 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 21 Sep 2025 09:21:29 +0200 Subject: [PATCH 11/12] sh: Get llm credentials from dotter --- sh/.config/sh/env.d/llm-api.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sh/.config/sh/env.d/llm-api.sh diff --git a/sh/.config/sh/env.d/llm-api.sh b/sh/.config/sh/env.d/llm-api.sh new file mode 100644 index 0000000..63f8784 --- /dev/null +++ b/sh/.config/sh/env.d/llm-api.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env sh +# API keys for LLM providers +# +# 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}} From 0986892dcee7a3bd09233c6aaeb2d38d1dcab5ef Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 21 Sep 2025 10:07:24 +0200 Subject: [PATCH 12/12] goimapnotify: Add dotter templating Fixed quotes for yaml file with new dotter templating. --- office/.config/goimapnotify/goimapnotify.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/office/.config/goimapnotify/goimapnotify.yaml b/office/.config/goimapnotify/goimapnotify.yaml index c014443..32ca462 100644 --- a/office/.config/goimapnotify/goimapnotify.yaml +++ b/office/.config/goimapnotify/goimapnotify.yaml @@ -1,10 +1,12 @@ configurations: - - host: imap.example.com + - host: "{{#if mail_personal_host}}{{mail_personal_host}}{{else}}imap.example.com{{/if}}" port: 993 tls: true tlsOptions: starttls: false + usernameCMD: "{{#if mail_personal_username_cmd}}{{mail_personal_username_cmd}}{{/if}}" + passwordCMD: "{{#if mail_personal_password_cmd}}{{mail_personal_password_cmd}}{{/if}}" boxes: - mailbox: INBOX - onNewMail: neomutt-syncmail purelymail-inbox + onNewMail: neomutt-syncmail personal-inbox onNewMailPost: 'notify-send "Incoming mail"'