====== my most used local scripts ======
in ''~/.local/bin'' usually. also in my [[https://bytes.4-walls.net/kat/dotfiles/src/branch/main/config/.local/bin|dotfiles]].
==== mterm && mftp ====
launch a terminal or filezilla window excluded from current and future VPN sessions (until window is closed)
#!/bin/bash
nohup mullvad-exclude kitty > /dev/null 2>&1 &
#!/bin/bash
nohup mullvad-exclude filezilla > /dev/null 2>&1 &
==== resize img ====
kind of doesn't work as a loop. i gotta run it once for every image in the working directory.
this is for when i use [[https://syncthing.net/|syncthing]] to transfer camera photos from my phone to my computer, then need to resize them for easier sharing
#!/bin/bash
WORKDIR=$(pwd)
TMPDIR="/home/kat/Pictures/Camera/tmp-resize"
cd ${WORKDIR}
for f in *.jpg; do mv $f ${TMPDIR} && cd ${TMPDIR} && magick -size 3000x4000 $f -resize 40% "../${f%.*}-resized.jpg" && rm -rf $f; done