meta

what's the meta about say it ditto dot net?

User Tools

Site Tools


terminal:bin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
terminal:bin [2025/05/28 00:04] meloterminal:bin [2026/07/11 23:27] (current) melo
Line 1: Line 1:
 ====== my most used local scripts ====== ====== 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]].+in ''~/.local/bin'' usually. also in my [[https://bytes.4-walls.net/kat/dotfiles/src/branch/main/config/.local/bin|dotfiles]]. sometimes from my ''.bashrc'' file.
  
-==== mterm && mftp ====+==== whatip ====
  
-launch a terminal or filezilla window excluded from current and future VPN sessions (until window is closed)+get my internal & external IP address. results are piped to lolcat because i like cute things ok
  
 <code bash> <code bash>
-#!/bin/bash +print internal & external IPs 
- +whatip() { 
-nohup mullvad-exclude kitty > /dev/null 2>&&+ # internal 
 + echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}' 
 + # external 
 + echo -n "external IP: " | lolcat -p 0.7; curl -4 icanhazip.com 
 +}
 </code> </code>
 +
 +==== notif ====
 +
 +used after long-running programs like ''watch'' or ''dig'' because i will easily forget about something i'm waiting on like that.
  
 <code bash> <code bash>
-#!/bin/bash +to get quick notifs 
- +# after long commands 
-nohup mullvad-exclude filezilla > /dev/null 2>&1 &+notif() { 
 + notify-send "done!" 
 + paplay -q /usr/share/sounds/sound-icons/start 
 + spd-say -t female3 -r +25 "done!" 
 +}
 </code> </code>
  
-=== resize img ===+==== mvpn ====
  
-kind of doesn't work as a loop. i gotta run it once for every image in the working directory.+launch applications excluded from current and future VPN sessions (until window is closed).
  
-this is for when use [[https://syncthing.net/|syncthing]] to transfer camera photos from my phone to my computerthen need to resize them for easier sharing+have this aliased to ''mterm'' and ''mftp'', respectively, to launch a terminal or filezilla window with this script.
  
 <code bash> <code bash>
-#!/bin/bash +#!/usr/bin/env bash
- +
-WORKDIR=$(pwd) +
- +
-TMPDIR="/home/kat/Pictures/Camera/tmp-resize" +
- +
-cd ${WD}+
  
-for f in *.jpg; do mv $f ${TMPDIR} && cd ${TMPDIR} && magick -size 3000x4000 $f -resize 40% "../${f%.*}-resized.jpg" && rm -rf $f; done+nohup mullvad-exclude "$1/dev/null || echo "failed to launch $12>&&
 </code> </code>
terminal/bin.1748390661.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki