Commit 2b67d23

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