dotfiles/.bashrc

67 lines
2.1 KiB
Bash

#
# ~/.bashrc
#
# ----[Bootstrapping Stuff]----
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Disable ctrl-s/ctrl-q
stty -ixon
# Infinite history
HISTSIZE= HISTFILESIZE=
# TODO: Idk?
# [ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" > /dev/null
# ----[Aliases]----
# TODO: Move to .bash_aliases?
alias diff='diff --color=auto'
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"
# ----[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/\&.*$//`"'
# ----[Docker Machine and PS1]----
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]")\$ '
# PS1='[\e[0;32m\u@\h \W\e[m] $(__docker_machine_ps1 " [%s]")\$ '
# PS1='[\u@\h \W]\$ '
# PS1='[\u@cock-and-ball-torture-(_)_)----D~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \W] $(__docker_machine_ps1 " [%s]")\$ '
# ----[SSH Agent]----
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
# ----[Zoom Bullshit]----
function zoomer {
echo $1
xdg-open "zoommtg://zoom.us/join?action=join&confno=$1&zc=2&pwd=$2"
}
# ----[Weather]----
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 -"
# ----[Memes]----
alias thonkstream="ffmpeg -i thonksphere.gif -r 200 -filter_complex loop=loop=-1:size=200 -pix_fmt yuv420p -f v4l2 -s 1920x1080 /dev/video50"
alias record_audio="ffmpeg -f alsa -ac 2 -i default out.mp3"