| bookmarks update. - dotfiles - These are my dotfiles. There are many like it, b… | |
| git clone git://jay.scot/dotfiles | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit 3e9f90e8edaa65ee7a6fa4a48a574aa65a58fb26 | |
| parent f1ecc6cd5d87ce0369fe692213b63744516cc59b | |
| Author: Jay Scott <[email protected]> | |
| Date: Sat, 6 Dec 2025 18:37:54 +0000 | |
| bookmarks update. | |
| Diffstat: | |
| M ashrc | 4 ---- | |
| A bin/fet.sh | 266 +++++++++++++++++++++++++++++… | |
| M bin/link-handler.sh | 1 + | |
| M fdm/config | 13 ++++--------- | |
| M lynx/bookmarks.html | 20 ++++++++++---------- | |
| M nvim/init.lua | 17 ++++++++++++++++- | |
| M sfeed/sfeedrc | 1 - | |
| 7 files changed, 297 insertions(+), 25 deletions(-) | |
| --- | |
| diff --git a/ashrc b/ashrc | |
| @@ -41,8 +41,6 @@ alias rm='rm -i' | |
| # random alias | |
| alias weather='curl wttr.in/?1QF' | |
| alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' | |
| -alias 0ad='flatpak run com.play0ad.zeroad' | |
| -alias openra='flatpak run net.openra.OpenRA' | |
| alias c89='gcc -ansi -pedantic' | |
| # git alias | |
| @@ -61,5 +59,3 @@ alias mpv="mpv --autofit=30% --really-quiet --no-terminal" | |
| alias von='doas resolvconf -u && doas wg-quick up be-bru-wg-103' | |
| alias voff='doas wg-quick down be-bru-wg-103' | |
| alias vcheck='curl https://am.i.mullvad.net/connected' | |
| - | |
| -alias s='ddgr --unsafe --noua' | |
| diff --git a/bin/fet.sh b/bin/fet.sh | |
| @@ -0,0 +1,266 @@ | |
| +#!/bin/sh | |
| +# | |
| +# fet.sh | |
| +# a fetch in pure POSIX shell | |
| +# | |
| + | |
| +# supress errors | |
| +exec 2>/dev/null | |
| +set -- | |
| +eq() { # equals | [ a = b ] with globbing | |
| + case $1 in | |
| + $2) ;; | |
| + *) return 1;; | |
| + esac | |
| +} | |
| + | |
| +## DE | |
| +wm=$XDG_CURRENT_DESKTOP | |
| +[ "$wm" ] || wm=$DESKTOP_SESSION | |
| + | |
| +## Distro | |
| +# freedesktop.org/software/systemd/man/os-release.html | |
| +# a common file that has variables about the distro | |
| +for os in /etc/os-release /usr/lib/os-release; do | |
| + # some POSIX shells exit when trying to source a file that doesn't exi… | |
| + [ -f $os ] && . $os && break | |
| +done | |
| + | |
| +if [ -e /proc/$$/comm ]; then | |
| + ## Terminal | |
| + while [ ! "$term" ]; do | |
| + # loop over lines in /proc/pid/status until it reaches PPid | |
| + # then save that to a variable and exit the file | |
| + while read -r line; do | |
| + eq "$line" 'PPid*' && ppid=${line##*:?} && break | |
| + done < "/proc/${ppid:-$PPID}/status" | |
| + | |
| + # Make sure not to do an infinite loop | |
| + [ "$pppid" = "$ppid" ] && break | |
| + pppid=$ppid | |
| + | |
| + # get name of binary | |
| + read -r name < "/proc/$ppid/comm" | |
| + | |
| + case $name in | |
| + *sh|"${0##*/}") ;; # skip shells | |
| + *[Ll]ogin*|*init|*systemd*) break;; # exit when the t… | |
| + # anything else can be assumed to be the terminal | |
| + # this has the side affect of catching tmux, but tmux | |
| + # detaches from the terminal and therefore ignoring th… | |
| + # will just make the init the term | |
| + *) term=$name | |
| + esac | |
| + done | |
| + | |
| + ## WM/DE | |
| + [ "$wm" ] || | |
| + # loop over all processes and check the binary name | |
| + for i in /proc/*/comm; do | |
| + read -r c < "$i" | |
| + case $c in | |
| + *bar*|*rc) ;; | |
| + awesome|xmonad*|qtile|sway|i3|[bfo]*box|*wm*) … | |
| + esac | |
| + done | |
| + | |
| + ## Memory | |
| + # loop over lines in /proc/meminfo until it reaches MemTotal, | |
| + # then convert the amount (second word) from KB to MB | |
| + while read -r line; do | |
| + eq "$line" 'MemTotal*' && set -- $line && break | |
| + done < /proc/meminfo | |
| + mem="$(( $2 / 1000 ))MB" | |
| + | |
| + ## Processor | |
| + while read -r line; do | |
| + case $line in | |
| + vendor_id*) vendor="${line##*: } ";; | |
| + model\ name*) cpu=${line##*: }; break;; | |
| + esac | |
| + done < /proc/cpuinfo | |
| + | |
| + ## Uptime | |
| + # the simple math is shamefully stolen from aosync | |
| + IFS=. read -r uptime _ < /proc/uptime | |
| + d=$((uptime / 60 / 60 / 24)) | |
| + up=$(printf %02d:%02d $((uptime / 60 / 60 % 24)) $((uptime / 60 % 60))) | |
| + [ "$d" -gt 0 ] && up="${d}d $up" | |
| + | |
| + ## Kernel | |
| + read -r _ _ version _ < /proc/version | |
| + kernel=${version%%-*} | |
| + eq "$version" '*Microsoft*' && ID="fake $ID" | |
| + | |
| + ## Motherboard // laptop | |
| + read -r model < /sys/devices/virtual/dmi/id/product_name | |
| + # invalid model handling | |
| + case $model in | |
| + # alternate file with slightly different info | |
| + # on my laptop it has the device model (instead of 'hp noteboo… | |
| + # on my desktop it has the extended motherboard model | |
| + 'System '*|'Default '*|'To Be Filled'*) | |
| + read -r model < /sys/devices/virtual/dmi/id/board_name | |
| + esac | |
| + | |
| + ## Packages | |
| + # clean environment, then make every file in the dir an argument, | |
| + # then save the argument count to $pkgs | |
| + set -- | |
| + # kiss, arch, debian, void, gentoo | |
| + for i in '/var/db/kiss/installed/*' '/var/lib/pacman/local/[0-9a-z]*'… | |
| + '/var/lib/dpkg/info/*.list' '/var/db/xbps/.*' '/var/db/pkg/*/*'; do | |
| + set -- $i | |
| + [ $# -gt 1 ] && pkgs=$# && break | |
| + done | |
| + | |
| + read -r host < /proc/sys/kernel/hostname | |
| +elif [ -f /var/run/dmesg.boot ]; then | |
| + # Both OpenBSD and FreeBSD use this file, however they're formatted di… | |
| + read -r bsd < /var/run/dmesg.boot | |
| + case $bsd in | |
| + Open*) | |
| + ## OpenBSD cpu/mem/name | |
| + while read -r line; do | |
| + case $line in | |
| + 'real mem'*) | |
| + # use the pre-formatted value which is… | |
| + mem=${line##*\(} | |
| + mem=${mem%\)*} | |
| + ;; | |
| + # set $cpu to everything before a comma and af… | |
| + cpu0:*) | |
| + cpu=${line#cpu0: } | |
| + # Remove excess info after the actual … | |
| + cpu=${cpu%%,*} | |
| + # Set the CPU Manufacturer to the firs… | |
| + # variable [separated by '(' or ' '] | |
| + vendor=${cpu%%[\( ]*} | |
| + # We got all the info we want, stop re… | |
| + break | |
| + ;; | |
| + # First 2 words in the file are OpenBSD <versi… | |
| + *) [ "$ID" ] || { set -- $line; ID="$1 $2"; } | |
| + esac | |
| + done < /var/run/dmesg.boot | |
| + [ -d /var/db/pkg ] && set -- /var/db/pkg/* && pkgs=$# | |
| + read -r host < /etc/myname | |
| + host=${host%.*} | |
| + ;; | |
| + # Everything else, assume FreeBSD (first line is ---<<BOOT>> or someth… | |
| + *) | |
| + # shellcheck source=/dev/null | |
| + . /etc/rc.conf | |
| + # shut shellcheck up without disabling the warning | |
| + host=${hostname:-} | |
| + | |
| + while read -r line; do | |
| + case $line in | |
| + # os version | |
| + FreeBSD*) | |
| + # If the OS is already set, no need to… | |
| + [ "$ID" ] && continue | |
| + ID=${line%%-R*} | |
| + ;; | |
| + | |
| + CPU:*) | |
| + cpu=${cpu#CPU: } | |
| + # Remove excess info from after the ac… | |
| + cpu=${line%\(*} | |
| + ;; | |
| + *Origin=*) | |
| + # CPU Manufacturer | |
| + vendor=${line#*Origin=\"} | |
| + vendor="${vendor%%\"*} " | |
| + ;; | |
| + | |
| + 'real memory'*) | |
| + # Get the pre-formatted amount which i… | |
| + mem=${line##*\(} | |
| + mem=${mem%\)*} | |
| + # This appears to be the final thing w… | |
| + # no need to read it more. | |
| + break | |
| + esac | |
| + done < /var/run/dmesg.boot | |
| + ;; | |
| + esac | |
| +elif v=/System/Library/CoreServices/SystemVersion.plist; [ -f "$v" ]; then | |
| + ## Macos | |
| + # make sure this variable is empty as to not break the following loop | |
| + temp= | |
| + while read -r line; do | |
| + case $line in | |
| + # set a variable so the script knows it's on the corre… | |
| + # (the line after this one is the important one) | |
| + *ProductVersion*) temp=.;; | |
| + *) | |
| + # check if the script is reading the derired l… | |
| + # don't do anything | |
| + [ "$temp" ] || continue | |
| + # Remove everything before and including the f… | |
| + ID=${line#*>} | |
| + # Remove the other side of the XML tag, and in… | |
| + ID="MacOS ${ID%<*}" | |
| + # We got the info we want, end the loop. | |
| + break | |
| + esac | |
| + done < "$v" | |
| +fi | |
| + | |
| +eq "$0" '*fetish' && printf 'Step on me daddy\n' && exit | |
| + | |
| +# help i dont know if it's a capital consistently | |
| +eq "$wm" '*[Gg][Nn][Oo][Mm][Ee]*' && wm='foot DE' | |
| + | |
| +## GTK | |
| +while read -r line; do | |
| + eq "$line" 'gtk-theme*' && gtk=${line##*=} && break | |
| +done < "${XDG_CONFIG_HOME:=$HOME/.config}/gtk-3.0/settings.ini" | |
| + | |
| +# Shorten $cpu and $vendor | |
| +# this is so messy due to so many inconsistencies in the model names | |
| +vendor=${vendor##*Authentic} | |
| +vendor=${vendor##*Genuine} | |
| +cpu=${cpu##*) } | |
| +cpu=${cpu%% @*} | |
| +cpu=${cpu%% CPU} | |
| +cpu=${cpu##CPU } | |
| +cpu=${cpu##*AMD } | |
| +cpu=${cpu%% with*} | |
| +cpu=${cpu% *-Core*} | |
| + | |
| +col() { | |
| + printf ' ' | |
| + for i in 1 2 3 4 5 6; do | |
| + printf '\033[9%sm%s' "$i" "${colourblocks:-▅▅}" | |
| + done | |
| + printf '\033[0m\n' | |
| +} | |
| + | |
| +print() { | |
| + [ "$2" ] && printf '\033[9%sm%6s\033[0m%b%s\n' \ | |
| + "${accent:-4}" "$1" "${separator:- ~ }" "$2" | |
| +} | |
| + | |
| +# default value | |
| +: "${info:=n user os sh wm up gtk cpu mem host kern pkgs term col n}" | |
| + | |
| +for i in $info; do | |
| + case $i in | |
| + n) echo;; | |
| + os) print os "$ID";; | |
| + sh) print sh "${SHELL##*/}";; | |
| + wm) print wm "${wm##*/}";; | |
| + up) print up "$up";; | |
| + gtk) print gtk "${gtk# }";; | |
| + cpu) print cpu "$vendor$cpu";; | |
| + mem) print mem "$mem";; | |
| + host) print host "$model";; | |
| + kern) print kern "$kernel";; | |
| + pkgs) print pkgs "$pkgs";; | |
| + term) print term "$term";; | |
| + user) printf '%7s@%s\n' "$USER" "$host";; | |
| + col) col;; | |
| + esac | |
| +done | |
| diff --git a/bin/link-handler.sh b/bin/link-handler.sh | |
| @@ -32,6 +32,7 @@ case "$uri_lower" in | |
| ;; | |
| *.jpg | *.jpe | *.jpeg | *.png | *.gif | *.webp) | |
| $launcher "$images" "$uri" | |
| + #$launcher wget -qO- "$uri" | "$images" - | |
| ;; | |
| *) | |
| $launcher $browser "$uri" | |
| diff --git a/fdm/config b/fdm/config | |
| @@ -26,9 +26,8 @@ account "personal" imaps | |
| action "inbox" maildir "${path}/%u/Inbox" | |
| # mailing lists | |
| -action "freebsd-announce" maildir "${listdir}/freebsd.announce" | |
| -action "freebsd-current" maildir "${listdir}/freebsd.current" | |
| -action "freebsd-questions" maildir "${listdir}/freebsd.questions" | |
| +action "openbsd-announce" maildir "${listdir}/openbsd.announce" | |
| +action "openbsd-misc" maildir "${listdir}/openbsd.misc" | |
| action "alpine-users" maildir "${listdir}/alpine.users" | |
| action "alpine-aports" maildir "${listdir}/alpine.aports" | |
| action "alpine-announce" maildir "${listdir}/alpine.announce" | |
| @@ -51,12 +50,8 @@ match "^List-Id:.*lists\\.alpinelinux\\.org" in headers { | |
| match "^List-Id:.*aports" in headers action "alpine-aports" | |
| } | |
| -# freebsd | |
| -match "^List-Id:.*freebsd-.*\\.freebsd\\.org" in headers { | |
| - match "^List-Id:.*announce" in headers action "freebsd-announce" | |
| - match "^List-Id:.*current" in headers action "freebsd-current" | |
| - match "^List-Id:.*questions" in headers action "freebsd-questions" | |
| -} | |
| +# openbsd | |
| +match "^Sender:[ \t]*owner-([a-z-]*)@openbsd\\.org" in headers action "openbsd… | |
| # sfeeds | |
| match account "feeds" { | |
| diff --git a/lynx/bookmarks.html b/lynx/bookmarks.html | |
| @@ -11,20 +11,20 @@ | |
| <p> | |
| <ol> | |
| <h2>Gopher</h2> | |
| -<li><a href="gopher://gopher.floodgap.com/7/v2/vs">Floodgap</a></li> | |
| -<li><a href="gopher://gopher.icu/1/quarry">Quarry</a></li> | |
| -<li><a href="gopher://gopher.viste.fr/1/ogup/list">Server List</a></li> | |
| -<li><a href="gopher://jay.scot/">jay.scot</a></li> | |
| -<li><a href="gopher://gopher.metafilter.com/1/MetaFilter">Metafilter</a></li> | |
| +<li><a href="gopher://i-logout.cz/1/bongusta/">Bongusta</a></li> | |
| <li><a href="gopher://hngopher.com">Hacker News</a></li> | |
| +<li><a href="gopher://typed-hole.org/1/lobsters">Lobste.rs</a></li> | |
| +<li><a href="gopher://gopher.black/1/moku-pona">Aggregator of phlog</a></li> | |
| +<li><a href="gopher://gopher.metafilter.com/1/MetaFilter">Metafilter</a></li> | |
| <li><a href="gopher://gopherpedia.com/">gopherpedia</a></li> | |
| <li><a href="gopher://bitreich.org/1/lawn">The Gopher Lawn</a></li> | |
| -<li><a href="gopher://gopher.black/1/moku-pona">Aggregator of phlog</a></li> | |
| -<li><a href="gopher://i-logout.cz/1/bongusta/">Bongusta</a></li> | |
| -<li><a href="gopher://gopher.icu/">Ian J</a></li> | |
| -<li><a href="gopher://typed-hole.org/1/lobsters">Lobste.rs</a></li> | |
| +<li><a href="gopher://jay.scot/">jay.scot</a></li> | |
| +<hr> | |
| +<h2>Search</h2> | |
| +<li><a href="gopher://gopher.floodgap.com/7/v2/vs">Floodgap</a></li> | |
| +<li><a href="gopher://gopher.icu/1/quarry">Quarry</a></li> | |
| +<li><a href="gopher://gopher.viste.fr/1/ogup/list">Server List</a></li> | |
| <hr> | |
| <h2>Web</h2> | |
| -<li><a href="https://brutalist.report/topic/tech?limit=5">Brutalist Tech</a></… | |
| <li><a href="https://wiby.me/surprise/">Wiby Surprise</a></li> | |
| </ol> | |
| diff --git a/nvim/init.lua b/nvim/init.lua | |
| @@ -85,12 +85,26 @@ require("lazy").setup({ | |
| }, | |
| }, | |
| + -- ale | |
| + { | |
| + 'dense-analysis/ale', | |
| + config = function() | |
| + local g = vim.g | |
| + | |
| + g.ale_ruby_rubocop_auto_correct_all = 1 | |
| + g.ale_c_cc_options = "-ansi -pedantic -std=c89 -Wall" | |
| + g.ale_fixers = { | |
| + c = {'gcc'} | |
| + } | |
| + end | |
| + }, | |
| + | |
| -- terraform | |
| { | |
| "hashivim/vim-terraform", | |
| lazy = true, | |
| ft = { 'terraform', 'hcl' } | |
| - } | |
| + }, | |
| }) | |
| @@ -158,3 +172,4 @@ vim.opt.textwidth = 72 | |
| vim.keymap.set("n", "<leader>ps", ":setlocal spell! spelllang=en_gb<CR>", { no… | |
| vim.g.terraform_fmt_on_save = 1 | |
| + | |
| diff --git a/sfeed/sfeedrc b/sfeed/sfeedrc | |
| @@ -26,7 +26,6 @@ feeds() { | |
| # gemini | |
| feed 'midnightpub' 'gemini://midnight.pub/feed.xml' | |
| feed 'antenna' 'gemini://warmedal.se/~antenna/atom.xml' | |
| - feed 'techrights' 'gemini://gemini.techrights.org/feed.xml' | |
| feed 'ewok' 'gemini://warmedal.se/~bjorn/atom.xml' | |
| # people | |
| feed 'codemadness' 'https://codemadness.org/atom.xml' |