commit 18cadcc499fbe3762ffb4134c6f833b6b23e6b07
parent 3a7fe04927b51f12067e4ed28008329b6f606004
Author: regexghost <dev@regexghost.com>
Date: Tue, 2 Jun 2026 15:50:44 +0100
XDG dirs config, moving files out of home directory + bat changes
Diffstat:
9 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc
@@ -50,13 +50,13 @@ alias ra='ranger'
alias py='python3'
alias nf='fastfetch'
alias sq='ncdu --color off' # Not sure why this is "sq" but I'm used to it now
-alias bat='batcat --theme=base16'
+alias bat='bat --theme=base16'
alias mv='mv -i'
alias cp='cp -r -i'
alias cmatrix='cmatrix -u 6' # Cool fake hacker program
alias duf='duf -hide special'
alias gtop='sudo intel_gpu_top'
-alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
+alias wget='wget --hsts-file="$XDG_STATE_HOME/wget-hsts"'
alias rm='rm-trash'
alias cheat='cheat -c'
alias zbr='zig build run'
@@ -159,12 +159,12 @@ function qfi () {
}
alias m='micro -clipboard terminal'
-alias v='vim'
+alias v='vim -u ~/.config/vim/vimrc -i ~/.config/vim/viminfo'
function batf () {
result=$(fasd -fi $@)
[ "$result" == "" ] && return
- batcat --theme=base16 "$result"
+ bat --theme=base16 "$result"
}
function lsblk () {
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 "https://i.ytimg.com/vi_webp/${video_id}/maxresdefault.webp" -P /tmp
+wget --hsts-file="$XDG_STATE_HOME/wget-hsts" "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
@@ -24,7 +24,7 @@ fi
notify-send "Downloading"
for link in $links; do
- wget -P "$OUTPUT_FOLDER" "$link" &
+ wget --hsts-file="$XDG_STATE_HOME/wget-hsts" -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 -P /tmp "$1"
+ wget --hsts-file="$XDG_STATE_HOME/wget-hsts" -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/vim/vimrc b/dotfiles/.config/vim/vimrc
@@ -24,4 +24,4 @@ hi SpellCap cterm=underline
hi SpellRare cterm=underline
hi SpellLocal cterm=underline
-colorscheme dim
+"colorscheme dim
diff --git a/dotfiles/.profile b/dotfiles/.profile
@@ -18,13 +18,15 @@ export CARGO_HOME="$XDG_DATA_HOME/cargo"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk2rc"
export NUGET_PACKAGES="$XDG_CACHE_HOME/NuGetPackages"
+export W3M_DIR="$XDG_STATE_HOME/w3m"
+export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_DATA_HOME/aspell/en.pws; repl $XDG_DATA_HOME/aspell/en.prepl"
# Other variables
export BUG_PROJECT="$XDG_DATA_HOME/regexghost/todo-bug"
export EDITOR="vi"
export VISUAL="nano"
-export PAGER="batcat --wrap auto --theme=base16 --paging always"
+export PAGER="bat --wrap word --theme=base16 --paging always"
export BROWSER="netsurf-gtk"
export PATH=~/.local/bin:$PATH:~/.npm/bin:~/.local/share/npm/bin:~/.local/share/go/bin:~/.local/share/cargo/bin
export TERMINAL="st"
diff --git a/panel-scripts/lemonbar-bar.sh b/panel-scripts/lemonbar-bar.sh
@@ -79,7 +79,7 @@ update_weather () {
}
update_music () {
- state="$(mocp -i)"
+ state="$(mocp -M "$XDG_CONFIG_HOME/moc" -i)"
song="$(echo "$state" | grep -e "SongTitle" -e "Artist" | tac | paste -sd "-" | sed 's/-Artist: / - /g' | sed 's/^SongTitle: //g; s/"//g' | head -c 16 | sed 's/ $//g')"
pause="$(echo "$state" | grep -e "State" | cut -d " " -f 2)"
if [ "$song" = "" ]; then
diff --git a/panel-scripts/music.sh b/panel-scripts/music.sh
@@ -6,6 +6,8 @@ DMENU_SCRIPT="$XDG_DATA_HOME/regexghost/wm-scripts/dmenu-runner.sh"
MUSIC_DIR="$HOME/Music"
FAVOURITES_DIR="$MUSIC_DIR/Favourites"
+mocp_command="mocp -M $XDG_CONFIG_HOME/moc"
+
ping_panel () {
kill -35 "$(cat ~/.cache/bar_pid)"
}
@@ -13,23 +15,23 @@ ping_panel () {
# Technically these first 4 are unnecessary, could just bind directly to the command
# but I like it all being in one file
if [ "$1" = "--toggle-pause" ]; then
- mocp --toggle-pause
+ $mocp_command --toggle-pause
ping_panel
exit
elif [ "$1" = "--quit" ]; then
- mocp --stop
+ $mocp_command --stop
ping_panel
exit
elif [ "$1" = "--next" ]; then
- mocp --next
+ $mocp_command --next
ping_panel
exit
elif [ "$1" = "--previous" ]; then
- mocp --previous
+ $mocp_command --previous
ping_panel
exit
elif [ "$1" = "--favourite" ]; then
- song="$(mocp -i | grep "File:" | sed 's/File: //g')"
+ song="$($mocp_command -i | grep "File:" | sed 's/File: //g')"
echo "$song" | grep -q "CurrentPlaylist/" && exit
favourite_path="$(echo "$song" | sed "s|$MUSIC_DIR/||g")"
favourite_dir="$(dirname "$favourite_path")"
@@ -38,7 +40,7 @@ elif [ "$1" = "--favourite" ]; then
notify-send "Added to favourites"
exit
elif [ "$1" = "--get-song" ]; then
- song="$(mocp -i 2> /dev/null | awk '/^Title:/ {S1 = ""; printf $0}')"
+ song="$($mocp_command -i 2> /dev/null | awk '/^Title:/ {S1 = ""; printf $0}')"
[ "$song" = "" ] && echo "None" && exit
echo "$song"
exit
@@ -46,13 +48,13 @@ fi
# Start mocp if not running, and set mode to shuffle
if ! pgrep mocp 2> /dev/null > /dev/null; then
- mocp -S
- mocp -t shuffle,repeat
+ $mocp_command -S -M "$XDG_CONFIG_HOME/moc"
+ $mocp_command -t shuffle,repeat
fi
# If mocp is currently playing music, just notify-send the song title
-if ! mocp -i | grep -q "State: STOP"; then
- mocp_i="$(mocp -i)"
+if ! $mocp_command -i | grep -q "State: STOP"; then
+ mocp_i="$($mocp_command -i)"
song_name="$(echo "$mocp_i" | grep "^Title: " | sed 's/Title: //g')"
total="$(echo "$mocp_i" | awk '/^TotalSec/ {print $2}')"
current="$(echo "$mocp_i" | awk '/^CurrentSec/ {print $2}')"
@@ -80,7 +82,7 @@ if find "$playlist_path" -mindepth 1 -type d | grep -q ""; then
fi
fi
-mocp --clear
-mocp --append "$playlist_path"
-mocp --play
+$mocp_command --clear
+$mocp_command --append "$playlist_path"
+$mocp_command --play
ping_panel
diff --git a/terminal-scripts/download-vids.sh b/terminal-scripts/download-vids.sh
@@ -5,8 +5,8 @@ targetDir="${LOC}/toDownload"
[ -d "$targetDir/done" ] || mkdir "$targetDir/done"
-quality_options_videos="bestvideo[height<=480][vcodec=vp9]+bestaudio[acodec=opus]/bestvideo[height<=480]+bestaudio"
-quality_options_shorts="bestvideo[width<=480][vcodec=vp9]+bestaudio[acodec=opus]/bestvideo[width<=480]+bestaudio[ext=m4a]"
+quality_options_videos="bestvideo[height<=480][vcodec*=avc]+bestaudio[ext=m4a]"
+quality_options_shorts="bestvideo[width<=480][vcodec*=avc]+bestaudio[ext=m4a]"
filename_options="%(channel)s - %(title)s.%(ext)s"
sub_options="--embed-subs --all-subs"