citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit e1fd63ea27937b81e09e8bdb7ad8627e458263a9
parent 28243dbdb0e1f212779a876c33038968585e74db
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 28 Jan 2024 12:44:18 -0800

various dotfile updates

Diffstat:
Mbin/btc-txs | 6+++++-
Mbin/sendmail-bg | 12++++++------
Mbin/switch-term-themes | 2+-
Mdotfiles/.bashrc | 2+-
Mdotfiles/.config/neomutt/neomuttrc | 19++++++++++++-------
Mdotfiles/.config/nvim/init.vim | 5+++--
Mdotfiles/.config/qutebrowser/autoconfig.yml | 4++--
Mdotfiles/.config/qutebrowser/config.py | 7+++++--
Mdotfiles/.git-template | 1-
Mdotfiles/.gitconfig | 10++++++++++
Mdotfiles/.mailcap | 3++-
Mdotfiles/.todo/config | 2+-
Mdotfiles/commands | 4++--
Mdotfiles/rssfeeds | 2--
Mnix-config/machines/monad/default.nix | 2+-
15 files changed, 51 insertions(+), 30 deletions(-)

diff --git a/bin/btc-txs b/bin/btc-txs @@ -1,4 +1,8 @@ #!/usr/bin/env bash set -eou pipefail btc-txs-raw | - datefmt --after $(date +%s -d 2009-01-01) --before $(date +%s -d 2030-01-01) '%F' +tac | +datefmt --after $(date +%s -d 2009-01-01) --before $(date +%s -d 2030-01-01) '%F' | +ct | +zebra | +less -S diff --git a/bin/sendmail-bg b/bin/sendmail-bg @@ -3,16 +3,16 @@ export EMAIL_CUSTOM_CONN_TEST=/home/jb55/bin/email-conn-test export EMAIL_CONN_TEST=c -src="$1" +file="$1" shift -file=$(mktemp) -from_email=$(<"$src" grep '^From:' | sed -n 's,.*<\([^>]\+\)>.*,\1,p') -from_email=${from_email:-"jb55@jb55.com"} +#from_email=$(<"$file" grep '^From:' | sed -n 's,.*<\([^>]\+\)>.*,\1,p') +#from_email=${from_email:-"jb55@jb55.com"} -<"$src" /home/jb55/bin/hashcash-mail "$from_email" > "$file" +#<"$file" /home/jb55/bin/hashcash-mail "$from_email" > "$file2" # pass all params to msmtpq & redirect output +notmuch insert +inbox < "$file" output=$(<"$file" msmtpq "$@" 2> /tmp/msmtp.err) echo "$output" >> /tmp/msmtp.log @@ -23,7 +23,7 @@ then fi fi -rm -f "$src" "$file" +rm -f "$file" "$file2" # always succeed, even on connection/mail failure # we'll simply queue the mail in our outbox diff --git a/bin/switch-term-themes b/bin/switch-term-themes @@ -1,5 +1,5 @@ #! /usr/bin/env nix-shell -#! nix-shell -i python -p python +#! nix-shell -i python3 -p python3 import os import sys diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc @@ -31,7 +31,7 @@ export PS0='\033[0m' export HISTSIZE=50000 #export HISTCONTROL=ignoredups # ... and ignore same sucessive entries. -export HISTCONTROL=ignoreboth +export HISTCONTROL=ignoreboth:erasedups # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. diff --git a/dotfiles/.config/neomutt/neomuttrc b/dotfiles/.config/neomutt/neomuttrc @@ -1,6 +1,6 @@ set realname='William Casarin' set nm_default_uri="notmuch:///home/jb55/mail/personal" -set sendmail="/home/jb55/bin/sendmail" +set sendmail="/home/jb55/bin/sendmail-mutt" set virtual_spoolfile=yes set folder="/home/jb55/mail/personal" set wait_key=no @@ -33,20 +33,23 @@ virtual-mailboxes \ "damus-prs" "notmuch://?query=query:damusp" \ "damus-issues" "notmuch://?query=query:damusi" -macro index,pager a "<modify-labels-then-hide>-unread -inbox<enter>" +macro index,pager a "<modify-labels>-unread -inbox<enter>" macro index,pager i "<modify-labels>+inbox<enter>" -macro index,pager A "<create-alias>" "Create alias" -macro index,pager F "<modify-labels-then-hide>+filed" "File message" +macro index,pager F "<modify-labels>+filed<enter>" "File message" macro index,pager + "<modify-labels>+" -macro index,pager S "<modify-labels-then-hide>+spam -unread -inbox<enter>" -macro index c "<change-vfolder>?" "Change to vfolder overview" +macro index,pager S "<modify-labels>+spam -unread -inbox<enter>" +macro index C "<collapse-all>" "Collapse all threads" +macro index c "<collapse-thread>" "Collapse thread" +macro index T "<tag-thread>" "Tag thread" macro index \\\\ "<vfolder-from-query>" "Search mailbox" macro pager p "|delta --paging always<enter>" macro pager d "<next-page>" macro pager u "<previous-page>" macro pager c "|cols|less<enter>" macro pager t "|collapse|less<enter>" -macro attach h "|w3m -dump -T text/html | less<enter>" "View text/html with w3m" + +macro attach o "<save-entry><enter>open %s<enter>" +#macro attach h "|w3m -dump -T text/html | less<enter>" "View text/html with w3m" #macro pager P "|grep patch$ | xargs curl -sL | delta --paging always<enter>" macro pager P ":set pipe_decode=no<enter> | mail-prpatch | delta --paging always" macro pager G ":set pipe_decode=no<enter> | mail-prpatch-insert" @@ -72,4 +75,6 @@ color header brightcyan default '^Subject:' #set uncollapse_jump=yes #set display_filter=~/bin/mutt-local-date +auto_view text/html +alternative_order text/plain text/html source ~/.mail_aliases diff --git a/dotfiles/.config/nvim/init.vim b/dotfiles/.config/nvim/init.vim @@ -11,8 +11,9 @@ set hidden set rnu nu set wrap -hi ColorColumn ctermbg=254 -hi StatusLine ctermbg=254 +hi ColorColumn ctermbg=237 +"hi ColorColumn ctermbg=254 +"hi StatusLine ctermbg=254 map Y y$ diff --git a/dotfiles/.config/qutebrowser/autoconfig.yml b/dotfiles/.config/qutebrowser/autoconfig.yml @@ -6,5 +6,5 @@ config_version: 2 settings: - colors.webpage.darkmode.enabled: - global: true + content.javascript.clipboard: + global: access diff --git a/dotfiles/.config/qutebrowser/config.py b/dotfiles/.config/qutebrowser/config.py @@ -74,6 +74,7 @@ config.bind('<Ctrl-e>', 'edit-text') config.bind('e', 'open-editor') config.bind('co', 'tab-only') config.bind('gl', 'tab-move +') +config.bind('E', 'tab-focus last') config.bind('gh', 'tab-move -') # Remove fixed, sticky elements from pages. @@ -90,11 +91,13 @@ config.set('downloads.position', 'bottom') config.set('tabs.select_on_remove', 'last-used') config.set('url.default_page', 'about:blank') +#config.set('colors.webpage.darkmode.enabled', True) +#config.set('colors.webpage.preferred_color_scheme', 'light') config.set('url.searchengines', { - #'DEFAULT': 'https://google.com/search?q={}', - 'DEFAULT': 'http://duckduckgo.com/?q={}', + 'DEFAULT': 'https://google.com/search?q={}', + #'DEFAULT': 'http://duckduckgo.com/?q={}', 'star': 'https://github.com/stars?utf8=%E2%9C%93&q={}', 'so': 'https://google.com/search?q=site:stackoverflow.com {}', 'gl': 'http://www.google.com/search?q={}&btnI=Im+Feeling+Lucky', diff --git a/dotfiles/.git-template b/dotfiles/.git-template @@ -1,3 +1,2 @@ - Signed-off-by: William Casarin <jb55@jb55.com> diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig @@ -11,6 +11,7 @@ pager = delta --max-line-length=4096 --file-style=box --paging=always [sendemail] smtpServer=/home/jb55/bin/sendmail + ccCmd = git-contacts [url "git@github.com:"] insteadOf = gh: [url "git@git.sr.ht:~"] @@ -32,6 +33,7 @@ [gui] recentrepo = /Users/jb55/src/js/titania [alias] + dft = difftool s = show a = add ap = add -p @@ -103,6 +105,14 @@ helper = !gh auth git-credential [init] defaultBranch = master +[difftool "difftastic"] + cmd = difft "$LOCAL" "$REMOTE" +[difftool] + prompt = false +[pager] + difftool = true +[diff] + tool = difftastic [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f diff --git a/dotfiles/.mailcap b/dotfiles/.mailcap @@ -1,4 +1,5 @@ -text/html; open %s; nametemplate=%s.html +text/html; open %s; nametemplate=%s.html; needsterminal +text/html; w3m -T text/html; copiousoutput #text/html; w3m -dump '%s'; copiousoutput text/csv; pcsv %s image/*; open %s diff --git a/dotfiles/.todo/config b/dotfiles/.todo/config @@ -1,5 +1,5 @@ export TODO_DIR="${TODO_DIR:-"$HOME/docs/todo"}" -export TODO_FILE="${TODO_FILE:-TODO_DIR/todo.txt}" +export TODO_FILE="${TODO_FILE:-$TODO_DIR/todo.txt}" export DONE_FILE="$TODO_DIR/done.txt" export REPORT_FILE="$TODO_DIR/report.txt" diff --git a/dotfiles/commands b/dotfiles/commands @@ -1,6 +1,6 @@ aci app > cal > interactive echo pcal interactive acl app > cal > list echo pcal list -afb app > feeds > blogs fuzz-rss "grep @blog" +afb app > feeds > blogs fuzz-rss "grep @blog | grep -v @busy" afe app > edit feeds echo edit ~/dotfiles/rssfeeds aff app > feeds fuzz-rss "grep -v @busy" afp app > feeds > podcasts fuzz-rss "grep @pod" @@ -19,7 +19,7 @@ cdpr cd project root echo cd $(project-root) ce compile error fuzz-compile-error cR compile repeat error fuzz-compile-repeat-error cr compile repeat fuzz-compile-repeat -cs compile show build echo cat .build-result +cs compile show build echo less .build-result dsa docs->stripe->api ~/docs/stripe/jumpapi dsg docs->stripe->go fuzzdoc ~/docs/stripe/go-v72.txt '^type ' dgt docs->go->testing fuzzdoc ~/docs/godoc/testing.txt '^func ' diff --git a/dotfiles/rssfeeds b/dotfiles/rssfeeds @@ -2,12 +2,10 @@ bitcoinmagazine @yt https://bitcointv.com/feeds/videos.xml?videoChannelId=13 blackpenredpen @yt https://www.youtube.com/feeds/videos.xml?channel_id=UC_SvYP0k05UKiJ_2ndB02IA brian-keating @yt https://www.youtube.com/feeds/videos.xml?channel_id=UCmXH_moPhfkqCk6S3b9RWuw -brownstone @blog,@busy https://brownstone.org/feed/ citadeldispatch @yt https://bitcointv.com/feeds/videos.xml?videoChannelId=2 clownworldtoday @blog https://benkaufman.substack.com/feed codyslab @yt https://www.youtube.com/feeds/videos.xml?channel_id=UCu6mSoMNzHQiBIOCkHUa2Aw commaai @yt https://www.youtube.com/feeds/videos.xml?channel_id=UCwgKmJM4ZJQRJ-U5NjvR2dg -darkhorse @pod https://feeds.buzzsprout.com/424075.rss drewdevault @blog https://drewdevault.com/blog/index.xml hackernews @busy https://news.ycombinator.com/rss inferencereview @blog https://inference-review.com/feeds/rss diff --git a/nix-config/machines/monad/default.nix b/nix-config/machines/monad/default.nix @@ -198,7 +198,7 @@ in startAt = "Mon..Fri *-*-* 17:00:00"; }; - virtualisation.docker.enable = if extra.is-minimal then false else true; + #virtualisation.docker.enable = if extra.is-minimal then false else true; boot.kernelPatches = [ #{ # pci acs hack, not really safe or a good idea