added opencode
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Agent Guidelines: Aerc Configuration Repository
|
||||
|
||||
This repository contains the configuration and customization for `aerc`, a terminal-based email client. It is optimized for a workflow involving `notmuch` for indexing, `mbsync` for synchronization, and `abook` for address management.
|
||||
|
||||
## 1. Build, Lint, and Test Commands
|
||||
|
||||
### Sync and Maintenance
|
||||
- **Global Sync**: Run `mailsync` (bound to `u` in `aerc`) to perform:
|
||||
1. `mbsync -a` (Mail synchronization)
|
||||
2. `notmuch new` for all account databases (Indexing)
|
||||
3. `notmuch-abook-sync` (Address book population)
|
||||
- **Manual Sync**: Run individual commands if needed for specific accounts:
|
||||
`NOTMUCH_CONFIG=~/Mail/phil/.notmuch-config notmuch new`
|
||||
|
||||
### Linting
|
||||
- **Permissions**: `accounts.conf` must be `0600`.
|
||||
- **Dependencies**: `w3m`, `bat`, `yazi`, `notmuch`, `abook`, `pass`, `isync`.
|
||||
|
||||
### Testing
|
||||
- **Filters**:
|
||||
```bash
|
||||
cat email.html | w3m -T text/html -dump
|
||||
```
|
||||
- **Address Book Query**:
|
||||
```bash
|
||||
abook --mutt-query "search term"
|
||||
```
|
||||
|
||||
## 2. Code Style Guidelines
|
||||
|
||||
### Aerc Configuration
|
||||
- **Notmuch URI**: Use the absolute triple-slash format: `source = notmuch:///home/liph/Mail/account_name`.
|
||||
- **Credentials**: Use `pass` via `outgoing-cred-cmd = pass show mail/account_email`.
|
||||
- **Sidebar**: Use separate `notmuch` databases per account directory for isolation.
|
||||
|
||||
### Keybindings
|
||||
- **Leader**: `,` (comma).
|
||||
- **Contacts**: `,ab` opens `abook` in a terminal.
|
||||
- **Picker**: `yazi` is the default for attachments (`file-picker-cmd`).
|
||||
|
||||
### Neovim integration (`after/ftplugin/mail.lua`)
|
||||
- **Completion**: Triggered by `Tab` on header lines using `abook --mutt-query`.
|
||||
- **Fzf**: Triggered by `Ctrl+f` for interactive contact selection.
|
||||
@@ -1,53 +1,33 @@
|
||||
[phil_live]
|
||||
source = imaps://phil%40liphlink.xyz:Fqi5UAyr46e69fG@mail.liphlink.xyz:993
|
||||
outgoing = smtp://phil%40liphlink.xyz:Fqi5UAyr46e69fG@mail.liphlink.xyz:587
|
||||
default = INBOX
|
||||
[phil]
|
||||
source = notmuch:///home/liph/Mail/phil
|
||||
query-map = ~/.config/aerc/notmuch-queries.conf
|
||||
outgoing = smtp://phil%40liphlink.xyz@mail.liphlink.xyz:587
|
||||
outgoing-cred-cmd = pass show mail/phil@liphlink.xyz
|
||||
from = Phil <phil@liphlink.xyz>
|
||||
default = Inbox
|
||||
copy-to = Sent
|
||||
archive = Archive
|
||||
postpone = Drafts
|
||||
folders-sort = INBOX,Draftr,Sent,Archive,Spam,Trash
|
||||
aliases = pw@liphlink.xyz,p.waibel@liphlink.xyz,philipp.waibel@liphlink.xyz
|
||||
|
||||
# [phil_notmuch]
|
||||
# source = notmuch://~/Mail/phil
|
||||
# query-map = ~/.config/aerc/notmuch-queries.conf
|
||||
# # outgoing = smtp://phil%40liphlink.xyz@mail.liphlink.xyz:587
|
||||
# # outgoing-cred-cmd = pass show mail/phil@liphlink.xyz
|
||||
# from = Phil <phil@liphlink.xyz>
|
||||
# default = Inbox
|
||||
# # copy-to = Sent
|
||||
# postpone = Drafts
|
||||
# aliases = pw@liphlink.xyz,p.waibel@liphlink.xyz,philipp.waibel@liphlink.xyz
|
||||
|
||||
[spam_live]
|
||||
source = imaps://spam%40liphlink.xyz:ANZ6JJPBiB7k1c7k@mail.liphlink.xyz:993
|
||||
outgoing = smtp://spam%40liphlink.xyz:ANZ6JJPBiB7k1c7k@mail.liphlink.xyz:587
|
||||
default = INBOX
|
||||
[spam]
|
||||
source = notmuch:///home/liph/Mail/spam
|
||||
query-map = ~/.config/aerc/notmuch-queries.conf
|
||||
outgoing = smtp://spam%40liphlink.xyz@mail.liphlink.xyz:587
|
||||
outgoing-cred-cmd = pass show mail/spam@liphlink.xyz
|
||||
from = Liph <spam@liphlink.xyz>
|
||||
copy-to = Sent
|
||||
archive = Archive
|
||||
postpone = Drafts
|
||||
folders-sort = INBOX,Drafts,Sent,Archive,Spam,Trash
|
||||
default = Inbox
|
||||
aliases = blue@liphlink.xyz,red@liphlink.xyz
|
||||
|
||||
# [spam_notmuch]
|
||||
# source = notmuch://~/Mail/spam
|
||||
# query-map = ~/.config/aerc/notmuch-queries.conf
|
||||
# outgoing = smtp://spam%40liphlink.xyz@mail.liphlink.xyz:587
|
||||
# outgoing-cred-cmd = pass show mail/spam@liphlink.xyz
|
||||
# from = Liph <spam@liphlink.xyz>
|
||||
# copy-to = Sent
|
||||
# default = Inbox
|
||||
# aliases = blue@liphlink.xyz,red@liphlink.xyz
|
||||
|
||||
[proton]
|
||||
source = imap+insecure://liiph%40protonmail.com:YF37rs63oirevVIs-mq0tg@127.0.0.1:1143
|
||||
outgoing = smtp+insecure://liiph%40protonmail.com:YF37rs63oirevVIs-mq0tg@127.0.0.1:1025
|
||||
default = INBOX
|
||||
from = Liph <liiph@proton.me>
|
||||
copy-to = Sent
|
||||
archive = Archive
|
||||
postpone = Drafts
|
||||
folders-sort = INBOX,Drafts,Sent,Archive,Spam,Trash
|
||||
aliases = liiph@proton.me,liiph@pm.me,ph.waibel@proton.me,ph.waibel@pm.me
|
||||
source = notmuch:///home/liph/Mail/proton
|
||||
query-map = ~/.config/aerc/notmuch-queries.conf
|
||||
outgoing = smtp+insecure://liiph%40protonmail.com@127.0.0.1:1025
|
||||
outgoing-cred-cmd = pass show mail/liiph@protonmail.com
|
||||
default = INBOX
|
||||
from = Liph <liiph@proton.me>
|
||||
copy-to = Sent
|
||||
archive = Archive
|
||||
default = Inbox
|
||||
postpone = Drafts
|
||||
aliases = liiph@proton.me,liiph@pm.me,ph.waibel@proton.me,ph.waibel@pm.me
|
||||
|
||||
@@ -27,15 +27,9 @@ index-format=notmuch://~/.local/share/mail
|
||||
# the user home dir. When redirecting aerc's output to a file using > shell
|
||||
# redirection, this setting is ignored and log messages are printed to stdout.
|
||||
#
|
||||
#log-file=
|
||||
log-file=~/.local/share/aerc/aerc.log
|
||||
log-level=debug
|
||||
|
||||
# Only log messages above the specified level to log-file. Supported levels
|
||||
# are: trace, debug, info, warn and error. When redirecting aerc's output to
|
||||
# a file using > shell redirection, this setting is ignored and the log level
|
||||
# is forced to trace.
|
||||
#
|
||||
# Default: info
|
||||
#log-level=info
|
||||
|
||||
# Disable IPC entirely. Don't run commands (including mailto:... and mbox:...)
|
||||
# in an existing aerc instance, and don't start an IPC server to allow
|
||||
@@ -100,6 +94,7 @@ index-format=notmuch://~/.local/share/mail
|
||||
border-char-vertical="│"
|
||||
border-char-horizontal="─"
|
||||
styleset-name="gruvbox-dark"
|
||||
threading-enabled=true
|
||||
|
||||
#
|
||||
# Each name in index-columns must have a corresponding column-$name setting.
|
||||
@@ -581,7 +576,7 @@ pager= bat --style=plain --paging=always
|
||||
# html-unsafe-images=false
|
||||
# html-filter=dante
|
||||
image/*=chafa -f kitty -s ${width}x${height}
|
||||
text/html= ~/.local/bin/mailhtml2md
|
||||
text/html=w3m -T text/html -dump
|
||||
application/pdf=zathura
|
||||
video/*=mpv
|
||||
header-layout=From,To,Subject,Date
|
||||
@@ -705,7 +700,7 @@ edit-headers=true
|
||||
# standard output, one file per line. If it is present, then aerc does not
|
||||
# capture the standard output and instead reads the files from the temporary
|
||||
# file which should have the same format.
|
||||
#file-picker-cmd=
|
||||
#file-picker-cmd=/home/liph/.local/bin/yazi-picker %f
|
||||
|
||||
#
|
||||
# Allow to address yourself when replying
|
||||
@@ -790,9 +785,7 @@ text/plain=colorize
|
||||
text/calendar=calendar
|
||||
message/delivery-status=colorize
|
||||
message/rfc822=colorize
|
||||
#text/html=pandoc -f html -t plain | colorize
|
||||
text/html=! html
|
||||
text/html=! w3m -T text/html -I UTF-8
|
||||
text/html=w3m -T text/html -dump
|
||||
#text/*=bat -fP --file-name="$AERC_FILENAME"
|
||||
#application/x-sh=bat -fP -l sh
|
||||
#image/*=catimg -w $(tput cols) -
|
||||
@@ -826,12 +819,11 @@ text/html=! w3m -T text/html -I UTF-8
|
||||
# text/html=surf -dfgms
|
||||
# text/plain=gvim {} +125
|
||||
# message/rfc822=thunderbird
|
||||
|
||||
[hooks]
|
||||
# text/html=librewolf
|
||||
text/html=w3m
|
||||
x-scheme-handler/http=librewolf
|
||||
x-scheme-handler/https=librewolf
|
||||
|
||||
[hooks]
|
||||
#
|
||||
# Hooks are triggered whenever the associated event occurs.
|
||||
|
||||
|
||||
+67
-165
@@ -1,12 +1,12 @@
|
||||
# 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
|
||||
|
||||
# GLOBAL Navigation & Contacts
|
||||
( = :term abook<Enter>
|
||||
,c = :term abook<Enter>
|
||||
,ab = :term abook<Enter>
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-PgUp> = :prev-tab<Enter>
|
||||
<C-n> = :next-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>
|
||||
@@ -14,27 +14,25 @@
|
||||
<C-z> = :suspend<Enter>
|
||||
|
||||
[messages]
|
||||
# Switch between Adresses
|
||||
,1 = :change-tab phil_live<Enter>
|
||||
# ,2 = :change-tab phil_notmuch<Enter>
|
||||
,2 = :change-tab spam_live<Enter>
|
||||
# ,4 = :change-tab spam_notmuch<Enter>
|
||||
# Sync
|
||||
u = :term /home/liph/.local/bin/mailsync<Enter>
|
||||
|
||||
# Navigation
|
||||
j = :next<Enter>
|
||||
k = :prev<Enter>
|
||||
<Down> = :next<Enter>
|
||||
<Up> = :prev<Enter>
|
||||
g = :select 0<Enter>
|
||||
G = :select -1<Enter>
|
||||
J = :next-folder<Enter>
|
||||
K = :prev-folder<Enter>
|
||||
|
||||
# Accounts
|
||||
,1 = :change-tab phil<Enter>
|
||||
,2 = :change-tab spam<Enter>
|
||||
,3 = :change-tab proton<Enter>
|
||||
|
||||
# d = :modify -inbox +deleted<Enter>
|
||||
# a = :modify -inbox<Enter>
|
||||
# # Delete = tag as deleted and remove from inbox
|
||||
# d = :tag +deleted -inbox<Enter>
|
||||
|
||||
# # Archive = remove from inbox
|
||||
# a = :tag -inbox +archive<Enter>
|
||||
# d = :move Trash<Enter>
|
||||
# a = :archive flat<Enter>
|
||||
|
||||
# Expunge = actually delete (run this in Trash folder)
|
||||
D = :prompt 'Really delete? ' 'tag +deleted'
|
||||
|
||||
# Quick folder navigation
|
||||
# Folders
|
||||
,i = :cf Inbox<Enter>
|
||||
,u = :cf Unread<Enter>
|
||||
,n = :cf Newsletters<Enter>
|
||||
@@ -44,134 +42,61 @@ D = :prompt 'Really delete? ' 'tag +deleted'
|
||||
,d = :cf Development<Enter>
|
||||
,x = :cf Spam<Enter>
|
||||
,tr = :cf Trash<Enter>
|
||||
,a = :cf All Mail<Enter>
|
||||
|
||||
# o1 = :compose -H "From: Liph \<liiph@proton.me\>"<enter>
|
||||
# o2 = :compose -H "From: Liph \<liiph@protonmail.com\>"<enter>
|
||||
# o3 = :compose -H "From: Liph \<liiph@pm.me\>"<enter>
|
||||
# o4 = :compose -H "From: Philipp Waibel \<ph.waibel@proton.me\>"<enter>
|
||||
# o5 = :compose -H "From: P.Waibel \<ph.waibel@pm.me\>"<enter>
|
||||
|
||||
# Delete and sync
|
||||
#d = :modify-labels +trash -inbox<Enter>:archive flat<Enter>
|
||||
d = :modify-labels +deleted -inbox<Enter>
|
||||
#d = :modify-labels +deleted -inbox<Enter>
|
||||
#d = :move Trash<Enter>:exec mbsync -a && notmuch new<Enter>
|
||||
# Permanently delete (Shift+D)
|
||||
#D = :prompt 'Really delete?' :move Trash<Enter>
|
||||
|
||||
#B = :compose -H "From: waibel ph.waibel@proton.me"<Enter>
|
||||
# for url handling
|
||||
|
||||
j = :next<Enter>
|
||||
<Down> = :next<Enter>
|
||||
<C-d> = :next 50%<Enter>
|
||||
<C-f> = :next 100%<Enter>
|
||||
<PgDn> = :next 100%<Enter>
|
||||
|
||||
k = :prev<Enter>
|
||||
<Up> = :prev<Enter>
|
||||
<C-u> = :prev 50%<Enter>
|
||||
<C-b> = :prev 100%<Enter>
|
||||
<PgUp> = :prev 100%<Enter>
|
||||
g = :select 0<Enter>
|
||||
G = :select -1<Enter>
|
||||
|
||||
J = :next-folder<Enter>
|
||||
<C-Down> = :next-folder<Enter>
|
||||
K = :prev-folder<Enter>
|
||||
<C-Up> = :prev-folder<Enter>
|
||||
H = :collapse-folder<Enter>
|
||||
<C-Left> = :collapse-folder<Enter>
|
||||
L = :expand-folder<Enter>
|
||||
<C-Right> = :expand-folder<Enter>
|
||||
|
||||
v = :mark -t<Enter>
|
||||
<Space> = :mark -t<Enter>:next<Enter>
|
||||
V = :mark -v<Enter>
|
||||
|
||||
T = :toggle-threads<Enter>
|
||||
zc = :fold<Enter>
|
||||
zo = :unfold<Enter>
|
||||
za = :fold -t<Enter>
|
||||
zM = :fold -a<Enter>
|
||||
zR = :unfold -a<Enter>
|
||||
<tab> = :fold -t<Enter>
|
||||
|
||||
zz = :align center<Enter>
|
||||
zt = :align top<Enter>
|
||||
zb = :align bottom<Enter>
|
||||
,aa = :cf All Mail<Enter>
|
||||
|
||||
# Actions
|
||||
<Enter> = :view<Enter>
|
||||
#d = :choose -o y 'Really delete this message' delete-message<Enter>
|
||||
#D = :delete<Enter>
|
||||
d = :modify-labels +deleted -inbox<Enter>
|
||||
a = :archive flat<Enter>
|
||||
A = :unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>
|
||||
|
||||
C = :compose<Enter>
|
||||
m = :compose<Enter>
|
||||
|
||||
b = :bounce<space>
|
||||
|
||||
rr = :reply -a<Enter>
|
||||
rq = :reply -aq<Enter>
|
||||
Rr = :reply<Enter>
|
||||
Rq = :reply -q<Enter>
|
||||
|
||||
c = :cf<space>
|
||||
$ = :term<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>
|
||||
|
||||
pl = :patch list<Enter>
|
||||
pa = :patch apply <Tab>
|
||||
pd = :patch drop <Tab>
|
||||
pb = :patch rebase<Enter>
|
||||
pt = :patch term<Enter>
|
||||
ps = :patch switch <Tab>
|
||||
# Threads
|
||||
T = :toggle-threads<Enter>
|
||||
zc = :fold<Enter>
|
||||
zo = :unfold<Enter>
|
||||
za = :fold -t<Enter>
|
||||
|
||||
[messages:folder=Drafts]
|
||||
<Enter> = :recall<Enter>
|
||||
|
||||
[view]
|
||||
|
||||
,l = :pipe urlscan<Enter>
|
||||
|
||||
/ = :toggle-key-passthrough<Enter>/
|
||||
q = :close<Enter>
|
||||
O = :open<Enter>
|
||||
x = :close<Enter>
|
||||
o = :open<Enter>
|
||||
O = :open<Enter>
|
||||
s = :save<Enter>
|
||||
S = :save<space>
|
||||
,sa = :save -a<Enter>
|
||||
| = :pipe<space>
|
||||
D = :delete<Enter>
|
||||
A = :archive flat<Enter>
|
||||
|
||||
<C-l> = :open-link <space>
|
||||
|
||||
f = :forward<Enter>
|
||||
rr = :reply -a<Enter>
|
||||
rq = :reply -aq<Enter>
|
||||
Rr = :reply<Enter>
|
||||
Rq = :reply -q<Enter>
|
||||
|
||||
H = :toggle-headers<Enter>
|
||||
<C-k> = :prev-part<Enter>
|
||||
<C-Up> = :prev-part<Enter>
|
||||
,l = :pipe urlscan<Enter>
|
||||
|
||||
# Attachment handling
|
||||
n = :next-part<Enter>
|
||||
p = :prev-part<Enter>
|
||||
<C-j> = :next-part<Enter>
|
||||
<C-Down> = :next-part<Enter>
|
||||
J = :next<Enter>
|
||||
<C-Right> = :next<Enter>
|
||||
K = :prev<Enter>
|
||||
<C-Left> = :prev<Enter>
|
||||
<C-k> = :prev-part<Enter>
|
||||
s = :pipe -m /home/liph/.local/bin/save-attachment<Enter>
|
||||
S = :save<space>
|
||||
o = :open<Enter>
|
||||
O = :open<Enter>
|
||||
,sa = :save -a<Enter>
|
||||
|
||||
[view::passthrough]
|
||||
$noinherit = true
|
||||
@@ -179,65 +104,42 @@ $ex = <C-x>
|
||||
<Esc> = :toggle-key-passthrough<Enter>
|
||||
|
||||
[compose]
|
||||
# Keybindings used when the embedded terminal is not selected in the compose
|
||||
# view
|
||||
# General compose view
|
||||
$noinherit = true
|
||||
$ex = <C-x>
|
||||
$complete = <C-o>
|
||||
<C-k> = :prev-field<Enter>
|
||||
<C-Up> = :prev-field<Enter>
|
||||
<C-j> = :next-field<Enter>
|
||||
<C-Down> = :next-field<Enter>
|
||||
<A-p> = :switch-account -p<Enter>
|
||||
<C-Left> = :switch-account -p<Enter>
|
||||
<A-n> = :switch-account -n<Enter>
|
||||
<C-Right> = :switch-account -n<Enter>
|
||||
<C-k> = :attach<space>
|
||||
<C-a> = :attach<space>
|
||||
<F4> = :attach<space>
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-n> = :next-tab<Enter>
|
||||
<tab> = :next-field<Enter>
|
||||
<backtab> = :prev-field<Enter>
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-PgUp> = :prev-tab<Enter>
|
||||
<C-n> = :next-tab<Enter>
|
||||
<C-PgDn> = :next-tab<Enter>
|
||||
|
||||
[compose::editor]
|
||||
# Keybindings used when the embedded terminal is selected in the compose view
|
||||
# While focused in the text editor (nvim)
|
||||
$noinherit = true
|
||||
$ex = <C-x>
|
||||
<C-k> = :prev-field<Enter>
|
||||
<C-Up> = :prev-field<Enter>
|
||||
<C-j> = :next-field<Enter>
|
||||
<C-Down> = :next-field<Enter>
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-PgUp> = :prev-tab<Enter>
|
||||
<C-n> = :next-tab<Enter>
|
||||
<C-PgDn> = :next-tab<Enter>
|
||||
|
||||
|
||||
# Insert signatures with Ctrl+s + number
|
||||
<C-s>1 = :exec cat /home/liph/.config/aerc/sigs/formal.txt<Enter>
|
||||
<C-s>2 = :read ~/.config/aerc/sigs/formal_eng.txt<Enter>
|
||||
<C-s>3 = :read ~/.config/aerc/sigs/liph.txt<Enter>
|
||||
<C-s>4 = :read ~/.config/aerc/sigs/phil.txt<Enter>
|
||||
<C-k> = :attach<space>
|
||||
<C-a> = :attach<space>
|
||||
<F4> = :attach<space>
|
||||
|
||||
[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<space> # Add attachment
|
||||
d = :detach<space> # Remove attachment
|
||||
# After exiting the editor
|
||||
y = :send<Enter>
|
||||
n = :abort<Enter>
|
||||
v = :preview<Enter>
|
||||
p = :postpone<Enter>
|
||||
q = :choose -o d discard abort -o p postpone postpone<Enter>
|
||||
e = :edit<Enter>
|
||||
a = :attach<space>
|
||||
A = :attach<space>
|
||||
<C-k> = :attach<space>
|
||||
<C-a> = :attach<space>
|
||||
d = :detach<space>
|
||||
|
||||
[terminal]
|
||||
$noinherit = true
|
||||
$ex = <C-x>
|
||||
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-n> = :next-tab<Enter>
|
||||
<C-PgUp> = :prev-tab<Enter>
|
||||
<C-PgDn> = :next-tab<Enter>
|
||||
|
||||
Reference in New Issue
Block a user