Commit b3e1ca3

xxwhirlpool  ·  2025-07-03 17:00:06 -0400 EDT
parent eb59430
cleanup; refactor a bunch of stuff into bashrc from bin & consolidate some stuff into one bin script
14 files changed,  +71, -35
+0, -3
......@@ -1,3 +0,0 @@
1-#!/bin/bash
2-
3-for f in *.mkv; do ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i "$f" -c:v hevc_nvenc -vtag hvc1 -profile main -preset slow -rc vbr_hq -c:a copy -c:s copy -map 0 "${f%.*} HEVC.mkv"; done
+1, -3
......@@ -3,9 +3,7 @@
33 battery=$(upower -i $(upower -e | grep 'BAT') | awk '/percentage/ {print $NF}' | sed 's/%//g')
44 batteryint=$((battery))
55
6-if (( "$batteryint" < "50" )); then
7- notify-send "battery is under 50%!"
8-elif (( "$batteryint" < "20")); then
6+if (( "$batteryint" < "20")); then
97 notify-send "battery is under 20%!"
108 elif (( "$batteryint" < "10")); then
119 notify-send "battery is under 10%!!! charge ur laptop!!!!"
+0, -3
......@@ -1,3 +0,0 @@
1-#!/bin/bash
2-
3-for f in *.cbr; do unar -d "$f"; done
+20, -0
......@@ -0,0 +1,20 @@
1+#!/bin/bash
2+
3+cbr2cbz() {
4+ for f in *.cbr; do unar -d "$f"; done
5+}
6+
7+dir2cbz() {
8+ for i in */; do zip -r "${i%/}.cbz" "$i"; done
9+}
10+
11+choice() {
12+ choose=$(gum choose "cbr2cbz" "dir2cbz")
13+ case "$choose" in
14+ *cbr2cbz) cbr2cbz;;
15+ *dir2cbz) dir2cbz;;
16+ *) exit;;
17+ esac
18+}
19+
20+choice
+0, -3
......@@ -1,3 +0,0 @@
1-#!/bin/bash
2-
3-for i in */; do zip -r "${i%/}.cbz" "$i"; done
+20, -0
......@@ -0,0 +1,20 @@
1+#!/bin/bash
2+
3+kr() {
4+ unzip -O CP932 $1
5+}
6+
7+jp() {
8+ unzip -O CP932 $1
9+}
10+
11+choice() {
12+ choose=$(gum choose "JP" "KR")
13+ case "$choose" in
14+ *JP) jp ;;
15+ *KR) kr ;;
16+ *) exit;;
17+ esac
18+}
19+
20+choice
+0, -4
......@@ -1,4 +0,0 @@
1-#!/bin/bash
2-# news from getnews.tech
3-
4-curl us.getnews.tech/category=general,n=5,nocolor
+0, -3
......@@ -1,3 +0,0 @@
1-#!/bin/bash
2-
3-date +%s | sha256sum | base64 | head -c 40 ; echo
+0, -3
......@@ -1,3 +0,0 @@
1-#!/bin/bash
2-
3-git push bytes main && cd /home/kat/Documents/Code/Git/-mine/astro-eunoia/eunoia/src/utils && node git-changelog.js
+0, -3
......@@ -1,3 +0,0 @@
1-#!/bin/bash
2-
3-unzip -O CP932 $1
+0, -3
......@@ -1,3 +0,0 @@
1-#!/bin/bash
2-
3-unzip -O CP949 $1
+0, -3
......@@ -1,3 +0,0 @@
1-#!/bin/bash
2-
3-for f in *.mp4; do ffmpeg -i "$f" '%04d.png'; done
+0, -4
......@@ -1,4 +0,0 @@
1-#!/bin/sh
2-# weather from wttr.in
3-
4-curl https://wttr.in/New+York?F1uq
+30, -0
......@@ -40,3 +40,33 @@ export FZF_DEFAULT_OPTS=" \
4040 # lazy ass way for me to get my idol mp3s from youtube
4141 # usage: ytmp3 url
4242 alias ytmp3="yt-dlp -f ba -x --audio-format mp3"
43+
44+# some cd bookmarks
45+alias dotf="cd /home/kat/dotfiles"
46+alias gmine="cd /home/kat/Documents/Git/-mine"
47+
48+# weather stuff
49+alias wttr="curl https://wttr.in/New+York?F0AS"
50+alias weather=wttr
51+
52+alias wttrlg="curl https://wttr.in/New+York?F1uq"
53+alias weatherlg=wttrlg
54+
55+alias sun="daylight --short --timezone='America/New_York' | lolcat"
56+
57+# print internal & external IPs
58+function whatip() {
59+ # internal
60+ echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}'
61+ # external
62+ echo -n "external IP: " | lolcat -p 0.7; curl -4 icanhazip.com
63+}
64+
65+# password generator. takes input for password length by number
66+function passgen() {
67+ PASSLENGTH=$(gum input --placeholder "type a number")
68+ date +%s | sha256sum | base64 | head -c $PASSLENGTH ; echo
69+}
70+
71+# used to be a ~/.local/bin entry but that was dumb
72+alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-astro/src/utils && node git-changelog.js"