dots


commit
ce4265f
parent
c1ae38e
author
chasinglightning
date
2025-07-26 20:10:40 -0400 EDT
bashrc cleanup
2 files changed,  +15, -15
M misc/.bashrc-snippets-laptop
+7, -7
 1@@ -25,11 +25,6 @@ cdmess() {
 2 # don't log commands that start with a space
 3 export HISTCONTROL=ignorespace
 4 
 5-# fuzzy find/search thru (recent) bash history
 6-hist() {
 7-	cat ~/.bash_history | fzf | sh
 8-}
 9-
10 # catppuccin colors for fzf
11 export FZF_DEFAULT_OPTS=" \
12 --color=spinner:#F2D5CF,hl:#E78284 \
13@@ -55,7 +50,7 @@ alias weatherlg=wttrlg
14 alias sun="daylight --short --timezone='America/New_York' | lolcat"
15 
16 # print internal & external IPs
17-function whatip() {
18+whatip() {
19 	# internal
20 	echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}'
21 	# external
22@@ -63,7 +58,7 @@ function whatip() {
23 }
24 
25 # password generator. takes input for password length by number
26-function passgen() {
27+passgen() {
28 	PASSLENGTH=$(gum input --placeholder "type a number")
29 	date +%s | sha256sum | base64 | head -c $PASSLENGTH ; echo
30 }
31@@ -74,3 +69,8 @@ alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-ast
32 # vpn split tunnel aliases based on a small script @ ~/.local/bin/mvpn
33 alias mftp="mvpn filezilla"
34 alias mterm="mvpn kitty"
35+
36+# quickly look up a program on cheat.sh
37+cheat() {
38+	curl cheat.sh/"$1"
39+}
M misc/.bashrc-snippets-pc
+8, -8
 1@@ -54,11 +54,6 @@ cdmess() {
 2     cd "$(mktemp -d -p "${today_tmpdir}" XXXX)"
 3 }
 4  
 5-# fuzzy find/search thru (recent) bash history
 6-hist() {
 7-	cat ~/.bash_history | fzf | sh
 8-}
 9- 
10 # get a random free port. this is useful for my
11 # insane sysadmin website woman adventures
12 portfree() {
13@@ -72,7 +67,7 @@ portfree() {
14 }
15  
16 # from http://dotfiles.org/~pseup/.bashrc
17-function extract() {
18+extract() {
19   if [ -f $1 ] ; then
20     case $1 in
21       *.tar.bz2) tar xjf $1 ;;
22@@ -94,7 +89,7 @@ function extract() {
23 }
24  
25 # print internal & external IPs
26-function whatip() {
27+whatip() {
28 	# internal
29 	echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}'
30 	# external
31@@ -102,7 +97,7 @@ function whatip() {
32 }
33  
34 # password generator. takes input for password length by number
35-function passgen() {
36+passgen() {
37 	PASSLENGTH=$(gum input --placeholder "type a number")
38 	date +%s | sha256sum | base64 | head -c $PASSLENGTH ; echo
39 }
40@@ -114,3 +109,8 @@ alias gmine="cd /home/kat/Documents/Code/Git/-mine"
41 alias pusheu="git push bytes main && cd /home/kat/Documents/Code/Git/-mine/astro-eunoia/eunoia/src/utils && node git-changelog.js"
42 
43 alias iconsubfol="find . -mindepth 2 -type f -print -exec mv {} . \;"
44+
45+# quickly look up a program on cheat.sh
46+cheat() {
47+	curl cheat.sh/"$1"
48+}