Commit c1e2ca3
chasinglightning
·
2025-07-04 21:01:21 -0400 EDT
parent 67da6a8
update bashrc pc snippet & stow script git remote
2 files changed,
+90,
-24
+89,
-23
1@@ -2,34 +2,42 @@
2 #
3 # from my pc
4
5+eval "$(starship init bash)"
6+
7+export PATH=$PATH:/usr/local/go/bin
8+
9+export NVM_DIR="$HOME/.config/nvm"
10+[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
11+[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
12+
13+alias nano=micro
14 alias sudo="sudo TERMINFO=\"$TERMINFO\" "
15 alias pick='pastel pick'
16 alias fd='fdfind'
17-
18-if [ -f ~/.privatevars ]; then
19- . ~/.privatevars
20-fi
21-
22+alias neofetch="hyfetch"
23+alias fastfetch="hyfetch"
24 alias gitall="git remote | xargs -L1 git push --all"
25+
26+# lazy ass way for me to get my idol mp3s from youtube
27+# usage: ytmp3 url
28+alias ytmp3="yt-dlp -f ba -x --audio-format mp3"
29+
30+# weather stuff
31+alias wttr="curl https://wttr.in/New+York?F0AS"
32+alias weather=wttr
33+
34+alias wttrlg="curl https://wttr.in/New+York?F1uq"
35+alias weatherlg=wttrlg
36+
37+alias sun="daylight --short --timezone='America/New_York' | lolcat"
38+
39+# vpn split tunnel aliases based on a small script @ ~/.local/bin/mvpn
40+alias mftp="mvpn filezilla"
41+alias mterm="mvpn kitty"
42
43-cdmess() {
44- # from this blog post:
45- #
46- # https://blog.larah.me/mess-directory/
47- #
48- today_tmpdir="${TMPDIR-/tmp}/${USER}_mess/$(date +%F)"
49- mkdir -p "$today_tmpdir"
50- cd "$(mktemp -d -p "${today_tmpdir}" XXXX)"
51-}
52-
53-# don't log commands that start with a space
54-export HISTCONTROL=ignorespace
55-
56-# fuzzy find/search thru (recent) bash history
57-hist() {
58- cat ~/.bash_history | fzf | sh
59-}
60-
61+export EDITOR=/usr/bin/micro
62+export "MICRO_TRUECOLOR=1"
63+
64 # catppuccin colors for fzf
65 export FZF_DEFAULT_OPTS=" \
66 --color=spinner:#F2D5CF,hl:#E78284 \
67@@ -37,6 +45,20 @@ export FZF_DEFAULT_OPTS=" \
68 --color=marker:#BABBF1,fg+:#C6D0F5,prompt:#CA9EE6,hl+:#E78284 \
69 --color=border:#414559,label:#C6D0F5"
70
71+cdmess() {
72+ # from this blog post:
73+ # https://blog.larah.me/mess-directory/
74+ #
75+ today_tmpdir="${TMPDIR-/tmp}/${USER}_mess/$(date +%F)"
76+ mkdir -p "$today_tmpdir"
77+ cd "$(mktemp -d -p "${today_tmpdir}" XXXX)"
78+}
79+
80+# fuzzy find/search thru (recent) bash history
81+hist() {
82+ cat ~/.bash_history | fzf | sh
83+}
84+
85 # get a random free port. this is useful for my
86 # insane sysadmin website woman adventures
87 portfree() {
88@@ -48,3 +70,47 @@ portfree() {
89 done
90 echo "$port"
91 }
92+
93+# from http://dotfiles.org/~pseup/.bashrc
94+function extract() {
95+ if [ -f $1 ] ; then
96+ case $1 in
97+ *.tar.bz2) tar xjf $1 ;;
98+ *.tar.gz) tar xzf $1 ;;
99+ *.bz2) bunzip2 $1 ;;
100+ *.rar) rar x $1 ;;
101+ *.gz) gunzip $1 ;;
102+ *.tar) tar xf $1 ;;
103+ *.tbz2) tar xjf $1 ;;
104+ *.tgz) tar xzf $1 ;;
105+ *.zip) unzip $1 ;;
106+ *.Z) uncompress $1 ;;
107+ *.7z) 7z x $1 ;;
108+ *) echo "'$1' cannot be extracted via extract()" ;;
109+ esac
110+ else
111+ echo "'$1' is not a valid file"
112+ fi
113+}
114+
115+# print internal & external IPs
116+function whatip() {
117+ # internal
118+ echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}'
119+ # external
120+ echo -n "external IP: " | lolcat -p 0.7; curl -4 icanhazip.com
121+}
122+
123+# password generator. takes input for password length by number
124+function passgen() {
125+ PASSLENGTH=$(gum input --placeholder "type a number")
126+ date +%s | sha256sum | base64 | head -c $PASSLENGTH ; echo
127+}
128+
129+# cd bookmarks
130+alias dotf="cd /home/kat/Documents/Code/Git/-mine/dotfiles"
131+alias gmine="cd /home/kat/Documents/Code/Git/-mine"
132+
133+alias pusheu="git push bytes main && cd /home/kat/Documents/Code/Git/-mine/astro-eunoia/eunoia/src/utils && node git-changelog.js"
134+
135+alias iconsubfol="find . -mindepth 2 -type f -print -exec mv {} . \;"
M
stow.sh
+1,
-1
1@@ -2,7 +2,7 @@
2
3 echo "pulling from git..." | gum style --foreground "#f4b8e4" --border none
4
5-git pull srht main
6+git pull bytes main
7
8 echo "git pull complete!" | gum style --foreground "#f4b8e4" --border none
9