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'" | |
| 152 | 152 | alias gitd="git diff --staged" | |
| 153 | 153 | alias gdiff="gitd" | |
| 154 | 154 | alias gits="git status" | |
| 155 | + | alias gita="git add ." | |
| 155 | 156 | alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-astro/src/utils && node git-changelog.js" | |
| 156 | 157 | ||
| 157 | 158 | # vpn split tunnel aliases based on a small script @ ~/.local/bin/mvpn |
+7,
-1
| ... | ... | @@ -1,3 +1,9 @@ | |
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | + | # | |
| 3 | + | # copied from senpai(5) man page | |
| 2 | 4 | ||
| 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" | |
| 6 | 6 | colors { | |
| 7 | 7 | nicks self purple | |
| 8 | 8 | unread purple | |
| 9 | + | prompt green | |
| 9 | 10 | } |
+22,
-1
| ... | ... | @@ -1,3 +1,24 @@ | |
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | + | # | |
| 3 | + | # usage: | |
| 4 | + | # - `echo "EXAMPLE" | lowerd` | |
| 5 | + | # - `lowerd "EXAMPLE"` | |
| 6 | + | # - `lowerd -i` | |
| 2 | 7 | ||
| 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 @@ | |
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | ||
| 3 | 3 | notif() { | |
| 4 | - | notify-send "'$time' timer done!" | |
| 4 | + | notify-send "$time timer done!" | |
| 5 | 5 | aplay -q /usr/share/sounds/sound-icons/start | |
| 6 | 6 | spd-say -t female3 -r +25 "timer done!" | |
| 7 | 7 | } |
+2,
-2
| ... | ... | @@ -8,6 +8,6 @@ fi | |
| 8 | 8 | if [[ $# -eq 0 ]]; then | |
| 9 | 9 | echo "Usage: stripexif [FILENAME]" | |
| 10 | 10 | exit 1 | |
| 11 | - | else | |
| 12 | - | exiftool -all:all= -tagsfromfile @ -exif:Orientation "$1" | |
| 13 | 11 | 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 @@ | |
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | + | # | |
| 3 | + | # usage: | |
| 4 | + | # - `echo "EXAMPLE" | upperd` | |
| 5 | + | # - `upperd "EXAMPLE"` | |
| 6 | + | # - `upperd -i` | |
| 2 | 7 | ||
| 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 | |
| 2 | 2 | ||
| 3 | 3 | avi2mkv() { | |
| 4 | 4 | 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() { | |
| 20 | 20 | # borrowed from my buddy neckspike: | |
| 21 | 21 | # https://pastebin.com/mg3CVDiU | |
| 22 | 22 | for f in *.mkv; do | |
| 23 | - | hash=$(crc32 "$f") | |
| 23 | + | hash=$(crc32 "$f" | tr '[:lower:]' '[:upper:]') | |
| 24 | 24 | ext="${f##*.}" | |
| 25 | 25 | newname="${f%.*} [$hash]".$ext | |
| 26 | 26 | ||
| 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" | |
| 28 | 28 | done | |
| 29 | 29 | } | |
| 30 | 30 |