Commit a4c9080

xxwhirlpool  ·  2026-03-10 09:10:49 -0400 EDT
parent 93f30dc
misc; rework lowerd & upperd to take args
9 files changed,  +66, -9
+1, -0
......@@ -152,6 +152,7 @@ alias gyolo="git add . && git commit -m 'yolo'"
152152 alias gitd="git diff --staged"
153153 alias gdiff="gitd"
154154 alias gits="git status"
155+alias gita="git add ."
155156 alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-astro/src/utils && node git-changelog.js"
156157
157158 # vpn split tunnel aliases based on a small script @ ~/.local/bin/mvpn
+7, -1
......@@ -1,3 +1,9 @@
11 #!/usr/bin/env bash
2+#
3+# copied from senpai(5) man page
24
3-notify-send "senpai" "New message from $SENDER"
5+escape() {
6+ printf "%s" "$1" | sed 's#\\#\\\\#g'
7+}
8+
9+notify-send "[$BUFFER] $SENDER:" "$(escape "$MESSAGE")"
+1, -0
......@@ -6,4 +6,5 @@ on-highlight-path "/home/kat/.config/senpai/highlight"
66 colors {
77 nicks self purple
88 unread purple
9+ prompt green
910 }
+22, -1
......@@ -1,3 +1,24 @@
11 #!/usr/bin/env bash
2+#
3+# usage:
4+# - `echo "EXAMPLE" | lowerd`
5+# - `lowerd "EXAMPLE"`
6+# - `lowerd -i`
27
3-tr '[:upper:]' '[:lower:]'
8+default() {
9+ tr '[:upper:]' '[:lower:]' | tee >(xclip -selection clipboard)
10+}
11+
12+takearg() {
13+ echo "$@" | default
14+}
15+
16+stdinpaste() {
17+ gum write --header="paste text here" | tr '[:upper:]' '[:lower:]' | batcat --paging=never | tee >(xclip -selection clipboard)
18+}
19+
20+case "$1" in
21+ "") default ;;
22+ "-i") stdinpaste ;;
23+ *) takearg "$@" ;;
24+esac
+1, -1
......@@ -1,7 +1,7 @@
11 #!/bin/bash
22
33 notif() {
4- notify-send "'$time' timer done!"
4+ notify-send "$time timer done!"
55 aplay -q /usr/share/sounds/sound-icons/start
66 spd-say -t female3 -r +25 "timer done!"
77 }
+2, -2
......@@ -8,6 +8,6 @@ fi
88 if [[ $# -eq 0 ]]; then
99 echo "Usage: stripexif [FILENAME]"
1010 exit 1
11-else
12- exiftool -all:all= -tagsfromfile @ -exif:Orientation "$1"
1311 fi
12+
13+exiftool -all:all= -tagsfromfile @ -exif:Orientation "$1"
+7, -0
......@@ -0,0 +1,7 @@
1+#!/usr/bin/env bash
2+
3+stdinpaste() {
4+ gum write --header="paste smart quote shit here" | sed 's/[“”]/"/g; s/[‘’]/'"'"'/g' | batcat --paging=never
5+}
6+
7+stdinpaste
+22, -1
......@@ -1,3 +1,24 @@
11 #!/usr/bin/env bash
2+#
3+# usage:
4+# - `echo "EXAMPLE" | upperd`
5+# - `upperd "EXAMPLE"`
6+# - `upperd -i`
27
3-tr '[:lower:]' '[:upper:]'
8+default() {
9+ tr '[:lower:]' '[:upper:]' | tee >(xclip -selection clipboard)
10+}
11+
12+takearg() {
13+ echo "$@" | default
14+}
15+
16+stdinpaste() {
17+ gum write --header="paste text here" | tr '[:lower:]' '[:upper:]' | batcat --paging=never | tee >(xclip -selection clipboard)
18+}
19+
20+case "$1" in
21+ "") default ;;
22+ "-i") stdinpaste ;;
23+ *) takearg "$@" ;;
24+esac
+3, -3
......@@ -1,4 +1,4 @@
1-#!/bin/bash
1+#!/usr/bin/env bash
22
33 avi2mkv() {
44 for f in *.avi; do ffmpeg -fflags +genpts -i "$f" -c:v copy -c:a copy -c:s copy "${f%.*} AVI2MKV.mkv" || break; done
......@@ -20,11 +20,11 @@ vidhash() {
2020 # borrowed from my buddy neckspike:
2121 # https://pastebin.com/mg3CVDiU
2222 for f in *.mkv; do
23- hash=$(crc32 "$f")
23+ hash=$(crc32 "$f" | tr '[:lower:]' '[:upper:]')
2424 ext="${f##*.}"
2525 newname="${f%.*} [$hash]".$ext
2626
27- gum confirm "are you sure you want to rename?" --default=yes --timeout=3s && mv "$f" "$newname" && echo -e "new name:\n$newname"|| echo -e "printing names instead:\n$newname"
27+ gum confirm "are you sure you want to rename?" --default=yes --timeout=2s && mv "$f" "$newname" && echo -e "new name:\n$newname"|| echo -e "printing names instead:\n$newname"
2828 done
2929 }
3030