- commit
- e3968df
- parent
- 91b710f
- author
- xxwhirlpool
- date
- 2026-04-09 01:13:32 -0400 EDT
add bashrc-tokki; rename bashrc-pc and bashrc-laptop to reflect hostnames
3 files changed,
+206,
-0
R config/.bashrc-pc =>
config/.bashrc-kwangya
+0,
-0
R config/.bashrc-laptop =>
config/.bashrc-mariposa
+0,
-0
+206,
-0
1@@ -0,0 +1,206 @@
2+#!/bin/bash
3+# ~/.bashrc: executed by bash(1) for non-login shells.
4+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
5+# for examples
6+
7+######################################
8+# default stuff i'm scared to change
9+######################################
10+
11+# If not running interactively, don't do anything
12+case $- in
13+ *i*) ;;
14+ *) return;;
15+esac
16+
17+HISTCONTROL=ignoreboth
18+HISTSIZE=1000
19+HISTFILESIZE=2000
20+
21+# append to the history file, don't overwrite it
22+shopt -s histappend
23+
24+# check the window size after each command and, if necessary,
25+# update the values of LINES and COLUMNS.
26+shopt -s checkwinsize
27+
28+# make less more friendly for non-text input files, see lesspipe(1)
29+[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
30+
31+# set variable identifying the chroot you work in (used in the prompt below)
32+if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
33+ debian_chroot=$(cat /etc/debian_chroot)
34+fi
35+
36+# set a fancy prompt (non-color, unless we know we "want" color)
37+case "$TERM" in
38+ xterm-color|*-256color|xterm-kitty) color_prompt=yes;;
39+esac
40+
41+if [ -n "$force_color_prompt" ]; then
42+ if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
43+ # We have color support; assume it's compliant with Ecma-48
44+ # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
45+ # a case would tend to support setf rather than setaf.)
46+ color_prompt=yes
47+ else
48+ color_prompt=
49+ fi
50+fi
51+
52+if [ "$color_prompt" = yes ]; then
53+ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
54+else
55+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
56+fi
57+unset color_prompt force_color_prompt
58+
59+# If this is an xterm set the title to user@host:dir
60+case "$TERM" in
61+xterm*|rxvt*)
62+ PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
63+ ;;
64+*)
65+ ;;
66+esac
67+
68+# enable color support of ls and also add handy aliases
69+if [ -x /usr/bin/dircolors ]; then
70+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
71+ alias ls='ls --color=auto'
72+ alias grep='grep --color=auto'
73+fi
74+
75+# enable programmable completion features (you don't need to enable
76+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
77+# sources /etc/bash.bashrc).
78+if ! shopt -oq posix; then
79+ if [ -f /usr/share/bash-completion/bash_completion ]; then
80+ . /usr/share/bash-completion/bash_completion
81+ elif [ -f /etc/bash_completion ]; then
82+ . /etc/bash_completion
83+ fi
84+fi
85+
86+######################################
87+# aliases
88+######################################
89+
90+# general
91+
92+alias icat="kitten icat"
93+alias bat="batcat"
94+alias cat="bat --paging=never"
95+alias rced="micro ~/.bashrc && source ~/.bashrc"
96+alias ps="ps auxww"
97+alias copy="xclip -sel clipboard"
98+alias open="xdg-open"
99+alias c="clear"
100+alias updupgr="sudo apt update && sudo apt upgrade"
101+alias unfuckwifi="sudo systemctl restart NetworkManager"
102+
103+# some cd bookmarks
104+alias dotf="cd /home/kat/dotfiles"
105+# alias gmine="cd /home/kat/Documents/Git/-mine"
106+
107+# git
108+alias gitall="git remote | xargs -L1 git push --all"
109+alias gyolo="git add . && git commit -m 'yolo'"
110+alias gitd="git diff --staged"
111+alias gitlc="git diff HEAD~"
112+alias gdiff="gitd"
113+alias gits="git status"
114+alias gita="git add ."
115+
116+######################################
117+# variables
118+######################################
119+
120+# set truecolor
121+export COLORTERM=truecolor
122+export MICRO_TRUECOLOR=1
123+
124+# catppuccin colors for fzf
125+export FZF_DEFAULT_OPTS=" \
126+--color=spinner:#F2D5CF,hl:#E78284 \
127+--color=fg:#C6D0F5,header:#E78284,info:#CA9EE6,pointer:#F2D5CF \
128+--color=marker:#BABBF1,fg+:#C6D0F5,prompt:#CA9EE6,hl+:#E78284 \
129+--color=border:#414559,label:#C6D0F5"
130+
131+export FZF_CTRL_T_OPTS="
132+ --walker-skip .git,node_modules,target
133+ --preview 'batcat -n --color=always {}'
134+ --bind 'ctrl-/:change-preview-window(down|hidden|)'"
135+
136+export FZF_ALT_C_OPTS="
137+ --walker-skip .git,node_modules,target
138+ --preview 'tree -C {}'"
139+
140+######################################
141+# functions
142+######################################
143+
144+# print internal & external IPs
145+whatip() {
146+ # internal
147+ echo -n "internal IP: " | lolcat -p 0.7
148+ hostname -I | awk '{print $1}'
149+
150+ # external
151+ echo -n "external IP: " | lolcat -p 0.7
152+ curl -4 icanhazip.com
153+}
154+
155+# password generator. takes input for password length by number
156+passgen() {
157+ PASSLENGTH=$(gum input --placeholder "type a number")
158+ date +%s | sha256sum | base64 | head -c "$PASSLENGTH"; echo
159+}
160+
161+cdmess() {
162+ # from this blog post:
163+ # https://blog.larah.me/mess-directory/
164+ today_tmpdir="${TMPDIR-/tmp}/${USER}_mess/$(date +%F)"
165+ mkdir -p "$today_tmpdir"
166+ cd "$(mktemp -d -p "${today_tmpdir}" XXXX)" || exit 1
167+}
168+
169+# to get quick notifs
170+# after long commands
171+notif() {
172+ notify-send "done!"
173+ paplay /usr/share/sounds/sound-icons/start
174+ spd-say -t female3 -r +25 "done!"
175+}
176+
177+# make & cd into a folder
178+mkcd() {
179+ mkdir -p "$@" && cd "$_" || exit 1;
180+}
181+
182+# shamelessly stolen from evan hahn:
183+# https://evanhahn.com/scripts-i-wrote-that-i-use-all-the-time/#audio-and-video-and-pictures
184+boop() {
185+ local last="$?"
186+ if [[ "$last" == "0" ]]; then
187+ sfx chime
188+ else
189+ sfx bad
190+ fi
191+ eval "$(exit "$last")"
192+}
193+
194+# man by default, fall back to `help`
195+# for shell functions
196+# https://lobste.rs/s/fkr3ha/some_terminal_frustrations#c_70wike
197+man() {
198+ /usr/bin/man "$@" || help "$@" | less
199+}
200+
201+######################################
202+# misc
203+######################################
204+
205+eval "$(starship init bash)"
206+eval "$(fzf --bash)"
207+eval "$(batman --export-env)"