Bunch of random updates
This commit is contained in:
8
.bashrc
8
.bashrc
@@ -55,6 +55,7 @@ function catbox
|
||||
}
|
||||
alias shitpost="~/tinker/tinyscripts/shitpost.sh"
|
||||
function unroll { magick $1 -layers CompareAny blah.png; }
|
||||
alias uc="~/tinker/tinyscripts/uc.sh"
|
||||
|
||||
#fun
|
||||
function space { python -c "print(\" \".join(\"$*\"))"; }
|
||||
@@ -84,6 +85,7 @@ function reread_rss { sqlite3 ~/.local/share/liferea/liferea.db 'select items.ti
|
||||
function cover_fix { if [ -z "`ls cover_large* 2>/dev/null`" ]; then rename cover cover_large *; fi; magick cover_large* -resize $1x$1 cover.png; }
|
||||
function ga
|
||||
{
|
||||
id= # Fucking scopes man
|
||||
PROG=sxiv
|
||||
TARGET=~/Games/img.silvie.org/docs/cdn/deck-builder/
|
||||
BLOB=$TARGET/search.json
|
||||
@@ -91,9 +93,9 @@ function ga
|
||||
if [ $1 == -i ]; then PROG=; shift; fi
|
||||
if grep -Eq '[0-9a-zA-Z]{10}' <<< "$1"; then id=$1 # This format is fucking shit, just randomly capital letters on one in 50 cards.
|
||||
else name="$*"; fi
|
||||
|
||||
if [ $id -a $PROG ]; then $PROG $TARGET$id.jpg; return; fi # Can skip the search.json lookup (not really necessary)
|
||||
if [ -z $id ]; then data=`jq '.[]|select(.n=="'"$name"'")' < $BLOB`; fi
|
||||
|
||||
if [ "$id" -a "$PROG" ]; then $PROG $TARGET$id.jpg; return; fi # Can skip the search.json lookup (not really necessary)
|
||||
if [ -z $id ]; then data="`jq '.[]|select(.n=="'"$name"'")' < $BLOB`"; fi
|
||||
if [ -z $PROG ]; then jq <<< "$data"; return; fi
|
||||
$PROG $TARGET`jq -r .u <<< "$data"`.jpg
|
||||
}
|
||||
|
||||
11
audio_output.sh
Executable file
11
audio_output.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
pactl get-default-sink | if grep -q alsa_output.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle-00.analog-stereo; then
|
||||
pactl set-default-sink alsa_output.pci-0000_07_00.6.analog-stereo
|
||||
pactl set-default-source alsa_input.usb-AKM_AK5370-00.mono-fallback
|
||||
notify-send speaker
|
||||
else
|
||||
pactl set-default-sink alsa_output.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle-00.analog-stereo
|
||||
pactl set-default-source alsa_input.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle-00.mono-fallback
|
||||
notify-send headset
|
||||
fi
|
||||
3
uc.sh
Executable file
3
uc.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
perl -C7 -ne \'for(split(//)){print sprintf("U+%04X", ord)." ".$_."\n"}\'' # stolen from brundal
|
||||
3
wpfx.sh
3
wpfx.sh
@@ -5,13 +5,14 @@ wine=wine
|
||||
wpfx=wpfx
|
||||
envar=WINEPREFIX
|
||||
echo init
|
||||
while getopts "123456789gpwt" target; do
|
||||
while getopts "123456789gpwtn" target; do
|
||||
echo "$target, $OPTARG, $OPTIND"
|
||||
case $target in
|
||||
g) wine=/opt/wine-ge-custom/bin/wine;;
|
||||
p) wine=proton-ge; wpfx=pfx; envar=STEAM_COMPAT_DATA_PATH;;
|
||||
w) export DISPLAY=;;
|
||||
t) wine=winetricks;;
|
||||
n) wine=;;
|
||||
*) num=$target;;
|
||||
esac
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user