Merge remote-tracking branch 'origin/main' into uzi

This commit is contained in:
Andrew Davidson 2024-09-13 20:17:56 -07:00
commit bf7095c40d
Signed by: amd
SSH key fingerprint: SHA256:6jDSUhitcXG0Nrh/g8Gy8ZJdsZ5LzPJlaGmGKUGfP5k
15 changed files with 75 additions and 231 deletions

View file

@ -260,7 +260,7 @@ function tm {
# run mosh and tmux to a specific host # run mosh and tmux to a specific host
function mt { function mt {
mosh $1 -- tm mosh $1 -- tmux new-session -A -s main -x $(tput cols) -y $(tput lines)
} }

23
email/.config/isyncrc Normal file
View file

@ -0,0 +1,23 @@
IMAPStore andrew@amd.im-remote
Host mail.amd.im
Port 993
User andrew@amd.im
PassCmd "pass email/amd.im/andrew"
TLSType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
MaildirStore andrew@amd.im-local
Subfolders Verbatim
Path ~/.local/share/email/andrew@amd.im/
INBOX ~/.local/share/email/andrew@amd.im/INBOX
Flatten .
Channel andrew@amd.im
Far :andrew@amd.im-remote:
Near :andrew@amd.im-local:
Pattern * !dovecot/sieve
SyncState *
Create Both
Expunge Both
MaxMessages 0

View file

@ -0,0 +1,2 @@
text/html; $BROWSER %s
text/html; w3m -I %{charset} -T text/html -dump; copiousoutput;

View file

@ -3,16 +3,22 @@ set from = "andrew@amd.im"
set realname = "Andrew Davidson" set realname = "Andrew Davidson"
### Connectivity #### Connectivity
set imap_user = "andrew@bigfootstoybox.com" #set imap_user = "andrew@amd.im"
set imap_pass = "`pass show email/bigfootstoybox.com/andrew`" #set imap_pass = "`pass show email/amd.im/andrew`"
set folder = "imaps://mail.amd.im" #set folder = "imaps://mail.amd.im"
set smtp_url = "smtps://$imap_user:$imap_pass@mail.amd.im:465" #set smtp_url = "smtps://$imap_user:$imap_pass@mail.amd.im:465"
set ssl_starttls = no #set ssl_starttls = no
set ssl_force_tls = yes #set ssl_force_tls = yes
set imap_check_subscribed # automatically check subscribed folders #set imap_check_subscribed # automatically check subscribed folders
mailboxes +INBOX #mailboxes +INBOX
set mbox_type = Maildir
set folder = "~/.local/share/email/andrew@amd.im"
mailboxes =INBOX =Archive =Sent =Trash =Spam
mailboxes =Automatic.DMARC
mailboxes =Lists.Money\ Stuff =Lists.NYT =Lists.SWICG =Lists.Evergreen\ MBA
mailboxes =NeedleandFoot
### Mailbox Locations ### Mailbox Locations
set spoolfile = "+INBOX" set spoolfile = "+INBOX"
@ -22,9 +28,10 @@ set trash = "=Trash"
### Local Folders ### Local Folders
set header_cache = "~/.cache/mutt/headers" set header_cache = "~/.cache/neomutt/headers"
set message_cachedir = "~/.cache/mutt/messages" set message_cachedir = "~/.cache/neomutt/messages"
macro index $ "<shell-escape>mbsync andrew@amd.im<enter>notmuch new<enter>" "sync email"
macro index \\\\ "<vfolder-from-query>" "Search mail"
### Local Settings ### Local Settings
set mail_check = 60 # check for mail every XX seconds set mail_check = 60 # check for mail every XX seconds
@ -48,6 +55,12 @@ set reverse_alias # if an alias is set for a contact, use that
set pager_index_lines = 10 # Shows 10 lines of index when pager is active set pager_index_lines = 10 # Shows 10 lines of index when pager is active
### Multipart handling
set mailcap_path = "~/.config/neomutt/mailcap"
auto_view text/html
alternative_order text/plain text/enriched text/html
### Message threading ### Message threading
set sort_re # changes method by which threads are sorted set sort_re # changes method by which threads are sorted
set sort = reverse-threads # sort by threads set sort = reverse-threads # sort by threads

18
email/.notmuch-config Normal file
View file

@ -0,0 +1,18 @@
[database]
path=/home/amd/.local/share/email/andrew@amd.im/
[user]
name=Andrew Davidson
primary_email=andrew@amd.im
other_email=andrew@amdavidson.com amdavids@calpoly.edu amdavidson@gmail.com
[new]
tags=unread;inbox;
ignore=
[search]
exclude_tags=deleted;spam;
[maildir]
synchronize_flags=true

4
email/bin/sync_email.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
mbsync andrew@amd.im
notmuch new

View file

@ -57,5 +57,6 @@
[init] [init]
defaultBranch = main defaultBranch = main
[gpg] [gpg]
format = ssh format = ssh

View file

@ -1,32 +0,0 @@
[addressbooks]
[[Default]]
path = ~/.contacts/Default
[general]
debug = no
default_action = list
editor = vim
merge_editor = vimdiff
[contact table]
# display names by first or last name: first_name / last_name
display = first_name
# group by address book: yes / no
group_by_addressbook = no
# reverse table ordering: yes / no
reverse = no
# append nicknames to name column: yes / no
show_nicknames = no
# show uid table column: yes / no
show_uids = no
# sort by first or last name: first_name / last_name
sort = last_name
# localize dates: yes / no
localize_dates = yes
[vcard]
# Look into source vcf files to speed up search queries: yes / no
search_in_source_files = no
# skip unparsable vcard files: yes / no
skip_unparsable = no

View file

@ -1,20 +0,0 @@
[general]
status_path = "~/.vdirsyncer/status/"
[pair my_contacts]
a = "my_contacts_local"
b = "my_contacts_remote"
collections = ["from a", "from b"]
[storage my_contacts_local]
type = "filesystem"
path = "~/.contacts/"
fileext = ".vcf"
[storage my_contacts_remote]
type = "carddav"
url = "https://carddav.fastmail.com"
username.fetch = ["command", "~/bin/pw.sh", "CARDDAV_USERNAME"]
password.fetch = ["command", "~/bin/pw.sh", "CARDDAV_PASSWORD"]

View file

@ -1,94 +0,0 @@
[Background]
Color=40,42,54
[BackgroundFaint]
Color=40,42,54
[BackgroundIntense]
Color=40,42,54
[Color0]
Color=189,147,249
[Color0Faint]
Color=189,147,249
[Color0Intense]
Color=189,147,249
[Color1]
Color=255,85,85
[Color1Faint]
Color=255,85,85
[Color1Intense]
Color=255,85,85
[Color2]
Color=80,250,123
[Color2Faint]
Color=80,250,123
[Color2Intense]
Color=80,250,123
[Color3]
Color=255,121,198
[Color3Faint]
Color=255,121,198
[Color3Intense]
Color=255,121,198
[Color4]
Color=139,233,253
[Color4Faint]
Color=139,233,253
[Color4Intense]
Color=139,233,253
[Color5]
Color=241,250,140
[Color5Faint]
Color=241,250,140
[Color5Intense]
Color=241,250,140
[Color6]
Color=98,114,164
[Color6Faint]
Color=98,114,164
[Color6Intense]
Color=98,114,164
[Color7]
Color=68,71,90
[Color7Faint]
Color=68,71,90
[Color7Intense]
Color=68,71,90
[Foreground]
Color=248,248,242
[ForegroundFaint]
Color=248,248,242
[ForegroundIntense]
Color=248,248,242
[General]
Description=Dracula
Opacity=1
Wallpaper=

View file

@ -1,5 +0,0 @@
#! /usr/bin/env python2
from subprocess import check_output
def get_pass():
return check_output("~/bin/pw.sh IMAP_PASSWORD", shell=True).strip("\n")

View file

@ -1,37 +0,0 @@
[general]
accounts = Personal
ui = basic
#ui = blinkenlights
maxsynaccounts = 1
pythonfile = ~/.offlineimap.py
[mbnames]
enabled = yes
filename = ~/.mutt/mailboxes
header = "mailboxes "
peritem = "+%(foldername)s"
sep = " "
footer = "\n"
[Account Personal]
localrepository = Local
remoterepository = Remote
postsynchook = notmuch new
# autorefresh = 1
# quick = 10
[Repository Local]
type = Maildir
localfolders = ~/.maildir
sep = .
restoreatime = no
[Repository Remote]
type = IMAP
remotehost = imap.fastmail.com
remoteuser = andrew@amdavidson.com
remotepasseval = get_pass()
maxconnections = 5
keepalive = 60
# holdconnectionopen = yes

View file

@ -1,24 +0,0 @@
#!/bin/bash
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "OS is linux"
DISTRO=$(. /etc/os-release; echo $NAME)
if [[ "$DISTRO" == "Fedora" ]]; then
echo "Distro is Fedora"
/usr/bin/offlineimap -k Repository_Remote:sslcacertfile=/etc/ssl/certs/ca-bundle.crt -c $HOME/.offlineimaprc_fastmail
elif [[ "$DISTRO" == "Ubuntu" ]]; then
echo "Distro is Ubuntu"
/usr/bin/offlineimap -k Repository_Remote:sslcacertfile=/etc/ssl/certs/ca-certificates.crt -c $HOME/.offlineimaprc_fastmail
elif [[ "$DISTRO" == "Debian GNU/Linux" ]]; then
echo "Distro is Debian"
/usr/bin/offlineimap -k Repository_Remote:sslcacertfile=/etc/ssl/certs/ca-certificates.crt -c $HOME/.offlineimaprc_fastmail
else
echo "Distro is unknown"
/usr/bin/offlineimap -k Repository_Remote:sslcacertfile=/etc/ssl/certs/ca-certificates.crt -c $HOME/.offlineimaprc_fastmail
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "OS is darwin"
/usr/local/bin/offlineimap -k Repository_Remote:sslcacertfile=/usr/local/etc/openssl/cert.pem -c $HOME/.offlineimaprc_fastmail
else
echo "Offlineimap not configured to access Fastmail on $OSTYPE"
fi

View file

@ -1,5 +0,0 @@
#!/bin/bash
source ~/.env
echo ${!1}