commit e2305930cd52d92fa938ddb239ca90738cde8931
parent 58789f593ff1cb681af99e27e049a13d0a4581c3
Author: regexghost <dev@regexghost.com>
Date: Sun, 12 Jul 2026 22:20:34 +0100
wget_hsts set in wgetrc instead of for every command
Diffstat:
14 files changed, 82 insertions(+), 71 deletions(-)
diff --git a/dotfiles/.config/newsraft/extract-thumbnail.sh b/dotfiles/.config/newsraft/extract-thumbnail.sh
@@ -8,5 +8,5 @@ if echo "$video_id" | grep -q "www."; then
video_id=$(echo "$URL" | sed 's/.*\/shorts\///g')
fi
echo $video_id
-wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "https://i.ytimg.com/vi_webp/${video_id}/maxresdefault.webp" -P /tmp
+wget "https://i.ytimg.com/vi_webp/${video_id}/maxresdefault.webp" -P /tmp
mv /tmp/maxresdefault.webp "$OUTPUT_FILENAME"
diff --git a/dotfiles/.config/newsraft/reddit-gallery.sh b/dotfiles/.config/newsraft/reddit-gallery.sh
@@ -20,7 +20,7 @@ links="$(cat /tmp/reddit_gallery.html | pup 'a[class="may-blank gallery-item-thu
notify-send "Downloading"
for link in $links; do
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" -P "$OUTPUT_FOLDER" "$link" &
+ wget -P "$OUTPUT_FOLDER" "$link" &
done
wait
diff --git a/dotfiles/.config/newsraft/show-image.sh b/dotfiles/.config/newsraft/show-image.sh
@@ -7,7 +7,7 @@ if echo "$1" | grep -q "youtube"; then
rm -f /tmp/maxresdefault.webp
elif echo "$1" | grep -q "redd.it"; then
filename="$(echo "$1" | sed 's/.*\///g')"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" -P /tmp "$1"
+ wget -P /tmp "$1"
${IMAGE_VIEWER:-feh} "/tmp/${filename}"
rm -rf "/tmp/${filename}"
elif echo "$1" | grep -q "reddit.com/gallery"; then
diff --git a/dotfiles/.config/wgetrc b/dotfiles/.config/wgetrc
@@ -0,0 +1 @@
+hsts_file = ~/.local/state/wget-hsts
diff --git a/dotfiles/.kshrc b/dotfiles/.kshrc
@@ -88,12 +88,13 @@ alias wl='feh --bg-fill --no-fehbg ~/.config/regexghost/wallpaper.jpg'
alias capture-window='echo "Focus window to capture" && sleep 1 && id="$(xdotool getactivewindow)" && echo "Got id" && sleep 1 && import -frame -window "$id"'
alias da='download-vids && download-pods'
alias wb='~/Programs/websites/personal-website/scripts/build.sh'
-alias wp='push-website /tmp/mainwebsite/build/'
+alias wp='push-website /tmp/personal-website/build/'
alias sshr='ssh racknerd'
alias qv='~/.config/newsraft/queue-vid.sh'
alias dns='dig A +short'
alias vp='vid-play'
alias vps='vid-play -s'
+alias pve='pipe-viewer'
# Bug todo
@@ -145,7 +146,6 @@ qfi () {
$VISUAL "$file"
}
-alias m='micro -clipboard terminal'
alias v='vim -u ~/.config/vim/vimrc -i ~/.config/vim/viminfo'
batf () {
@@ -346,6 +346,11 @@ alias cdr='cd ..'
alias cdrr='cd ../..'
alias cdrrr='cd ../../..'
+wbg () {
+ dir="$(blog "$@")"
+ [ "$dir" = "" ] || cd "$dir"
+}
+
export _FASD_DATA="$XDG_CACHE_HOME/fasd"
export _FASD_NOCASE=1
fasd_cache="$XDG_CACHE_HOME/fasd-init"
diff --git a/helpers/colours/templates/Template-style.css b/helpers/colours/templates/Template-style.css
@@ -6,7 +6,7 @@ body {
}
a {
- color: #CYAN;
+ color: #BLUE;
}
div.sidebar a {
diff --git a/init.sh b/init.sh
@@ -19,7 +19,7 @@ cd helpers/subgo/; make full; cd ../../
# Create empty wgetrc to stop error
touch ~/.config/wgetrc
-# Shell stuf
+# Shell stuff
cp /etc/shells ~/Downloads/shells_backup
echo "/usr/local/bin/oksh" | sudo tee -a /etc/shells
chsh
@@ -31,6 +31,8 @@ mkdir ~/.config/aspell/
mkdir ~/.local/share/aspell/
sudo systemctl enable --now bluetooth
systemctl --user restart pulseaudio
+
+# Make dirs
mkdir ~/Videos
mkdir ~/Videos/Podcasts
mkdir ~/Videos/YouTube
diff --git a/lists/dotfiles b/lists/dotfiles
@@ -35,3 +35,4 @@
~/.config/newsraft/article.sh
~/.config/newsraft/reddit-refresh.sh
~/.config/newsraft/combine-feeds.sh
+~/.config/wgetrc
diff --git a/otherPrograms.sh b/otherPrograms.sh
@@ -37,7 +37,7 @@ bsky () {
mkdir bsky
cd bsky
url="$(github_latest_release "github" "mattn" "bsky")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
make
@@ -52,7 +52,7 @@ forgejo () {
mkdir forgejo
cd forgejo
url="$(github_latest_release "codeberg" "forgejo-contrib" "forgejo-cli")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
cargo build --release
@@ -65,7 +65,7 @@ aacgain () {
mkdir aacgain
cd aacgain
url="$(github_latest_release "github" "dgilman" "aacgain")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
}
bat () {
@@ -91,7 +91,7 @@ less () {
#cd less
#version="$(curl https://www.greenwoodsoftware.com/less/download.html | grep RECOMMENDED | tail -n 1 | sed -nE 's/.*version ([0-9]*).*/\1/p')"
#echo $version
- #wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "https://greenwoodsoftware.com/less/less-${version}.zip"
+ #wget "https://greenwoodsoftware.com/less/less-${version}.zip"
#unzip *.zip
#cd */
git clone https://github.com/gwsw/less
@@ -110,7 +110,7 @@ nano () {
mkdir nano
cd nano
version="$(curl "https://www.nano-editor.org/download.php" | grep "dist/" | head -n 1 | cut -d "\"" -f 2)"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "https://nano-editor.org/${version}"
+ wget "https://nano-editor.org/${version}"
tar -xf *.xz
cd */
./configure --prefix="$HOME/.local"
@@ -124,7 +124,7 @@ oksh () {
mkdir oksh
cd oksh
url="$(github_latest_release "github" "ibara" "oksh")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
cp ../../patches/oksh-case-insensitive.diff .
@@ -143,7 +143,7 @@ opustags () {
mkdir opustags
cd opustags
url="$(github_latest_release "github" "fmang" "opustags")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
mkdir build
@@ -161,7 +161,7 @@ rsgain () {
mkdir rsgain
cd rsgain
url="$(github_latest_release "github" "complexlogic" "rsgain")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
mkdir build
@@ -233,7 +233,7 @@ bluetui () {
mkdir bluetui
cd bluetui
url="$(github_latest_release "github" "pythops" "bluetui")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
cargo build --release
@@ -265,7 +265,7 @@ pipeviewer () {
mkdir pipeviewer
cd pipeviewer
url="$(github_latest_release "github" "trizen" "pipe-viewer")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
cp ../../patches/pipe-viewer-copy.diff .
@@ -300,7 +300,7 @@ alpine () {
mkdir alpine
cd alpine
url="$(curl "https://alpineapp.email/" | grep "HREF" | grep "tar.xz" | head -n 1 | cut -d "\"" -f 4)"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
tar -xf *.xz
cd */
./configure
@@ -324,7 +324,7 @@ mepo () {
mkdir mepo
cd mepo
url="$(github_latest_release "sourcehut" '~mil' "mepo")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
@@ -389,7 +389,7 @@ fastfetch () {
mkdir fastfetch
cd fastfetch
url="$(github_latest_release "github" "fastfetch-cli" "fastfetch")"
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "$url"
+ wget "$url"
unzip *.zip
cd */
mkdir build
diff --git a/panel-scripts/sunrise.sh b/panel-scripts/sunrise.sh
@@ -5,7 +5,7 @@ curLocationFile="$XDG_CONFIG_HOME/regexghost/current_location.csv"
lat=$(cat "$curLocationFile" | cut -d "|" -f 1)
lon=$(cat "$curLocationFile" | cut -d "|" -f 2)
-theme=$(cat "$XDG_CONFIG_HOME/regexghost/current_theme.txt")
+theme=$(cat "$XDG_CONFIG_HOME/regexghost/current-theme.txt")
if [[ "$theme" == "dracula" ]]; then
sunsetColour="8be9fd"
diff --git a/terminal-scripts/Makefile b/terminal-scripts/Makefile
@@ -39,4 +39,4 @@ normal:
cp media-cut.sh ${BIN}/media-cut
cp os-transfer-backup.sh ${BIN}/os-transfer-backup
cp vid-play.sh ${BIN}/vid-play
- cp blog.sh ${BIN}/blog
+ cp blog-devlog.sh ${BIN}/blog-devlog
diff --git a/terminal-scripts/blog-devlog.sh b/terminal-scripts/blog-devlog.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+blog () {
+ dir="$HOME/Programs/websites/personal-website/blog/$(date +%Y/%B | awk '{print tolower($0)}')"
+ [ -d "$dir" ] || mkdir -p "$dir"
+ [ "$1" = "cd" ] && echo "$dir" && exit
+ month_num="$(date "+%m")"
+ year="$(date "+%Y")"
+ date="$(date "+%d")"
+ read -p "Enter filename: " filename
+ read -p "Enter title: " title
+ if ! echo "$filename" | grep -q ".md$"; then
+ filename="${filename}.md"
+ fi
+ fullpath="${dir}/${filename}"
+ echo "+++" >> "$fullpath"
+ echo "title = \"${title}\"" >> "$fullpath"
+ echo "datePublished = ${year}-${month_num}-${date}" >> "$fullpath"
+ echo "template = \"blog-page.html\"" >> "$fullpath"
+ echo "+++" >> "$fullpath"
+ "${VISUAL:-${EDITOR:-vi}}" "$fullpath"
+}
+
+devlog () {
+ month_num="$(date "+%m")"
+ month_name="$(date "+%B")"
+ year="$(date "+%Y")"
+ date="$(date "+%d")"
+ filename="$HOME/Programs/websites/personal-website/devlog/${year}-${month_num}-${month_name}.md"
+
+ if [ -f "$filename" ]; then
+ "${VISUAL:-${EDITOR:-vi}}" "$filename"
+ else
+ echo "+++" >> "$filename"
+ echo "title = \"${month_name} ${year} Devlog\"" >> "$filename"
+ echo "datePublished = ${year}-${month_num}-${date}" >> "$filename"
+ echo "template = \"blog-page.html\"" >> "$filename"
+ echo "+++" >> "$filename"
+ "${VISUAL:-${EDITOR:-vi}}" "$filename"
+ fi
+}
+
+case "$1" in
+ b*)
+ blog "$2"
+ ;;
+ d*)
+ devlog
+ ;;
+esac
diff --git a/terminal-scripts/blog.sh b/terminal-scripts/blog.sh
@@ -1,48 +0,0 @@
-#!/bin/sh
-
-blog () {
- dir="$HOME/Programs/websites/personal-website/blog/$(date +%Y/%B | awk '{print tolower($0)}')"
- [ -d "$dir" ] || mkdir -p "$dir"
- month_num="$(date "+%m")"
- year="$(date "+%Y")"
- date="$(date "+%d")"
- read -p "Enter filename: " filename
- read -p "Enter title: " title
- if ! echo "$filename" | grep -q ".md$"; then
- filename="${filename}.md"
- fi
- echo "+++" >> "$filename"
- echo "title = \"${title}\"" >> "$filename"
- echo "datePublished = ${year}-${month_num}-${date}" >> "$filename"
- echo "template = \"blog-page.html\"" >> "$filename"
- echo "+++" >> "$filename"
- "${VISUAL:-${EDITOR:-vi}}" "$filename"
-}
-
-devlog () {
- month_num="$(date "+%m")"
- month_name="$(date "+%B")"
- year="$(date "+%Y")"
- date="$(date "+%d")"
- filename="$HOME/Programs/websites/personal-website/devlog/${year}-${month_num}-${month_name}.md"
-
- if [ -f "$filename" ]; then
- "${VISUAL:-${EDITOR:-vi}}" "$filename"
- else
- echo "+++" >> "$filename"
- echo "title = \"${month_name} ${year} Devlog\"" >> "$filename"
- echo "datePublished = ${year}-${month_num}-${date}" >> "$filename"
- echo "template = \"blog-page.html\"" >> "$filename"
- echo "+++" >> "$filename"
- "${VISUAL:-${EDITOR:-vi}}" "$filename"
- fi
-}
-
-case "$1" in
- b*)
- blog
- ;;
- d*)
- devlog
- ;;
-esac
diff --git a/terminal-scripts/stream-check.sh b/terminal-scripts/stream-check.sh
@@ -43,7 +43,7 @@ if ! [ "$youtube_at" = "NONE" ]; then
fi
fi
if ! [ "$kick_at" = "NONE" ]; then
- wget --hsts-file="$XDG_STATE_HOME/wget-hsts" --timeout=5 -q --user-agent "NetSurf" "https://kick.com/api/v1/channels/${kick_at}" -O /tmp/live_kick.html
+ wget --timeout=5 -q --user-agent "NetSurf" "https://kick.com/api/v1/channels/${kick_at}" -O /tmp/live_kick.html
if grep -q "is_live\":true" /tmp/live_kick.html; then
if [ "$format" = "pretty" ]; then
echo "${name} is live on Kick: https://www.kick.com/${kick_at}"