wpfx upgrade from a while ago, also small fedii convenience upgrade

This commit is contained in:
2025-12-05 21:44:36 +11:00
parent 0f0786f957
commit 4d92b55423
2 changed files with 20 additions and 3 deletions

View File

@@ -38,8 +38,7 @@ function lyrics { python ~/tinker/lyrics-fetcher/getlyrics.py $@; }
function pulsemagix { ~/pulsemagix.sh $*; }
alias search=~/tinker/tinyscripts/search.sh
alias gitmk="git push -o repo.private=false -u master master"
alias wpfx='WINEPREFIX="$(pwd)/wpfx" wine'
alias wpfx2='WINEPREFIX="$(pwd)/wpfx2" wine'
alias wpfx=~/tinker/tinyscripts/wpfx.sh
function update { scp -r * root@jasmine:"$(cat .update)"; }
function makepkgi { a="$(pwd)"; mkdir -p "/tmp/negros/src/$(basename "$a")"; cp PKGBUILD /tmp/negros/; cp -r ./. "/tmp/negros/src/$(basename "$a")/"; cd /tmp/negros/; rm "src/$(basename "$a")/PKGBUILD" "src/$(basename "$a")"/*.tar.zst; makepkg -${1:-R}; cp *.tar.zst "$a"; cd "$a"; rm -rf /tmp/negros/; }
#image shitposting
@@ -83,7 +82,7 @@ alias pentest="curl -H 'user-agent:rakkatakkamuthafakka'"
alias fedifind="python ~/tinker/fedi/fedi_finder.py -c ~/tinker/fedi/misc/userids"
function fedidl { a=$(curl -sLH "Accept:application/activity+json" $1 | jq -r '.attachment[] | .url'); if [ "$2" = "-p" ]; then echo $a; else wget $a; fi; }
alias att="~/tinker/fedi/get_attachments.sh"
function fedii { curl -sLH "Accept:application/activity+json" $1 | jq; }
function fedii { curl -sLH "Accept:application/activity+json" ${1:-`wl-paste`} | jq; }
function mxc { [ -z $INSTANCE ] && creds matrix harpy; echo "https://$INSTANCE/_matrix/media/v3/download/$*"; }
#low-frequency

18
wpfx.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
num=
wine=wine
wpfx=wpfx
envar=WINEPREFIX
echo init
while getopts "123456789gp" target; do
echo "$target, $OPTARG, $OPTIND"
if [ $target = g ]; then wine=/opt/wine-ge-custom/bin/wine
elif [ $target = p ]; then wine=proton-ge; wpfx=pfx; envar=STEAM_COMPAT_DATA_PATH
else num=$target; fi
done
shift $((OPTIND-1))
echo "$wpfx, $num, $wine, $@"
read $envar <<< "`pwd`/$wpfx$num"
export $envar
$wine "$@"