Dotfiles/.bashrc
Emma Nora Theuer d8a925cdc7 Initial commit
2024-05-26 22:45:08 +02:00

103 lines
2.2 KiB
Bash

#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Terminal Startup
neofetch
# VI-Mode
set -o vi
bind -m vi-command 'Control-l: clear-screen'
bind -m vi-insert 'Control-l: clear-screen'
# Extracting archives
function ex () {
if [ -f $1 ]; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.tar.xz) tar xf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# Boop a website
function boop() {
ping $@ | sed -E 's/PING/BOOP/;s/[^0-9]*.bytes/ beeps/'
}
# Exports
export PAGER=bat
export EDITOR=nvim
export VISUAL="emacsclient -c -a 'emacs'"
export MAKEFLAGS="-j32"
export -f ex
export -f boop
export PATH=$PATH:/home/emma/.emacs.d/bin/
export PATH=$PATH:/home/emma/.local/bin/
# Shopt
shopt -s autocd
# Listing stuff
alias ls='eza --color=always --group-directories-first'
alias la='eza -a --color=always --group-directories-first'
alias ll='eza -lah --color=always --group-directories-first'
alias l.='eza -a | grep "^\."'
#Make things readable
alias top=htop
alias df='df -h'
alias grep='grep --color=always'
# Memes
alias meow='cat'
alias wanna-fuck-me-now='echo "I use Gentoo btw" | cowsay | lolcat'
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
# Typo correctors
alias eixt=exit
alias exti=exit
alias xeit=exit
alias exot=exit
alias exir=exit
alias exut=exit
alias rxit=exit
alias exto=exit
alias :q=exit
alias :q!=exit
alias :wq=exit
alias oiweriff=poweroff
# Package Management aliases
alias fullsys='doas emerge --sync && doas emerge -auDN @world && doas emerge --depclean' # Updates everything on the system
alias remorph='doas emerge --depclean' # Removes orphaned packages
alias checkfetch='doas tail -f /var/log/emerge-fetch.log'
# Emacs Aliases
alias emacs='emacsclient -c -a "emacs"'
alias emanw='emacs -nw'
alias vim=nvim
# Prompt
PROMPT_COMMAND="mommy -1 -s \$?; $PROMPT_COMMAND"
eval "$(starship init bash)"