Add commonly-used scripts

This commit is contained in:
Adam Gausmann 2023-04-11 13:58:50 -05:00
parent 0d0832c4ff
commit 3d336fc77f
6 changed files with 42 additions and 0 deletions

6
templates/bin/discord-update Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
URL="https://discord.com/api/download/stable?platform=linux&format=tar.gz"
OUTPUT="$HOME/.local/lib"
curl -sL "$URL" | tar -zxv -C "$OUTPUT"

10
templates/bin/download-more-ram Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
[ -e /dev/zram0 ] && exit 1
set -e
sudo modprobe zram
echo 16G | sudo tee /sys/block/zram0/disksize
sudo mkswap --label zram0 /dev/zram0
sudo swapon --priority 100 /dev/zram0

7
templates/bin/osu-update Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
URL="https://github.com/ppy/osu/releases/latest/download/osu.AppImage"
OUTPUT="$HOME/.local/lib/appimages/osu.AppImage"
curl -L "$URL" -o "$OUTPUT"
chmod +x "$OUTPUT"

5
templates/bin/record-screen Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
outfile="$(date +"%Y-%m-%d %T").mkv"
wf-recorder -g "$(slurp -o)" -D -F "format=yuv420p" -f "$outfile"

8
templates/bin/remux Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
if [ $# -ne 1 ]
then
echo "usage: [infile]"
exit 1
fi
ffmpeg -i "$1" -vf format=yuv420p "$1.mp4"

6
templates/bin/vscode-update Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
URL="https://code.visualstudio.com/sha/download?build=stable&os=linux-x64"
OUTPUT="$HOME/.local/lib"
curl -sL "$URL" | tar -zxv -C "$OUTPUT"