Compare commits

..

No commits in common. "main" and "dirty" have entirely different histories.
main ... dirty

30 changed files with 669 additions and 2145 deletions

2
.gitignore vendored
View file

@ -1,6 +1,4 @@
.AppleDouble
.netrwhist
vim/.vim/plugged
vim/.vim/autoload
zsh/.zsh/cache
gnupg

View file

@ -10,10 +10,10 @@
# Set some defaults.
export EDITOR="nvim"
export VISUAL="nvim"
export EDITOR="emacsclient -t"
export VISUAL="emacsclient -c -a emacs"
export ALTERNATE_EDITOR=""
export PATH=".:~/bin:~/.local/bin:/usr/games:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
export PATH=".:~/bin:~/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
export LSCOLORS="ExGxBxDxCxEgEdxbxgxcxd"
# include doom in path if it exists
@ -38,6 +38,9 @@ if [[ -x `which apt-get >/dev/null 2>&1` ]]; then
HAS_APT=1
fi
if [[ -x `which gnome-shell >/dev/null 2>&1` ]]; then
HAS_GNOME=1
fi
# _
# _ __ _ __ ___ _ __ ___ _ __ | |_
@ -155,20 +158,26 @@ alias ..="cd .."
# empty the screen (or use C-l)
alias c="clear"
# why wouldn't you want human readable sizes?
alias df="df -h"
# get outta here!
alias e="exit"
# ls is eza
alias ls="eza"
# grep shortie
alias g="grep --color=auto -i "
# shorter ls
alias l="eza"
alias l="ls -G --color"
# list files with details
alias ll="eza -lh --git"
alias ll="ls -lh --color"
# list all files.
alias la="eza -lha --git"
alias la="ls -alh --color"
# List directories.
alias ld="ls --color -Gd */"
# add some color to grep.
alias grep="grep --color=auto"
@ -188,6 +197,17 @@ alias pc='python -ic "from __future__ import division; from math import *"'
# Start nano with line numbering no wrapping and autoindenting
alias nano='nano -ciw '
# shortcut for tmux command
alias tm="tmux new-session -A -s main"
# emacsclient
alias ec="emacsclient -n -c -a emacs"
if [[ HAS_GNOME ]]; then
alias nosleep="gnome-session-inhibit --inhibit idle sleep infinity"
fi
# __ _ _
# / _|_ _ _ __ ___| |_(_) ___ _ __ ___
@ -232,15 +252,9 @@ function archive-and-encrypt {
}
# shortcut for tmux command
function tm {
tmux new-session -A -s main -x $(tput cols) -y $(tput lines)
}
# run mosh and tmux to a specific host
function mt {
mosh $1 -- tmux new-session -A -s main -x $(tput cols) -y $(tput lines)
mosh $1 -- tmux new-session -A -s main
}
@ -264,15 +278,6 @@ if [ -d /usr/share/doc/fzf/examples ]; then
fi
fi
# Arch
if [ -d /usr/share/fzf ]; then
source /usr/share/fzf/key-bindings.bash
if [ -f /usr/share/fzf/completion.bash ]; then
source /usr/share/fzf/completion.bash
fi
fi
# MacOS
if [ -d /opt/homebrew/opt/fzf/shell ]; then
source /opt/homebrew/opt/fzf/shell/key-bindings.bash

View file

@ -31,7 +31,7 @@
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
@ -40,7 +40,7 @@
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
neotree ; a project drawer, like NERDTree for vim
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
@ -173,7 +173,7 @@
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
yaml ; JSON, but readable
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email

View file

@ -1,15 +0,0 @@
configurations:
-
host: mail.amd.im
port: 993
tls: true
tlsOptions:
rejectUnauthorized: false
starttls: false
username: andrew@amd.im
passwordCMD: 'pass show email/amd.im/andrew'
boxes:
-
mailbox: INBOX
onNewMail: "/home/amd/.local/bin/sync_email.sh"
#onNewMailPost: 'notify-send --app-name neomutt --icon=mail-message-new --category=email.arrived "New email in inbox."'

View file

@ -1,23 +0,0 @@
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

@ -1,17 +0,0 @@
[addressbooks]
[[Nextcloud]]
path = ~/.local/share/vdirsyncer/nextcloud_contacts_local/contacts/
[general]
debug = no
default_action = list
editor = nvim
merge_editor = delta
[contact table]
display = first_name
show_nicknames = no
sort = last_name
[vcard]
search_in_source_files = yes

View file

@ -1,2 +0,0 @@
text/html; w3m -sixel -o confirm_qq=false -o auto_image=TRUE -o display_image=1 -T text/html %s; nametemplate=%s.html; needsterminal
text/html; w3m -I %{charset} -T text/html -dump; copiousoutput;

View file

@ -1,121 +0,0 @@
### Me
set from = "andrew@amd.im"
set realname = "Andrew Davidson"
#### Remote Connectivity
set imap_user = "andrew@amd.im"
set imap_pass = "`pass show email/amd.im/andrew`"
set smtp_url = "smtps://$imap_user:$imap_pass@mail.amd.im:465"
#### Remote email store
#### use this instead of the local storage section below.
#set folder = "imaps://mail.amd.im"
#set ssl_starttls = no
#set ssl_force_tls = yes
#set imap_check_subscribed # automatically check subscribed folders
#mailboxes +INBOX
#### Local storage of emails
#### Use this with isync/mbsync to store email locally
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
macro index,pager <F6> "<shell-escape>~/.local/bin/sync_email.sh<enter>" "sync email"
macro index \\\\ "<vfolder-from-query>" "Search mail"
### Mailbox Locations
set spoolfile = "+INBOX"
set record = "=Sent"
set postponed = "=Drafts"
set trash = "=Trash"
### Local Folders
set header_cache = "~/.cache/neomutt/headers"
set message_cachedir = "~/.cache/neomutt/messages"
### Use `khard` for contact lookup
### To query an address use ctrl-t
set query_command= "khard email --parsable --search-in-source-files %s"
bind editor <Tab> complete-query
### Local Settings
set mail_check = 60 # check for mail every XX seconds
set imap_keepalive = 900 # does what it says on the tin, in seconds
set edit_headers # include headers when editing a message
set fast_reply # dont ask too many questions when replying
set pager_stop # stop scrolling pager at end of message
set pager_context # add 3 lines of context to message pager
set forward_quote # include message when forwarding
set forward_decode # decode message when forwarding
set reply_to # follow Reply to: header
set reverse_name # reply as the recipient address
set include # include message in replies as default
set text_flowed=yes # correct indentation
unset sig_dashes # no dashes before signature
set charset = "utf-8" # prefer utf-8
set send_charset = "utf-8:iso-8859-1:us-ascii" # send in utf-8
set editor = "nvim" # we know we want to edit in nvim
unset confirmappend # don't double check when moving messages
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 editor = nvim # use neovim, of course.
save-hook . '=Archive' # Save to archive folder by default
set wait_key=no # dont wait for a key after a command runs (like sync)
set delete=yes # automatically expunge when syncing
### Multipart handling
set mailcap_path = "~/.config/neomutt/mailcap"
auto_view text/html
alternative_order text/plain text/enriched text/html
macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt-mail.html<enter><shell-escape>librewolf ~/.cache/mutt-mail.html<enter>"
### Message threading
set sort_re # changes method by which threads are sorted
set sort = reverse-threads # sort by threads
set sort_aux = last-date-received # secondarily sory by most recent message received in thread
### Sidebar
set sidebar_visible # show the sidebar
set sidebar_short_path # simplify paths in sidebar
unset sidebar_folder_indent # indent mailboxes in sidebar
set sidebar_format = "%B %* [%?N?%N/?%S]" # what should the sidebar display
set sidebar_sort_method = path
set mail_check_stats # check mailbox statistics for sidebar view
### Colorscheme
source "./nord.theme"
### Keybindings
bind index j next-entry
bind index k previous-entry
bind pager j next-line
bind pager k previous-line
bind index,pager <F5> sync-mailbox
bind attach,index,pager \CD next-page
bind attach,index,pager \CU previous-page
bind pager g top
bind pager G bottom
bind attach,index g first-entry
bind attach,index G last-entry
bind index,pager \CJ sidebar-next
bind index,pager \CK sidebar-prev
bind index,pager \CE sidebar-open
bind index,pager B sidebar-toggle-visible

View file

@ -1,28 +0,0 @@
color normal default default # default colours
color index brightblue default ~N # new messages
color index red default ~F # flagged messages
color index blue default ~T # tagged messages
color index brightred default ~D # deleted messages
color body brightgreen default (https?|ftp)://[\-\.+,/%~_:?&=\#a-zA-Z0-9]+ # links
color body brightgreen default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email-addresses
color attachment magenta default # attachments
color signature brightwhite default # sigs
color search brightred black # highlight results
color indicator black cyan # currently highlighted message
color error red default # error messages
color status white brightblack # status line
color tree white default # thread tree arrows
color tilde cyan default # blank line padding
color hdrdefault brightblue default # default headers
color header cyan default "^From:"
color header cyan default "^Subject:"
color quoted cyan default # quote colours
color quoted1 brightcyan default
color quoted2 blue default
color quoted3 green default
color quoted4 yellow default
color quoted5 red default

View file

@ -1,14 +0,0 @@
[Unit]
Description=start goimapnotify
# OnFailure=status-email-user@%n.service
After=local-fs.target
After=network.target
[Service]
Restart=always
RestartSec=300
ExecStart=/usr/bin/goimapnotify
[Install]
WantedBy=default.target

View file

@ -1,19 +0,0 @@
[general]
status_path = "~/.local/share/vdirsyncer/status"
[pair nextcloud_contacts]
a = "nextcloud_contacts_local"
b = "nextcloud_contacts_remote"
collections = ["from a", "from b"]
metadata = ["displayname"]
[storage nextcloud_contacts_local]
type = "filesystem"
path = "~/.local/share/vdirsyncer/nextcloud_contacts_local/"
fileext = ".vcf"
[storage nextcloud_contacts_remote]
type = "carddav"
url = "https://cloud.andr3w.net/remote.php/dav/addressbooks/users/andrew/"
username = "andrew"
password.fetch = ["command", "pass", "nextcloud"]

View file

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

View file

@ -1,18 +0,0 @@
[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=.uidvalidity;.mbsyncstate
[search]
exclude_tags=deleted;spam;
[maildir]
synchronize_flags=true

View file

@ -1,2 +0,0 @@
[General]
LastCacheCheck=@Variant(\0\0\0\xe\0%\x8c\x41)

View file

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FCParameters>
<FCParamGroup Name="Root">
<FCParamGroup Name="Modules">
<FCParamGroup Name="Assembly">
<FCText Name="HelpIndex">Assembly/Help/index.html</FCText>
<FCText Name="WorkBenchName">Assembly</FCText>
<FCText Name="WorkBenchModule">AssemblyWorkbench.py</FCText>
</FCParamGroup>
<FCParamGroup Name="Path">
<FCText Name="HelpIndex">Path/Help/index.html</FCText>
<FCText Name="WorkBenchName">CAM</FCText>
<FCText Name="WorkBenchModule">PathWorkbench.py</FCText>
</FCParamGroup>
<FCParamGroup Name="Spreadsheet">
<FCText Name="HelpIndex">Spreadsheet/Help/index.html</FCText>
<FCText Name="WorkBenchName">Spreadsheet</FCText>
<FCText Name="WorkBenchModule">SpreadsheetWorkbench.py</FCText>
</FCParamGroup>
<FCParamGroup Name="Start">
<FCText Name="WorkBenchName">Start</FCText>
<FCText Name="WorkBenchModule">Start.py</FCText>
</FCParamGroup>
</FCParamGroup>
</FCParamGroup>
</FCParameters>

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
[user]
name = Andrew Davidson
email = andrew@amd.im
signingkey = /home/amd/.ssh/id_ed25519.pub
email = andrew@andr3w.net
signingkey = /home/amd/.ssh/id_rsa
[color]
ui = auto
@ -57,6 +57,5 @@
[init]
defaultBranch = main
[gpg]
format = ssh

View file

@ -1 +1,3 @@
pinentry-program /usr/bin/pinentry-kwallet
pinentry-program /usr/bin/pinentry
default-cache-ttl 600
max-cache-ttl 7200

View file

@ -0,0 +1,32 @@
[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

@ -0,0 +1,20 @@
[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

@ -0,0 +1,94 @@
[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=

6
mutt/.mailcap Normal file
View file

@ -0,0 +1,6 @@
text/html; firefox %s && sleep 5; test=test -n "$DISPLAY";
text/html; links -html-numbered-links 1 -dump %s; nametemplate=%s.html; copiousoutput
#text/html; w3m -I %{charset} -T text/html; copiousoutput;
text/plain; vim %s;

172
mutt/.muttrc Normal file
View file

@ -0,0 +1,172 @@
# Paths ---------------------
set folder = ~/.maildir
set alias_file = ~/.mutt/alias
set header_cache = ~/.mutt/cache/headers
set message_cachedir = ~/.mutt/cache/bodies
set certificate_file = ~/.mutt/certificates
set mailcap_path = ~/.mailcap
set tmpdir = ~/.mutt/temp
set signature = ~/.sig
# Options -------------------
set wait_key = no
set mbox_type = Maildir
set timeout = 3
set mail_check = 0
unset move
set delete
unset confirmappend
set quit
unset mark_old
set pipe_decode
set thorough_search
set charset = utf-8
set send_charset = utf-8
# Sidebar -------------------
set sidebar_visible = yes
set sidebar_width = 20
set sidebar_short_path = yes
set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"
color sidebar_new color221 color233
# Header Options ------------
ignore *
unignore from: reply-to: to: cc: bcc: date: subject: x-Spam-score: list-id:
unhdr_order *
hdr_order from: reply-to: to: cc: bcc: date: subject: x-Spam-score: list-id:
# Setup IMAP -------------------
set my_pass=`~/bin/pw.sh IMAP_PASSWORD`
set my_user=`~/bin/pw.sh IMAP_USERNAME`
set folder = "imaps://$my_user:$my_pass@imap.fastmail.com:993"
set spoolfile= "+INBOX"
set record = +Sent
set postponed = +Drafts
set trash = +Trash
set imap_check_subscribed = yes
bind index G imap-fetch-mail
# Setup SMTP -------------------
set smtp_url=smtp://$my_user:$my_pass@smtp.fastmail.com:587
set ssl_force_tls=yes
#set ssl_starttls=yes
# Mailboxes -----------------
# source ~/.mutt/mailboxes
# Index ---------------------
set date_format = "%m/%d"
set index_format = "[%Z] %D %-20.20F %s"
set sort = threads
set sort_aux = reverse-last-date-received
set uncollapse_jump
set sort_re
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
bind index R group-reply
bind index <tab> sync-mailbox
bind index <space> collapse-thread
macro index / "<enter-command>unset wait_key<enter><shell-escape>mutt-notmuch-py<enter><change-folder-readonly>~/.cache/mutt_results<enter>" \
"search mail (using notmuch)"
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
macro index,pager o "<shell-escape>$HOME/bin/fastmail.sh<enter>" "run offlineimap to sync fastmail"
macro index,pager C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index,pager s "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
bind index D purge-message
bind index,pager <down> sidebar-next
bind index,pager <up> sidebar-prev
bind index,pager <right> sidebar-open
# Pager View -----------------
set pager_index_lines = 10 # number of index lines to show
set pager_context = 3 # number of context lines to show
set pager_stop # don't go to next message automatically
set menu_scroll # scroll in menus
set tilde # show tildes like in vim
unset markers # no ugly plus signs
set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
alternative_order text/plain text/enriched text/html
# Pager Bindings -------------
bind pager k previous-line
bind pager j next-line
bind pager R group-reply
# View attachments properly.
bind attach <return> view-mailcap
auto_view text/html
macro pager \Cu "|urlview<enter>" "call urlview to open links"
# Setup Identity
set realname="Andrew Davidson"
set from="andrew@amdavidson.com"
# Setup VIM for editing headers
set edit_headers
set editor="nvim +':set textwidth=0' +':set wrapmargin=0' +':set wrap' +':set linebreak' +':set nolist' +/^$ ++1"
# Contacts shortcuts
set query_command = "khard email --parsable --search-in-source-files '%s'"
bind editor <Tab> complete-query
bind editor ^T complete
macro index,pager A "<pipe-message>khard add-email<return>" "add the sender email address to khard"
# Some neat stuff.
set fcc_attach=yes # Forward attachments.
unset reply_self # Don't include myself when replying to all
set smart_wrap # wrap text smartly and don't clip words.
set forward_format='Fwd: %s' # make the forwarding subject line look more like other clients.
set forward_decode
set reply_to
set reverse_name
set include
set forward_quote
# Crypto stuff
set pgp_decode_command="gpg --pinentry-mode loopback %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --pinentry-mode loopback --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --pinentry-mode loopback --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --pinentry-mode loopback --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --pinentry-mode loopback --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="/usr/lib/neomutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x49CF25C6 -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/neomutt/pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x49CF25C6 -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
# Sign emails as me.
set pgp_sign_as=0x49CF25C6
# Automatically sign emails.
#set crypt_autosign
# Reply to signed emails with a signed email.
set crypt_replysign
# Encrypt and sign replies to signed emails.
# set crypt_replyencrypt=yes
# Encrypt and sign replies to encrypted emails.
set crypt_replysignencrypted=yes
# Time out of GPG after xx seconds.
set pgp_timeout=28800
# Automatically verify signatures.
set crypt_verify_sig=yes

View file

@ -0,0 +1,5 @@
#! /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

@ -0,0 +1,37 @@
[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

24
offlineimap/bin/fastmail.sh Executable file
View file

@ -0,0 +1,24 @@
#!/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

5
scripts/bin/pw.sh Executable file
View file

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

View file

@ -1,6 +1,6 @@
# More logical (to me) split keys.
bind - split-window -v -l 38%
bind | split-window -h -l 38%
bind - split-window -p 38 -v
bind | split-window -p 38 -h
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

File diff suppressed because it is too large Load diff

View file

@ -1,19 +1,21 @@
" ==================== Plugins ====================
call plug#begin()
" Airline
Plug 'bling/vim-airline'
" Git integration
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
" Nord Theme
Plug 'nordtheme/vim'
" Gruvbox theme
"Plug 'morhetz/gruvbox'
" Airline
Plug 'bling/vim-airline'
let g:airline_powerline_fonts = 1
" Nord Theme
Plug 'shaunsingh/nord.nvim'
" Commenter
" Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdcommenter'
" Sayonara
Plug 'mhinz/vim-sayonara', { 'on': 'Sayonara' }
@ -21,6 +23,8 @@ Plug 'mhinz/vim-sayonara', { 'on': 'Sayonara' }
" Go support for Vim
"Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
" Python Stuff
" Plug 'davidhalter/jedi-vim'
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
@ -29,35 +33,28 @@ else
Plug 'roxma/vim-hug-neovim-rpc'
endif
let g:deoplete#enable_at_startup = 1
" Python source for deoplete
Plug 'zchee/deoplete-jedi', { 'for': 'python' }
" Vim source for deoplete
Plug 'Shougo/neco-vim', { 'for': 'vim' }
" Python-related plugins
"{{ Python-related plugins
" Python completion, goto definition etc.
" Plug 'davidhalter/jedi-vim', { 'for': 'python' }
Plug 'davidhalter/jedi-vim', { 'for': 'python' }
" Python syntax highlighting and more
" Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
" Python auto formatting
" Plug 'psf/black', { 'branch': 'stable' }
" autocmd BufWritePre *.py execute ':Black'
Plug 'psf/black', { 'branch': 'stable' }
autocmd BufWritePre *.py execute ':Black'
" Smart Line Numbers
Plug 'myusuf3/numbers.vim'
Plug 'tpope/vim-commentary'
" Ale
Plug 'dense-analysis/ale'
" OpenSCAD Support
Plug 'salkin-mada/openscad.nvim'
call plug#end()
" ==================== Vim Settings ====================
@ -145,7 +142,7 @@ endif " has("autocmd")
"let g:dracula_colorterm = 0
"silent! colorscheme dracula
set background=dark
silent! colorscheme nord
silent! colorscheme gruvbox
" ==================== Code Folding ====================
@ -192,9 +189,6 @@ map q: :q
" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %
" Disable F1 key
nmap <F1> <nop>
" Go shortcuts just for .go files
autocmd FileType go nmap <leader>r <Plug>(go-run)
autocmd FileType go nmap <leader>t <Plug>(go-test)