From: Ian Kelling Date: Wed, 15 Dec 2021 19:32:05 +0000 (-0500) Subject: various fixes and improvements X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=b9e018cccda7fb22ca9162fd6744f6d04180a60b;p=distro-setup various fixes and improvements --- diff --git a/brc b/brc index 128b6f3..7c89382 100644 --- a/brc +++ b/brc @@ -139,6 +139,8 @@ export INFOPATH=$PATH:/usr/local/info:/usr/info:/usr/local/lib/info:/usr/lib/inf if ! type -p stty >/dev/null; then stty() { :; } fi + + if [[ $- == *i* ]]; then # for readline-complete.el if [[ $LC_INSIDE_EMACS ]]; then @@ -153,6 +155,13 @@ if [[ $- == *i* ]]; then TERM=xterm-256color fi + if [[ $TERM == alacritty && ! -e /usr/share/terminfo/a/alacritty ]]; then + # todo: we should try installing the alacritty terminfo if it is not found + # https://github.com/alacritty/alacritty/issues/2838 + TERM=xterm-256color + fi + + # todo: not sure this works in sakura #stty werase undef #bind "\C-w": kill-region @@ -1158,6 +1167,15 @@ scp() { rsync --inplace "$@" } +randport() { + # available high ports are 1024-65535, + # but lets skip things that are more likely to be in use + python3 <<'EOF' +import secrets +print(secrets.SystemRandom().randrange(10002,65500)) +EOF + } + # reapply bashrc reb() { source ~/.bashrc @@ -1615,7 +1633,11 @@ ssk() { ccomp ssh sl slr sss ssk # plain ssh ssh() { - LC_USEBASHRC=t command ssh "$@" + if [[ $TERM == alacritty ]]; then + TERM=xterm-256color LC_USEBASHRC=t command ssh "$@" + else + LC_USEBASHRC=t command ssh "$@" + fi } diff --git a/brc2 b/brc2 index c59e06a..51e2af5 100644 --- a/brc2 +++ b/brc2 @@ -19,6 +19,7 @@ path-add --ifexists --end /a/work/libremanage path-add --ifexists --end /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools path-add --ifexists --end /a/opt/scancode-toolkit-3.10. + export WCDHOME=/a @@ -41,7 +42,9 @@ source /a/bin/bash_unpublished/source-semi-priv source /a/bin/bash_unpublished/source-state source /a/bin/log-quiet/logq-function - +if [[ -s /a/opt/alacritty/extra/completions/alacritty.bash ]]; then + source /a/opt/alacritty/extra/completions/alacritty.bash +fi # * functions @@ -219,16 +222,21 @@ bum() { if [[ $cur == "$host:/bu/md" ]]; then return 0 else - fusermount -u /bu/mnt + s fusermount -u /bu/mnt fi fi - sshfs $host:/bu/md /bu/mnt + s sshfs bu@$host:/bu/home/md /bu/mnt -o reconnect,ServerAliveInterval=20,ServerAliveCountMax=30 -o allow_other ser start exim4 } bu() { - fusermount -u /bu/mnt + if mountpoint -q /bu/mnt; then + if ! s timeout -s 9 10 fusermount -u /bu/mnt; then + s fusermount -zu /bu/mnt + fi + fi } + eqgo() { enn -M $(exiqgrep -i) } @@ -459,11 +467,11 @@ bkpush() { # no emacs. for running faster. m rsync "$@" $a ${p[@]} /p/c/machine_specific/bk root@bk.b8.nz:/ || ret=$? return $ret } -bkpush() { # no emacs. for running faster. +jepush() { # no emacs. for running faster. p=(/a/bin /a/exe /a/h /a/c /p/c/machine_specific/vps{,.hosts}) a="-ahviSAXPH --specials --devices --delete --relative --exclude-from=/p/c/li-rsync-excludes" ret=0 - m rsync "$@" $a ${p[@]} /p/c/machine_specific/je root@bk.b8.nz:/ || ret=$? + m rsync "$@" $a ${p[@]} /p/c/machine_specific/je root@je.b8.nz:/ || ret=$? return $ret } @@ -1012,6 +1020,63 @@ kff() { # keyboardio firmware flash popd } +wgkey() { + local umask_orig name + if (( $# != 1 )); then + e expected 1 arg >&2 + return 1 + fi + name=$1 + umask_orig=$(umask) + umask 0077 + wg genkey | tee $name-priv.key | wg pubkey > $name-pub.key + umask $umask_orig +} +wghole() { + if (( $# != 2 )); then + e expected 2 arg of hostname, ip suffix >&2 + return 1 + fi + local host ipsuf umask_orig + host=$1 + ipsuf=$2 + umask_orig=$(umask) + mkdir -p /p/c/machine_specific/$host/filesystem/etc/{wireguard,network/interfaces.d} + cd /p/c/machine_specific/$host/filesystem/etc/wireguard + umask 0077 + if [[ ! -e hole-priv.key || ! -e hole-pub.key ]]; then + wg genkey | tee hole-priv.key | wg pubkey > hole-pub.key + fi + cat >wghole.conf < ../network/interfaces.d/wghole </dev/null +} + lom() { @@ -1121,9 +1186,10 @@ myirc() { if [[ ! $1 ]]; then set -- fsf-office fi - local d=/var/lib/znc/moddata/log/iank/freenode + local d1 d2 + d=( /var/lib/znc/moddata/log/iank/{freenode,libera} ) # use * instead of -r since that does sorted order - ssh root@iankelling.org "cd $d/#$1; grep '\&2 + return 1 + fi + + spamdpid=$(systemctl status spamassassin| sed -n '/^ *Main PID:/s/[^0-9]//gp') + spamcpre="nsenter -t $spamdpid -n -m" + s $spamcpre sudo -u Debian-exim spamassassin -t --cf='score PYZOR_CHECK 0' <"$1" +} + # mail related testmail() { @@ -1468,6 +1559,11 @@ mailvpnbash() { eximbash() { m sudo nsenter -t $(pgrep -f "/usr/sbin/exim4 -bd -q30m -C /etc/exim4/my.conf"|h1) -n -m sudo -u $USER -i bash } +spamnn() { + local spamdpid + spamdpid=$(systemctl status spamassassin| sed -n '/^ *Main PID:/s/[^0-9]//gp') + m sudo nsenter -t $spamdpid -n -m sudo -u Debian-exim spamassassin "$@" +} mailnncheck() { local pid ns mailnn diff --git a/btrbk-run b/btrbk-run index d513071..6dda15f 100644 --- a/btrbk-run +++ b/btrbk-run @@ -277,9 +277,14 @@ echo "mountpoints: ${mountpoints[*]}" ##### end command line parsing ######## if [[ $source ]]; then - if [[ $(ssh $source ps --no-headers -o comm 1) == systemd && $(ssh $source systemctl is-active btrbk.service) != inactive ]]; then - echo "$0: error: cron btrbk is running on source. exiting out of caution" - mexit 1 + if [[ $(ssh $source ps --no-headers -o comm 1) == systemd ]]; then + status=$(ssh $source systemctl is-active btrbk.service) || : # normally returns 3 + case $status in + inactive|failed) : ;; + *) + echo "$0: error: cron btrbk is running on source. exiting out of caution" + mexit 1 + esac fi fi @@ -298,7 +303,7 @@ if ! $pull_reexec && [[ $source ]] && $pulla ; then m rsync -ra $source:/usr/local/lib/err /usr/local/lib m scp $source:/a/bin/distro-setup/btrbk-run $tmpf if ! diff -q $tmpf ${BASH_SOURCE[0]}; then - e "found newer version on host $source. reexecing" + e "found different version on host $source. reexecing" install -T $tmpf /usr/local/bin/btrbk-run m /usr/local/bin/btrbk-run --pull-reexec "${orig_args[@]}" mexit 0 @@ -518,7 +523,7 @@ else fi if [[ $ret == 0 ]]; then - /a/exe/mail-backup-clean + m /a/exe/mail-backup-clean fi mexit $ret diff --git a/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/Breaking Things at Work_ The Luddites Are - Gavin Mueller.epub b/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/Breaking Things at Work_ The Luddites Are - Gavin Mueller.epub new file mode 100644 index 0000000..86b9b0e Binary files /dev/null and b/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/Breaking Things at Work_ The Luddites Are - Gavin Mueller.epub differ diff --git a/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/cover.jpg b/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/cover.jpg new file mode 100644 index 0000000..7bb856e Binary files /dev/null and b/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/cover.jpg differ diff --git a/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/metadata.opf b/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/metadata.opf new file mode 100644 index 0000000..49f555d --- /dev/null +++ b/calibre/Gavin Mueller/Breaking Things at Work_ The Luddites Are Right about Why You Hate Your Job (2)/metadata.opf @@ -0,0 +1,19 @@ + + + + 2 + 7f157820-8e49-4a67-890f-a547ee38bf81 + Breaking Things at Work: The Luddites Are Right about Why You Hate Your Job + Gavin Mueller + calibre (4.99.4) [https://calibre-ebook.com] + 0101-01-01T00:00:00+00:00 + Verso + eng + + + + + + + + diff --git a/calibre/John Schember/Quick Start Guide (1)/Quick Start Guide - John Schember.epub b/calibre/John Schember/Quick Start Guide (1)/Quick Start Guide - John Schember.epub new file mode 100644 index 0000000..327a37c Binary files /dev/null and b/calibre/John Schember/Quick Start Guide (1)/Quick Start Guide - John Schember.epub differ diff --git a/calibre/John Schember/Quick Start Guide (1)/cover.jpg b/calibre/John Schember/Quick Start Guide (1)/cover.jpg new file mode 100644 index 0000000..9d5f626 Binary files /dev/null and b/calibre/John Schember/Quick Start Guide (1)/cover.jpg differ diff --git a/calibre/John Schember/Quick Start Guide (1)/metadata.opf b/calibre/John Schember/Quick Start Guide (1)/metadata.opf new file mode 100644 index 0000000..bc331d1 --- /dev/null +++ b/calibre/John Schember/Quick Start Guide (1)/metadata.opf @@ -0,0 +1,19 @@ + + + + 1 + ee544367-de0a-4736-a011-32a5dd2bc161 + Quick Start Guide + John Schember + calibre (4.99.4) [https://calibre-ebook.com] + 0101-01-01T00:00:00+00:00 + calibre Quick Start Guide + eng + + + + + + + + diff --git a/calibre/metadata.db b/calibre/metadata.db new file mode 100644 index 0000000..162a4f6 Binary files /dev/null and b/calibre/metadata.db differ diff --git a/calibre/metadata_db_prefs_backup.json b/calibre/metadata_db_prefs_backup.json new file mode 100644 index 0000000..d9c1026 --- /dev/null +++ b/calibre/metadata_db_prefs_backup.json @@ -0,0 +1,602 @@ +{ + "bools_are_tristate": true, + "user_categories": {}, + "saved_searches": {}, + "grouped_search_terms": {}, + "tag_browser_hidden_categories": [], + "library_view books view state": { + "hidden_columns": [ + "last_modified", + "languages" + ], + "last_modified_injected": true, + "languages_injected": true, + "sort_history": [ + [ + "timestamp", + false + ] + ], + "column_positions": { + "ondevice": 0, + "title": 1, + "authors": 2, + "timestamp": 3, + "size": 4, + "rating": 5, + "tags": 6, + "series": 7, + "publisher": 8, + "pubdate": 9, + "last_modified": 10, + "languages": 11 + }, + "column_sizes": { + "title": 113, + "authors": 100, + "timestamp": 81, + "size": 84, + "rating": 69, + "tags": 56, + "series": 65, + "publisher": 87, + "pubdate": 90, + "last_modified": 0, + "languages": 0 + }, + "column_alignment": { + "size": "center", + "timestamp": "center", + "pubdate": "center" + } + }, + "books view split pane state": { + "hidden_columns": [], + "column_positions": { + "ondevice": 0, + "title": 1, + "authors": 2, + "timestamp": 3, + "size": 4, + "rating": 5, + "tags": 6, + "series": 7, + "publisher": 8, + "pubdate": 9, + "last_modified": 10, + "languages": 11 + }, + "column_sizes": { + "title": 100, + "authors": 100, + "timestamp": 100, + "size": 100, + "rating": 100, + "tags": 100, + "series": 100, + "publisher": 100, + "pubdate": 100, + "last_modified": 100, + "languages": 100 + } + }, + "gui_view_history": [ + [ + 2, + "Breaking Things at Work: The Luddites Are Right about Why You Hate Your Job" + ] + ], + "field_metadata": { + "authors": { + "table": "authors", + "column": "name", + "link_column": "author", + "category_sort": "sort", + "datatype": "text", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": "&", + "list_to_ui": " & " + }, + "kind": "field", + "name": "Authors", + "search_terms": [ + "authors", + "author" + ], + "is_custom": false, + "is_category": true, + "is_csp": false, + "label": "authors", + "display": {}, + "is_editable": true, + "rec_index": 2 + }, + "languages": { + "table": "languages", + "column": "lang_code", + "link_column": "lang_code", + "category_sort": "lang_code", + "datatype": "text", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": ",", + "list_to_ui": ", " + }, + "kind": "field", + "name": "Languages", + "search_terms": [ + "languages", + "language" + ], + "is_custom": false, + "is_category": true, + "is_csp": false, + "label": "languages", + "display": {}, + "is_editable": true, + "rec_index": 21 + }, + "series": { + "table": "series", + "column": "name", + "link_column": "series", + "category_sort": "(title_sort(name))", + "datatype": "series", + "is_multiple": {}, + "kind": "field", + "name": "Series", + "search_terms": [ + "series" + ], + "is_custom": false, + "is_category": true, + "is_csp": false, + "label": "series", + "display": {}, + "is_editable": true, + "rec_index": 8 + }, + "formats": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": ",", + "list_to_ui": ", " + }, + "kind": "field", + "name": "Formats", + "search_terms": [ + "formats", + "format" + ], + "is_custom": false, + "is_category": true, + "is_csp": false, + "label": "formats", + "display": {}, + "is_editable": true, + "rec_index": 13 + }, + "publisher": { + "table": "publishers", + "column": "name", + "link_column": "publisher", + "category_sort": "name", + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": "Publisher", + "search_terms": [ + "publisher" + ], + "is_custom": false, + "is_category": true, + "is_csp": false, + "label": "publisher", + "display": {}, + "is_editable": true, + "rec_index": 9 + }, + "rating": { + "table": "ratings", + "column": "rating", + "link_column": "rating", + "category_sort": "rating", + "datatype": "rating", + "is_multiple": {}, + "kind": "field", + "name": "Rating", + "search_terms": [ + "rating" + ], + "is_custom": false, + "is_category": true, + "is_csp": false, + "label": "rating", + "display": {}, + "is_editable": true, + "rec_index": 5 + }, + "news": { + "table": "news", + "column": "name", + "category_sort": "name", + "datatype": null, + "is_multiple": {}, + "kind": "category", + "name": "News", + "search_terms": [], + "is_custom": false, + "is_category": true, + "is_csp": false, + "label": "news", + "display": {}, + "is_editable": true + }, + "tags": { + "table": "tags", + "column": "name", + "link_column": "tag", + "category_sort": "name", + "datatype": "text", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": ",", + "list_to_ui": ", " + }, + "kind": "field", + "name": "Tags", + "search_terms": [ + "tags", + "tag" + ], + "is_custom": false, + "is_category": true, + "is_csp": false, + "label": "tags", + "display": {}, + "is_editable": true, + "rec_index": 6 + }, + "identifiers": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": ",", + "list_to_ui": ", " + }, + "kind": "field", + "name": "Identifiers", + "search_terms": [ + "identifiers", + "identifier", + "isbn" + ], + "is_custom": false, + "is_category": true, + "is_csp": true, + "label": "identifiers", + "display": {}, + "is_editable": true, + "rec_index": 20 + }, + "author_sort": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": "Author sort", + "search_terms": [ + "author_sort" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "author_sort", + "display": {}, + "is_editable": true, + "rec_index": 12 + }, + "au_map": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": null, + "list_to_ui": null + }, + "kind": "field", + "name": null, + "search_terms": [], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "au_map", + "display": {}, + "is_editable": true, + "rec_index": 18 + }, + "comments": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": "Comments", + "search_terms": [ + "comments", + "comment" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "comments", + "display": {}, + "is_editable": true, + "rec_index": 7 + }, + "cover": { + "table": null, + "column": null, + "datatype": "int", + "is_multiple": {}, + "kind": "field", + "name": "Cover", + "search_terms": [ + "cover" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "cover", + "display": {}, + "is_editable": true, + "rec_index": 17 + }, + "id": { + "table": null, + "column": null, + "datatype": "int", + "is_multiple": {}, + "kind": "field", + "name": null, + "search_terms": [ + "id" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "id", + "display": {}, + "is_editable": true, + "rec_index": 0 + }, + "last_modified": { + "table": null, + "column": null, + "datatype": "datetime", + "is_multiple": {}, + "kind": "field", + "name": "Modified", + "search_terms": [ + "last_modified" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "last_modified", + "display": { + "date_format": "dd MMM yyyy" + }, + "is_editable": true, + "rec_index": 19 + }, + "ondevice": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": "On device", + "search_terms": [ + "ondevice" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "ondevice", + "display": {}, + "is_editable": true, + "rec_index": 22 + }, + "path": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": "Path", + "search_terms": [], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "path", + "display": {}, + "is_editable": true, + "rec_index": 14 + }, + "pubdate": { + "table": null, + "column": null, + "datatype": "datetime", + "is_multiple": {}, + "kind": "field", + "name": "Published", + "search_terms": [ + "pubdate" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "pubdate", + "display": { + "date_format": "MMM yyyy" + }, + "is_editable": true, + "rec_index": 15 + }, + "marked": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": null, + "search_terms": [ + "marked" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "marked", + "display": {}, + "is_editable": true, + "rec_index": 23 + }, + "series_index": { + "table": null, + "column": null, + "datatype": "float", + "is_multiple": {}, + "kind": "field", + "name": null, + "search_terms": [ + "series_index" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "series_index", + "display": {}, + "is_editable": true, + "rec_index": 10 + }, + "series_sort": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": "Series sort", + "search_terms": [ + "series_sort" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "series_sort", + "display": {}, + "is_editable": true, + "rec_index": 24 + }, + "sort": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": "Title sort", + "search_terms": [ + "title_sort" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "sort", + "display": {}, + "is_editable": true, + "rec_index": 11 + }, + "size": { + "table": null, + "column": null, + "datatype": "float", + "is_multiple": {}, + "kind": "field", + "name": "Size", + "search_terms": [ + "size" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "size", + "display": {}, + "is_editable": true, + "rec_index": 4 + }, + "timestamp": { + "table": null, + "column": null, + "datatype": "datetime", + "is_multiple": {}, + "kind": "field", + "name": "Date", + "search_terms": [ + "date" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "timestamp", + "display": { + "date_format": "dd MMM yyyy" + }, + "is_editable": true, + "rec_index": 3 + }, + "title": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": "Title", + "search_terms": [ + "title" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "title", + "display": {}, + "is_editable": true, + "rec_index": 1 + }, + "uuid": { + "table": null, + "column": null, + "datatype": "text", + "is_multiple": {}, + "kind": "field", + "name": null, + "search_terms": [ + "uuid" + ], + "is_custom": false, + "is_category": false, + "is_csp": false, + "label": "uuid", + "display": {}, + "is_editable": true, + "rec_index": 16 + } + } +} \ No newline at end of file diff --git a/check-stale-alerts b/check-stale-alerts index af7d4c7..0bf76ef 100755 --- a/check-stale-alerts +++ b/check-stale-alerts @@ -12,8 +12,10 @@ if [[ $out ]]; then echo HOSTNAME: $HOSTNAME printf "%s\n" "$out" fi -out=$(ssh bk.b8.nz find /m/md/bounces/new /var/local/cron-errors /home/iank/cron-errors /sysd-mail-once-state -type f -ctime +1 ) -if [[ $out ]]; then - echo bk.b8.nz: - printf "%s\n" "$out" -fi +for h in {li,bk,je}.b8.nz; do + out=$(ssh $h find /m/md/bounces/new /var/local/cron-errors /home/iank/cron-errors /sysd-mail-once-state -type f) + if [[ $out ]]; then + echo $h: + printf "%s\n" "$out" + fi +done diff --git a/distro-begin b/distro-begin index b135e05..fa8879e 100755 --- a/distro-begin +++ b/distro-begin @@ -332,13 +332,25 @@ fi # firefox exists but is 2 versions outdated if isdeb && [[ $(debian-codename) == nabia ]]; then sudo dd of=/etc/apt/preferences.d/nabia-focal-missing <<'EOF' -Explanation: libilmbase* are needed for emacs -Package: libilmbase-dev libilmbase24 unrar-free pidgin pidgin-* libpurple0 p7zip mumble lightdm liblightdm-gobject-1-0 mate-desktop-environment mate-desktop-environment-* mate-panel mate-panel-* libmate-* mate-menus gir1.2-matemenu-2.0 mate-session-manager ubuntu-mate-default-settings mate-control-center mate-control-center-common lightdm-gtk-greeter firefox libfdk-aac1 mate-media mate-media-common +Package: unrar-free firefox libfdk-aac1 ansible Pin: release n=focal,o=Ubuntu Pin-Priority: 500 EOF + + # it has a dependency python-paramiko that should be + # python3-paramiko. the backport version is pretty close to the normal + # version, so i just set the pin priority low for the backport and it + # doesnt bother me + sudo dd of=/etc/apt/preferences.d/nabia-backport <<'EOF' +Package: ansible +Pin: release a=nabia-backports +Pin-Priority: -100 +EOF + + fi + # to test when these become available in trisquel, copy the package list, remove the * chars, repaplace PACKAGES below # for x in PACKAGES; do hr; e $x; if [[ $x == *- ]]; then s="^$x"; dpkg -l "$x*" | sed '0,/^+++/d'; else s="^$x\$"; fi; aptitude search "~O Trisquel ~n $s"; done @@ -460,7 +472,7 @@ fi ##### make extra dirs dirs=() -for dir in /mnt/{1,2,3,4,5,6,7,8,9} /nocow/t /bu/md /bu/md/{cur,tmp,new} /bu/mnt; do +for dir in /mnt/{1,2,3,4,5,6,7,8,9} /nocow/t; do [[ -e $dir ]] && continue dirs+=($dir) done diff --git a/distro-end b/distro-end index 0dc9410..4d7ff22 100755 --- a/distro-end +++ b/distro-end @@ -693,6 +693,9 @@ EOF #vpn-mk-client-cert -s "" -n hole 72.14.176.105 # adding to remove system 107, #vpn-mk-client-cert -s "" -n hole -c 10.2.0.107 -b hd8 iankelling.org + # + # for wireguard hole vpn + # wghole # requested from linode via a support ticket. # https://www.linode.com/docs/networking/an-overview-of-ipv6-on-linode/ @@ -711,6 +714,7 @@ EOF # unanswered, tcpdump showed packets getting lost. I tried splitting the # /64, it didn't work but I didn't investigate closely. + m vpn-server-setup -n mail -d -6 2600:3c00:e002:3800::/64 2600:3c00:e002:3800::1/64 sudo tee /etc/openvpn/client-config-mail/mailclient <<'EOF' ifconfig-push 10.8.0.4 255.255.255.0 @@ -1577,6 +1581,7 @@ m /a/bin/buildscripts/go m /a/bin/buildscripts/rust m /a/bin/buildscripts/misc m /a/bin/buildscripts/pithosfly +m /a/bin/buildscripts/alacritty pi-nostart virtinst virt-manager soff libvirtd diff --git a/epanic-clean b/epanic-clean index dfc10f3..514162d 100755 --- a/epanic-clean +++ b/epanic-clean @@ -33,7 +33,7 @@ main() { # seems to randomly be caused by # Starting exim4-base housekeeping, exim4-base.service regex="^[^ ]* 00:00:0.* Failed writing transport results to pipe: Broken pipe$" - grep "$regex" /var/log/exim4/paniclog >> /var/log/exim4/paniclog-archive + grep "$regex" /var/log/exim4/paniclog >> /var/log/exim4/paniclog-archive ||: sed -i "/$regex/d" /var/log/exim4/paniclog while read -r service regex; do @@ -76,7 +76,7 @@ main() { chgrp adm /var/log/exim4/paniclog-archive chmod 664 /var/log/exim4/paniclog-archive fi - grep -E "$regex" /var/log/exim4/paniclog >> /var/log/exim4/paniclog-archive + grep -E "$regex" /var/log/exim4/paniclog >> /var/log/exim4/paniclog-archive ||: sed -ri "/$regex/d" /var/log/exim4/paniclog fi done <<'EOF' diff --git a/filesystem/etc/xdg/kitty/kitty.conf b/filesystem/etc/xdg/kitty/kitty.conf new file mode 100644 index 0000000..ee95ddb --- /dev/null +++ b/filesystem/etc/xdg/kitty/kitty.conf @@ -0,0 +1 @@ +cursor_blink_interval 0 diff --git a/hssh b/hssh index 142e68c..3169694 100755 --- a/hssh +++ b/hssh @@ -8,6 +8,10 @@ dfile=/tmp/hssh-debug-$(id -u) date >>$dfile echo SSH_ORIGINAL_COMMAND: $SSH_ORIGINAL_COMMAND >>$dfile +if [[ ! $SSH_ORIGINAL_COMMAND ]]; then + echo "no SSH_ORIGINAL_COMMAND" >&2 + exit 1 +fi mapfile -t cmds <<'EOF' # btrbk-run diff --git a/i3-sway/common.conf b/i3-sway/common.conf index 5860ee4..6f4b146 100644 --- a/i3-sway/common.conf +++ b/i3-sway/common.conf @@ -81,7 +81,7 @@ bindsym $mod+9 workspace 10 bindsym $mod+Shift+m border toggle bindsym $mod+j exec emacsclient -c -bindsym $mod+k exec konsole +bindsym $mod+k exec alacritty bindsym $mod+l exec dmenu_run # note default is 27% on my system76. not sure if these # keybinds will screw up other laptop brightness keys. diff --git a/i3-sway/i3.conf b/i3-sway/i3.conf index 7b9dff3..d6bbdc2 100644 --- a/i3-sway/i3.conf +++ b/i3-sway/i3.conf @@ -4,13 +4,13 @@ bindsym $mod+Shift+o exec "i3-nagbar -t warning -m 'You pressed the exit shortcu bindsym $mod+Shift+p restart # need this for kde connect -bar { -status_command i3status -# #status_command /usr/local/bin/myi3status -mode hide -# hidden_state hide -# font pango:monospace 14 -} +# bar { +# status_command i3status +# # #status_command /usr/local/bin/myi3status +# mode hide +# # hidden_state hide +# # font pango:monospace 14 +# } exec copyq exec /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd diff --git a/machine_specific/btrbk/filesystem/etc/systemd/system/btrbk.service b/machine_specific/btrbk/filesystem/etc/systemd/system/btrbk.service index 84707c4..2c7dbb9 100644 --- a/machine_specific/btrbk/filesystem/etc/systemd/system/btrbk.service +++ b/machine_specific/btrbk/filesystem/etc/systemd/system/btrbk.service @@ -5,6 +5,6 @@ After=multi-user.target [Service] Type=oneshot ExecStartPre=/a/exe/install-my-scripts -ExecStart=/usr/local/bin/sysd-mail-once btrbk /usr/local/bin/btrbk-run -q --cron +ExecStart=/usr/local/bin/sysd-mail-once btrbk /usr/local/bin/btrbk-run --cron ExecStartPost=/bin/sleep 1 ExecStartPost=/a/exe/install-my-scripts diff --git a/mail-setup b/mail-setup index 4784468..7012669 100755 --- a/mail-setup +++ b/mail-setup @@ -392,6 +392,46 @@ fi # our nostart pi fails to avoid enabling + +# * bu setup + +if ! getent passwd bu; then + useradd -c bu -Um -s /bin/bash -d /bu/home bu + usermod -a -G bu $u + # note, no reason for /bu/mnt to be owned by bu, + # but its just convenient to have it here. + for dir in /bu/mnt /bu/home/md /bu/home/md/{cur,tmp,new}; do + [[ -e $dir ]] && continue + dirs+=($dir) + done + if (( ${#dirs[@]} )); then + mkdir -p "${dirs[@]}" + chown bu:bu "${dirs[@]}" + fi + sed -ri '/Subsystem[[:space:]]+sftp/d' /etc/ssh/sshd_config + + install -d -o bu -g bu /bu/home/.ssh + install -T -o bu -g bu /root/.ssh/h.pub /bu/home/.ssh/authorized_keys + + i /etc/ssh/sshd_config.d/mail.conf <<'EOF' +# for mail chroot restriction +# https://serverfault.com/questions/660160/openssh-difference-between-internal-sftp-and-sftp-server +Subsystem sftp internal-sftp +Match user bu + ChrootDirectory /bu/home + X11Forwarding no + AllowTcpForwarding no + PermitTunnel no + AllowAgentForwarding no + ForceCommand internal-sftp +EOF + if $ir; then + systemctl reload sshd + fi +fi + + + # * user forward file case $HOSTNAME in $MAIL_HOST) @@ -597,7 +637,7 @@ nn_progs=(exim4) if mailhost; then # Note dovecots lmtp doesnt need to be in the same nn to accept delivery. # Its in the nn so remote clients can connect to it. - nn_progs+=(spamassassin dovecot) + nn_progs+=(spamassassin dovecot wg-quick@mail) fi case $HOSTNAME in @@ -803,9 +843,11 @@ cat >/etc/exim4/conf.d/rewrite/34_iank_rewriting <<'EOF' ncsoft@zroe.org graceq2323@gmail.com hE EOF +# old name +rm -fv /etc/exim4/conf.d/retry/37_retry # Retry faster than usual for domains that I send with send-test-forward. -cat >/etc/exim4/conf.d/retry/37_retry <<'EOF' +cat >/etc/exim4/conf.d/retry/17_retry <<'EOF' iankelling.org * F,2d,15m;F,14d,2h amnimal.ninja * F,2d,15m;F,14d,2h expertpathologyreview.com * F,2d,15m;F,14d,2h @@ -856,7 +898,7 @@ DKIM_SELECTOR = li # There could be some circumstance when the # from: isnt our domain, but the envelope sender is # and so still want to sign, but I cant think of any case. -DKIM_DOMAIN = \${lc:\${domain:\$h_from:}} +DKIM_DOMAIN = \${lc:\${domain:\$rh_from:}} # The file is based on the outgoing domain-name in the from-header. # sign if key exists DKIM_PRIVATE_KEY = \${if exists{/etc/exim4/\${dkim_domain}-private.pem} {/etc/exim4/\${dkim_domain}-private.pem}} @@ -972,6 +1014,64 @@ dovecot_lmtp: envelope_to_add EOF +i /etc/exim4/conf.d/transport/30_remote_smtp_vpn <<'EOF' +# same as debians 30_exim4-config_remote_smtp, but +# with interface added at the end. + +remote_smtp_vpn: + debug_print = "T: remote_smtp_vpn for $local_part@$domain" + driver = smtp +.ifndef IGNORE_SMTP_LINE_LENGTH_LIMIT + message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}} +.endif +.ifdef REMOTE_SMTP_HOSTS_AVOID_TLS + hosts_avoid_tls = REMOTE_SMTP_HOSTS_AVOID_TLS +.endif +.ifdef REMOTE_SMTP_HEADERS_REWRITE + headers_rewrite = REMOTE_SMTP_HEADERS_REWRITE +.endif +.ifdef REMOTE_SMTP_RETURN_PATH + return_path = REMOTE_SMTP_RETURN_PATH +.endif +.ifdef REMOTE_SMTP_HELO_DATA + helo_data=REMOTE_SMTP_HELO_DATA +.endif +.ifdef DKIM_DOMAIN +dkim_domain = DKIM_DOMAIN +.endif +.ifdef DKIM_SELECTOR +dkim_selector = DKIM_SELECTOR +.endif +.ifdef DKIM_PRIVATE_KEY +dkim_private_key = DKIM_PRIVATE_KEY +.endif +.ifdef DKIM_CANON +dkim_canon = DKIM_CANON +.endif +.ifdef DKIM_STRICT +dkim_strict = DKIM_STRICT +.endif +.ifdef DKIM_SIGN_HEADERS +dkim_sign_headers = DKIM_SIGN_HEADERS +.endif +.ifdef TLS_DH_MIN_BITS +tls_dh_min_bits = TLS_DH_MIN_BITS +.endif +.ifdef REMOTE_SMTP_TLS_CERTIFICATE +tls_certificate = REMOTE_SMTP_TLS_CERTIFICATE +.endif +.ifdef REMOTE_SMTP_PRIVATEKEY +tls_privatekey = REMOTE_SMTP_PRIVATEKEY +.endif +.ifdef REMOTE_SMTP_HOSTS_REQUIRE_TLS + hosts_require_tls = REMOTE_SMTP_HOSTS_REQUIRE_TLS +.endif +.ifdef REMOTE_SMTP_TRANSPORTS_HEADERS_REMOVE + headers_remove = REMOTE_SMTP_TRANSPORTS_HEADERS_REMOVE +.endif + interface = <; 10.8.0.4 ; 2600:3c00:e002:3800::4 +EOF + i /etc/exim4/conf.d/transport/30_smarthost_dkim <<'EOF' # ian: this is remote_smtp_smarthost plus the dkim parts from remote_smtp @@ -1984,6 +2084,7 @@ fi # ** auth + case $HOSTNAME in $MAIL_HOST) i /etc/exim4/conf.d/auth/29_exim4-config_auth <<'EOF' @@ -2126,7 +2227,7 @@ gnusmarthost: domains = ! +local_domains # send most mail through eggs, helps fsfs sender reputation. # uncomment and optionally move to 188 file to send through my own servers again -# senders = *@gnu.org + senders = *@gnu.org transport = smarthost_dkim route_list = * fencepost.gnu.org::587 byname host_find_failed = ignore @@ -2141,6 +2242,23 @@ EOF # ** $MAIL_HOST) $MAIL_HOST) + i /etc/exim4/conf.d/router/195_dnslookup_vpn <<'EOF' +# copied from /etc/exim4/conf.d/router/200_exim4-config_primary, but +# use vpn transport. lower priority so it overrides the default route. +# Use this in case our vpn fails, we dont send anything without it. +.ifdef DCconfig_internet +dnslookup_vpn: + debug_print = "R: dnslookup for $local_part@$domain" + driver = dnslookup + domains = ! +local_domains + transport = remote_smtp_vpn + same_domain_copy_routing = yes + ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; 192.168.0.0/16 ; 172.16.0.0/12 ; 10.0.0.0/8 ; 169.254.0.0/16 ; 255.255.255.255 ; ::/128 ; ::1/128 ; fc00::/7 ; fe80::/10 ; 100::/64 + no_more +.endif +EOF + + i /etc/exim4/conf.d/transport/30_backup_maildir <>/etc/cron.d/mailtest <$tmpfile; then + e "no message found from: $from" + continue + fi # webmail sends them to cur it seems while read -r file; do if [[ $file -nt $latest ]]; then latest=$file fi - done < <(grep -rlFx "From: $from" $folder/{new,cur} ) + done <$tmpfile if [[ $latest ]]; then + to=$(awk '/^Envelope-to: / {print $2}' $latest) last_sec=$(awk '/^Subject: / {print $4}' $latest) if $slow; then @@ -111,12 +134,18 @@ for folder in ${folders[@]}; do # debugging # e results = ${!results[@]} missing=() - for t in DKIM_SIGNED DKIM_VALID{,_AU,_EF} SPF_HELO_PASS SPF_PASS TVD_SPACE_RATIO RCVD_IN_DNSWL_MED; do + + keys=(DKIM_SIGNED DKIM_VALID{,_AU,_EF} SPF_HELO_PASS SPF_PASS TVD_SPACE_RATIO) + if [[ $to == *@gnu.org && $from == *@gnu.org ]]; then + keys=(ALL_TRUSTED TVD_SPACE_RATIO) + elif [[ $to == *@gnu.org ]]; then + # eggs has RCVD_IN_DNSWL_MED + keys+=(RCVD_IN_DNSWL_MED) + fi + + for t in ${keys[@]}; do if [[ ${results[$t]} ]]; then unset "results[$t]" - elif [[ $t == RCVD_IN_DNSWL_MED && $from == *@je.b8.nz ]]; then - # eggs has RCVD_IN_DNSWL_MED, je.b8.nz doesnt go through there - : elif [[ $t == DKIM_VALID_EF && $from == *@[^.]*.[^.]*.[^.]* ]]; then : # third level domains dont hit this. its because @@ -143,6 +172,7 @@ for folder in ${folders[@]}; do echo mailtest-check: cat $latest: cat $latest echo mailtest-check: end of cat + printf "$(tput setaf 5 2>/dev/null ||:)█$(tput sgr0 2>/dev/null||:)%.0s" $(eval echo "{1..${COLUMNS:-60}}") fi fi # if spamdpid fi # if $slow @@ -151,7 +181,7 @@ for folder in ${folders[@]}; do now=$(date +%s) limit=$(( now - 60 * min_limit )) age_sec=$(( now - last_sec )) - e latest = $((age_sec / 60)):$(( age_sec % 60 )) ago. $latest + e $((age_sec / 60)):$(( age_sec % 60 )) ago. to:$to from:$from $latest if (( last_sec <= limit )); then echo $HOSTNAME mailtest $folder $from $(date -d @$last_sec +'%a %m-%d %H:%M') diff --git a/pkgs b/pkgs index 258d779..1f30b6a 100644 --- a/pkgs +++ b/pkgs @@ -142,6 +142,7 @@ p3=( hunspell i3lock i3status + iftop iotop info inotify-tools diff --git a/subdir_files/.config/alacritty/alacritty.yml b/subdir_files/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..8bce62d --- /dev/null +++ b/subdir_files/.config/alacritty/alacritty.yml @@ -0,0 +1,875 @@ +# defaults are in /a/opt/alacritty/alacritty.yml + +TERM: alacritty + + +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Import additional configuration files +# +# Imports are loaded in order, skipping all missing files, with the importing +# file being loaded last. If a field is already present in a previous import, it +# will be replaced. +# +# All imports must either be absolute paths starting with `/`, or paths relative +# to the user's home directory starting with `~/`. +#import: +# - /path/to/alacritty.yml + +# Any items in the `env` entry below will be added as +# environment variables. Some entries may override variables +# set by alacritty itself. +#env: + # TERM variable + # + # This value is used to set the `$TERM` environment variable for + # each instance of Alacritty. If it is not present, alacritty will + # check the local terminfo database and use `alacritty` if it is + # available, otherwise `xterm-256color` is used. + #TERM: alacritty + +#window: + # Window dimensions (changes require restart) + # + # Number of lines/columns (not pixels) in the terminal. The number of columns + # must be at least `2`, while using a value of `0` for columns and lines will + # fall back to the window manager's recommended size. + #dimensions: + # columns: 0 + # lines: 0 + + # Window position (changes require restart) + # + # Specified in number of pixels. + # If the position is not set, the window manager will handle the placement. + #position: + # x: 0 + # y: 0 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is scaled + # by DPI and the specified value is always added at both opposing sides. + #padding: + # x: 0 + # y: 0 + + # Spread additional padding evenly around the terminal content. + #dynamic_padding: false + + # Window decorations + # + # Values for `decorations`: + # - full: Borders and title bar + # - none: Neither borders nor title bar + # + # Values for `decorations` (macOS only): + # - transparent: Title bar, transparent background and title bar buttons + # - buttonless: Title bar, transparent background and no title bar buttons + #decorations: full + + # Background opacity + # + # Window opacity as a floating point number from `0.0` to `1.0`. + # The value `0.0` is completely transparent and `1.0` is opaque. + #opacity: 1.0 + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + #startup_mode: Windowed + + # Window title + #title: Alacritty + + # Allow terminal applications to change Alacritty's window title. + #dynamic_title: true + + # Window class (Linux/BSD only): + #class: + # Application instance name + #instance: Alacritty + # General application class + #general: Alacritty + + # GTK theme variant (Linux/BSD only) + # + # Override the variant of the GTK theme. Commonly supported values are `dark` + # and `light`. Set this to `None` to use the default theme variant. + #gtk_theme_variant: None + +#scrolling: + # Maximum number of lines in the scrollback buffer. + # Specifying '0' will disable scrolling. + #history: 10000 + + # Scrolling distance multiplier. + #multiplier: 3 + +# Font configuration +#font: + # Normal (roman) font face + #normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Regular + + # Bold font face + #bold: + # Font family + # + # If the bold family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Bold + + # Italic font face + #italic: + # Font family + # + # If the italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Italic + + # Bold italic font face + #bold_italic: + # Font family + # + # If the bold italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Bold Italic + + # Point size + #size: 11.0 + + # Offset is the extra space around each character. `offset.y` can be thought + # of as modifying the line spacing, and `offset.x` as modifying the letter + # spacing. + #offset: + # x: 0 + # y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increasing `x` moves the glyph to the + # right, increasing `y` moves the glyph upward. + #glyph_offset: + # x: 0 + # y: 0 + + # Thin stroke font rendering (macOS only) + # + # Thin strokes are suitable for retina displays, but for non-retina screens + # it is recommended to set `use_thin_strokes` to `false`. + #use_thin_strokes: true + +# If `true`, bold text is drawn using the bright color variants. +#draw_bold_text_with_bright_colors: false + +# Colors (Tomorrow Night) +#colors: + # Default colors + #primary: + # background: '#1d1f21' + # foreground: '#c5c8c6' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not + # present. If the bright foreground color is not set, or + # `draw_bold_text_with_bright_colors` is `false`, the normal foreground + # color will be used. + #dim_foreground: '#828482' + #bright_foreground: '#eaeaea' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #cursor: + # text: CellBackground + # cursor: CellForeground + + # Vi mode cursor colors + # + # Colors for the cursor when the vi mode is active. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #vi_mode_cursor: + # text: CellBackground + # cursor: CellForeground + + # Search colors + # + # Colors used for the search bar and match highlighting. + #search: + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #matches: + # foreground: '#000000' + # background: '#ffffff' + #focused_match: + # foreground: '#ffffff' + # background: '#000000' + + #bar: + # background: '#c5c8c6' + # foreground: '#1d1f21' + + # Keyboard regex hints + #hints: + # First character in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #start: + # foreground: '#1d1f21' + # background: '#e9ff5e' + + # All characters after the first one in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #end: + # foreground: '#e9ff5e' + # background: '#1d1f21' + + # Line indicator + # + # Color used for the indicator displaying the position in history during + # search and vi mode. + # + # By default, these will use the opposing primary color. + #line_indicator: + # foreground: None + # background: None + + # Selection colors + # + # Colors which should be used to draw the selection area. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #selection: + # text: CellBackground + # background: CellForeground + + # Normal colors + #normal: + # black: '#1d1f21' + # red: '#cc6666' + # green: '#b5bd68' + # yellow: '#f0c674' + # blue: '#81a2be' + # magenta: '#b294bb' + # cyan: '#8abeb7' + # white: '#c5c8c6' + + # Bright colors + #bright: + # black: '#666666' + # red: '#d54e53' + # green: '#b9ca4a' + # yellow: '#e7c547' + # blue: '#7aa6da' + # magenta: '#c397d8' + # cyan: '#70c0b1' + # white: '#eaeaea' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '#131415' + # red: '#864343' + # green: '#777c44' + # yellow: '#9e824c' + # blue: '#556a7d' + # magenta: '#75617b' + # cyan: '#5b7d78' + # white: '#828482' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '#ff00ff' }` + # + #indexed_colors: [] + + # Transparent cell backgrounds + # + # Whether or not `window.opacity` applies to all cell backgrounds or only to + # the default background. When set to `true` all cells will be transparent + # regardless of their background color. + #transparent_background_colors: false + +# Bell +# +# The bell is rung every time the BEL control character is received. +#bell: + # Visual Bell Animation + # + # Animation effect for flashing the screen when the visual bell is rung. + # + # Values for `animation`: + # - Ease + # - EaseOut + # - EaseOutSine + # - EaseOutQuad + # - EaseOutCubic + # - EaseOutQuart + # - EaseOutQuint + # - EaseOutExpo + # - EaseOutCirc + # - Linear + #animation: EaseOutExpo + + # Duration of the visual bell flash in milliseconds. A `duration` of `0` will + # disable the visual bell animation. + #duration: 0 + + # Visual bell animation color. + #color: '#ffffff' + + # Bell Command + # + # This program is executed whenever the bell is rung. + # + # When set to `command: None`, no command will be executed. + # + # Example: + # command: + # program: notify-send + # args: ["Hello, World!"] + # + #command: None + +#selection: + # This string contains all characters that are used as separators for + # "semantic words" in Alacritty. + #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + #save_to_clipboard: false + +#cursor: + # Cursor style + #style: + # Cursor shape + # + # Values for `shape`: + # - ▇ Block + # - _ Underline + # - | Beam + #shape: Block + + # Cursor blinking state + # + # Values for `blinking`: + # - Never: Prevent the cursor from ever blinking + # - Off: Disable blinking by default + # - On: Enable blinking by default + # - Always: Force the cursor to always blink + #blinking: Off + + # Vi mode cursor style + # + # If the vi mode cursor style is `None` or not specified, it will fall back to + # the style of the active value of the normal cursor. + # + # See `cursor.style` for available options. + #vi_mode_style: None + + # Cursor blinking interval in milliseconds. + #blink_interval: 750 + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + #unfocused_hollow: true + + # Thickness of the cursor relative to the cell width as floating point number + # from `0.0` to `1.0`. + #thickness: 0.15 + +# Live config reload (changes require restart) +#live_config_reload: true + +# Shell +# +# You can set `shell.program` to the path of your favorite shell, e.g. +# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the +# shell. +# +# Default: +# - (macOS) /bin/bash --login +# - (Linux/BSD) user login shell +# - (Windows) powershell +#shell: +# program: /bin/bash +# args: +# - --login + +# Startup directory +# +# Directory the shell is started in. If this is unset, or `None`, the working +# directory of the parent process will be used. +#working_directory: None + +# Send ESC (\x1b) before characters when alt is pressed. +#alt_send_esc: true + +# Offer IPC using `alacritty msg` (unix only) +#ipc_socket: true + +#mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + #double_click: { threshold: 300 } + #triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + #hide_when_typing: false + +# Regex hints +# +# Terminal hints can be used to find text in the visible part of the terminal +# and pipe it to other applications. +#hints: + # Keys used for the hint labels. + #alphabet: "jfkdls;ahgurieowpq" + + # List with all available hints + # + # Each hint must have a `regex` and either an `action` or a `command` field. + # The fields `mouse`, `binding` and `post_processing` are optional. + # + # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and + # `mouse.mods` accept the same values as they do in the `key_bindings` section. + # + # The `mouse.enabled` field controls if the hint should be underlined while + # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. + # + # If the `post_processing` field is set to `true`, heuristics will be used to + # shorten the match if there are characters likely not to be part of the hint + # (e.g. a trailing `.`). This is most useful for URIs. + # + # Values for `action`: + # - Copy + # Copy the hint's text to the clipboard. + # - Paste + # Paste the hint's text to the terminal or search. + # - Select + # Select the hint's text. + # - MoveViModeCursor + # Move the vi mode cursor to the beginning of the hint. + #enabled: + # - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + # [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + # command: xdg-open + # post_processing: true + # mouse: + # enabled: true + # mods: None + # binding: + # key: U + # mods: Control|Shift + +# Mouse bindings +# +# Mouse bindings are specified as a list of objects, much like the key +# bindings further below. +# +# To trigger mouse bindings when an application running within Alacritty +# captures the mouse, the `Shift` modifier is automatically added as a +# requirement. +# +# Each mouse binding will specify a: +# +# - `mouse`: +# +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# - `action` (see key bindings for actions not exclusive to mouse mode) +# +# - Mouse exclusive actions: +# +# - ExpandSelection +# Expand the selection to the current mouse cursor location. +# +# And optionally: +# +# - `mods` (see key bindings) +#mouse_bindings: +# - { mouse: Right, action: ExpandSelection } +# - { mouse: Middle, mode: ~Vi, action: PasteSelection } + +# Key bindings +# +# Key bindings are specified as a list of objects. For example, this is the +# default paste binding: +# +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Each key binding will specify a: +# +# - `key`: Identifier of the key pressed +# +# - A-Z +# - F1-F24 +# - Key0-Key9 +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. This command will allow you to display the hex scancodes +# for certain keys: +# +# `showkey --scancodes`. +# +# Then exactly one of: +# +# - `chars`: Send a byte sequence to the running application +# +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. To find escape codes for bindings +# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside +# of tmux. Note that applications use terminfo to map escape sequences back +# to keys. It is therefore required to update the terminfo when changing an +# escape sequence. +# +# - `action`: Execute a predefined action +# +# - ToggleViMode +# - SearchForward +# Start searching toward the right of the search origin. +# - SearchBackward +# Start searching toward the left of the search origin. +# - Copy +# - Paste +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollHalfPageUp +# - ScrollHalfPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# Remove the terminal's scrollback history. +# - Hide +# Hide the Alacritty window. +# - Minimize +# Minimize the Alacritty window. +# - Quit +# Quit Alacritty. +# - ToggleFullscreen +# - SpawnNewInstance +# Spawn a new instance of Alacritty. +# - CreateNewWindow +# Create a new Alacritty window from the current process. +# - ClearLogNotice +# Clear Alacritty's UI warning and error notice. +# - ClearSelection +# Remove the active selection. +# - ReceiveChar +# - None +# +# - Vi mode exclusive actions: +# +# - Open +# Perform the action of the first matching hint under the vi mode cursor +# with `mouse.enabled` set to `true`. +# - ToggleNormalSelection +# - ToggleLineSelection +# - ToggleBlockSelection +# - ToggleSemanticSelection +# Toggle semantic selection based on `selection.semantic_escape_chars`. +# +# - Vi mode exclusive cursor motion actions: +# +# - Up +# One line up. +# - Down +# One line down. +# - Left +# One character left. +# - Right +# One character right. +# - First +# First column, or beginning of the line when already at the first column. +# - Last +# Last column, or beginning of the line when already at the last column. +# - FirstOccupied +# First non-empty cell in this terminal row, or first non-empty cell of +# the line when already at the first cell of the row. +# - High +# Top of the screen. +# - Middle +# Center of the screen. +# - Low +# Bottom of the screen. +# - SemanticLeft +# Start of the previous semantically separated word. +# - SemanticRight +# Start of the next semantically separated word. +# - SemanticLeftEnd +# End of the previous semantically separated word. +# - SemanticRightEnd +# End of the next semantically separated word. +# - WordLeft +# Start of the previous whitespace separated word. +# - WordRight +# Start of the next whitespace separated word. +# - WordLeftEnd +# End of the previous whitespace separated word. +# - WordRightEnd +# End of the next whitespace separated word. +# - Bracket +# Character matching the bracket at the cursor's location. +# - SearchNext +# Beginning of the next match. +# - SearchPrevious +# Beginning of the previous match. +# - SearchStart +# Start of the match to the left of the vi mode cursor. +# - SearchEnd +# End of the match to the right of the vi mode cursor. +# +# - Search mode exclusive actions: +# - SearchFocusNext +# Move the focus to the next search match. +# - SearchFocusPrevious +# Move the focus to the previous search match. +# - SearchConfirm +# - SearchCancel +# - SearchClear +# Reset the search regex. +# - SearchDeleteWord +# Delete the last word in the search regex. +# - SearchHistoryPrevious +# Go to the previous regex in the search history. +# - SearchHistoryNext +# Go to the next regex in the search history. +# +# - macOS exclusive actions: +# - ToggleSimpleFullscreen +# Enter fullscreen without occupying another space. +# +# - Linux/BSD exclusive actions: +# +# - CopySelection +# Copy from the selection buffer. +# - PasteSelection +# Paste from the selection buffer. +# +# - `command`: Fork and execute a specified command plus arguments +# +# The `command` field must be a map containing a `program` string and an +# `args` array of command line parameter strings. For example: +# `{ program: "alacritty", args: ["-e", "vttest"] }` +# +# And optionally: +# +# - `mods`: Key modifiers to filter binding actions +# +# - Command +# - Control +# - Option +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: +# `mods: Control|Shift`. +# Whitespace and capitalization are relevant and must match the example. +# +# - `mode`: Indicate a binding for only specific terminal reported modes +# +# This is mainly used to send applications the correct escape sequences +# when in different modes. +# +# - AppCursor +# - AppKeypad +# - Search +# - Alt +# - Vi +# +# A `~` operator can be used before a mode to apply the binding whenever +# the mode is *not* active, e.g. `~Alt`. +# +# Bindings are always filled by default, but will be replaced when a new +# binding with the same triggers is defined. To unset a default binding, it can +# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for +# a no-op if you do not wish to receive input characters for that binding. +# +# If the same trigger is assigned to multiple actions, all of them are executed +# in the order they were defined in. +#key_bindings: + #- { key: Paste, action: Paste } + #- { key: Copy, action: Copy } + #- { key: L, mods: Control, action: ClearLogNotice } + #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, } + #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } + #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, } + #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } + + # Vi Mode + #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } + #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } + #- { key: Escape, mode: Vi|~Search, action: ClearSelection } + #- { key: I, mode: Vi|~Search, action: ToggleViMode } + #- { key: I, mode: Vi|~Search, action: ScrollToBottom } + #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } + #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } + #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } + #- { key: G, mode: Vi|~Search, action: ScrollToTop } + #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } + #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } + #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } + #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } + #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } + #- { key: Y, mode: Vi|~Search, action: Copy } + #- { key: Y, mode: Vi|~Search, action: ClearSelection } + #- { key: Copy, mode: Vi|~Search, action: ClearSelection } + #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } + #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } + #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } + #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } + #- { key: Return, mode: Vi|~Search, action: Open } + #- { key: K, mode: Vi|~Search, action: Up } + #- { key: J, mode: Vi|~Search, action: Down } + #- { key: H, mode: Vi|~Search, action: Left } + #- { key: L, mode: Vi|~Search, action: Right } + #- { key: Up, mode: Vi|~Search, action: Up } + #- { key: Down, mode: Vi|~Search, action: Down } + #- { key: Left, mode: Vi|~Search, action: Left } + #- { key: Right, mode: Vi|~Search, action: Right } + #- { key: Key0, mode: Vi|~Search, action: First } + #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } + #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } + #- { key: H, mods: Shift, mode: Vi|~Search, action: High } + #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } + #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } + #- { key: B, mode: Vi|~Search, action: SemanticLeft } + #- { key: W, mode: Vi|~Search, action: SemanticRight } + #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } + #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } + #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } + #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } + #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } + #- { key: Slash, mode: Vi|~Search, action: SearchForward } + #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } + #- { key: N, mode: Vi|~Search, action: SearchNext } + #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } + + # Search Mode + #- { key: Return, mode: Search|Vi, action: SearchConfirm } + #- { key: Escape, mode: Search, action: SearchCancel } + #- { key: C, mods: Control, mode: Search, action: SearchCancel } + #- { key: U, mods: Control, mode: Search, action: SearchClear } + #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } + #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } + #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } + #- { key: Up, mode: Search, action: SearchHistoryPrevious } + #- { key: Down, mode: Search, action: SearchHistoryNext } + #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } + #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } + + # (Windows, Linux, and BSD only) + #- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } + #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } + #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Plus, mods: Control, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Plus, mods: Command, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } + #- { key: H, mods: Command, action: Hide } + #- { key: H, mods: Command|Alt, action: HideOtherApplications } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: N, mods: Command, action: SpawnNewInstance } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + #- { key: F, mods: Command, mode: ~Search, action: SearchForward } + #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } + +#debug: + # Display the time it takes to redraw each frame. + #render_timer: false + + # Keep the log file after quitting Alacritty. + #persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - Off + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false diff --git a/subdir_files/.config/i3/config b/subdir_files/.config/i3/config index 0ecc163..27c5e89 100644 --- a/subdir_files/.config/i3/config +++ b/subdir_files/.config/i3/config @@ -81,7 +81,7 @@ bindsym $mod+9 workspace 10 bindsym $mod+Shift+m border toggle bindsym $mod+j exec emacsclient -c -bindsym $mod+k exec konsole +bindsym $mod+k exec alacritty bindsym $mod+l exec dmenu_run # note default is 27% on my system76. not sure if these # keybinds will screw up other laptop brightness keys. @@ -112,13 +112,13 @@ bindsym $mod+Shift+o exec "i3-nagbar -t warning -m 'You pressed the exit shortcu bindsym $mod+Shift+p restart # need this for kde connect -bar { -status_command i3status -# #status_command /usr/local/bin/myi3status -mode hide -# hidden_state hide -# font pango:monospace 14 -} +# bar { +# status_command i3status +# # #status_command /usr/local/bin/myi3status +# mode hide +# # hidden_state hide +# # font pango:monospace 14 +# } exec copyq exec /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd diff --git a/subdir_files/.config/sway/config b/subdir_files/.config/sway/config index f0e45c4..ec7b201 100644 --- a/subdir_files/.config/sway/config +++ b/subdir_files/.config/sway/config @@ -81,7 +81,7 @@ bindsym $mod+9 workspace 10 bindsym $mod+Shift+m border toggle bindsym $mod+j exec emacsclient -c -bindsym $mod+k exec konsole +bindsym $mod+k exec alacritty bindsym $mod+l exec dmenu_run # note default is 27% on my system76. not sure if these # keybinds will screw up other laptop brightness keys. diff --git a/subdir_files/.gnupg/gpg.conf b/subdir_files/.gnupg/gpg.conf index 035415d..0bf5256 100644 --- a/subdir_files/.gnupg/gpg.conf +++ b/subdir_files/.gnupg/gpg.conf @@ -45,10 +45,10 @@ default-key B125F60B7B287FF6A2B7DF8F170AF0E2954295DF #keyserver hkp://ipv4.pool.sks-keyservers.net #keyserver hkp://keys.gnupg.net #keyserver hkp://keyserver.ubuntu.com -#keyserver hkp://keyring.debian.org +keyserver hkp://keyring.debian.org #keyserver keyserver.ubuntu.com # more secure hkps, but had problems with my gpg version -keyserver hkps://hkps.pool.sks-keyservers.net +#keyserver hkps://hkps.pool.sks-keyservers.net ### begin things added by enigmail cert-digest-algo SHA256 diff --git a/subdir_files/sieve/lists.sieve b/subdir_files/sieve/lists.sieve index 1d1be20..66b75fa 100644 --- a/subdir_files/sieve/lists.sieve +++ b/subdir_files/sieve/lists.sieve @@ -128,7 +128,6 @@ if anyof ( header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", - header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", diff --git a/subdir_files/sieve/liststest.sieve b/subdir_files/sieve/liststest.sieve index 98881aa..66b75fa 100644 --- a/subdir_files/sieve/liststest.sieve +++ b/subdir_files/sieve/liststest.sieve @@ -67,7 +67,7 @@ if anyof ( header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", - header :contains "list-id" "<", + header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "",