dotfiles/.bashrc

68 lines
2.1 KiB
Bash
Raw Normal View History

2021-12-03 00:01:50 -05:00
#
# ~/.bashrc
#
2021-12-03 00:41:17 -05:00
# ----[Bootstrapping Stuff]----
2021-12-03 00:01:50 -05:00
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
2021-12-03 00:41:17 -05:00
# Disable ctrl-s/ctrl-q
stty -ixon
2021-12-03 00:01:50 -05:00
2021-12-03 00:41:17 -05:00
# Infinite history
HISTSIZE= HISTFILESIZE=
2021-12-03 00:01:50 -05:00
2021-12-03 00:41:17 -05:00
# TODO: Idk?
# [ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" > /dev/null
# ----[Aliases]----
# TODO: Move to .bash_aliases?
2021-12-03 00:01:50 -05:00
alias diff='diff --color=auto'
2021-12-03 00:41:17 -05:00
alias grep='grep --color=auto'
alias ls='ls --color=auto --group-directories-first'
# TODO: Does this go here?
alias make="make -j$(nproc)"
alias rm="rm -I"
alias sl="sl | lolcat"
alias vim="nvim"
2021-12-03 00:01:50 -05:00
2021-12-03 00:41:17 -05:00
# ----[Macros]----
alias clean_packages="sudo pacman -Rsn $(pacman -Qdtq)"
alias creationdate="stat -c '%w'"
alias fixdirectories='find . -type d -exec chmod 755 {} \;'
alias fixfiles='find . -type f -exec chmod 644 {} \;'
alias reload_wallpaper="xwallpaper --stretch .config/wallpaper.png"
alias stealyt='youtube-dl "`xclip -o | sed s/\&.*$//`"'
2021-12-03 00:01:50 -05:00
2021-12-03 00:41:17 -05:00
# ----[Docker Machine and PS1]----
2021-12-03 00:01:50 -05:00
source /usr/share/bash-completion/completions/docker-machine-prompt
source /usr/share/bash-completion/completions/docker-machine-wrapper
PS1='[\u@\h \W] $(__docker_machine_ps1 " [%s]")\$ '
2021-12-03 00:41:17 -05:00
# PS1='[\e[0;32m\u@\h \W\e[m] $(__docker_machine_ps1 " [%s]")\$ '
# PS1='[\u@\h \W]\$ '
2021-12-03 00:01:50 -05:00
# PS1='[\u@cock-and-ball-torture-(_)_)----D~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \W] $(__docker_machine_ps1 " [%s]")\$ '
2021-12-03 00:41:17 -05:00
# ----[SSH Agent]----
2021-12-03 00:01:50 -05:00
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! "$SSH_AUTH_SOCK" ]]; then
eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")"
fi
2021-12-03 00:41:17 -05:00
# ----[Zoom Bullshit]----
2021-12-03 00:01:50 -05:00
function zoomer {
echo $1
xdg-open "zoommtg://zoom.us/join?action=join&confno=$1&zc=2&pwd=$2"
}
2021-12-03 00:41:17 -05:00
# ----[Weather]----
2021-12-03 00:01:50 -05:00
alias weather="curl wttr.in"
# alias radar="wget https://www.weather.gov/images/mlb/88d/KMLB_radar_loop.gif -O/tmp/radar.gif; mpv --no-osc /tmp/radar.gif"
alias radar="wget https://www.weather.gov/images/mlb/88d/KMLB_radar_loop.gif -O- | mpv --no-osc --loop=yes -"
2021-12-03 00:41:17 -05:00
# ----[Memes]----
2021-12-03 00:01:50 -05:00
alias thonkstream="ffmpeg -i thonksphere.gif -r 200 -filter_complex loop=loop=-1:size=200 -pix_fmt yuv420p -f v4l2 -s 1920x1080 /dev/video50"
2021-12-03 00:41:17 -05:00
alias record_audio="ffmpeg -f alsa -ac 2 -i default out.mp3"