# ~/.bashrc
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
stty -ixon
LANGUAGE=en_US
LANG=en_US.UTF-8
# BEGIN STARTUP PROFILER
# PS4='+ $(date "+%s.%N")\011 '
# exec 3>&2 2>/tmp/bashstart.$$.log
# set -x
HISTCONTROL=ignoreboth
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=20000
OS=`uname -s`
stty -ixon
export H="$HOME"
mebin="$H/m/b"
if [ -f $HOME/.environment_variables ]; then
source $HOME/.environment_variables
fi
if [ "$NEWENVED" != 'true' ]; then
export PATH="$mebin:$H/.local/share/fnm:$PATH"
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
## LANGUAGE SUPPORT LOADERS
[[ -s "$H/.cargo/env" ]] && source "$H/.cargo/env"
[[ -s "$H/.gvm/scripts/gvm" ]] && source "$H/.gvm/scripts/gvm"
eval "`fnm env`"
fi
export NEWENVED='true'
PS1='λ\wλ'
set -o vi
alias imladris="/usr/bin/git --git-dir=$HOME/.rivendell/ --work-tree=$HOME"
alias gga="git add"
alias gag="git add"
alias ggb='git branch --sort=-committerdate | head -10'
alias ggc="git commit -m"
alias ggd="git diff"
alias ggl="git log"
alias ggp="git push"
alias ggs="git status"
alias ggt="git tag"
alias ggh="git checkout"
export DDGR_COLORS="xXXxxx"
export CLICOLOR="0"
export CLICOLOR_FORCE="0"
function grenv {
env | grep -i "$@"
}
alias rgs="clear && rg"
alias r="clear && rg"
alias nw="source ~/.profile"
alias vrc='v ~/.bashrc'
alias vd='v ~/m/do'
alias mr='make run'
alias feh='feh --magick-timeout 1'
alias ghostscript="/usr/bin/gs"
alias gs="echo oops, did you mean rg? use 'ghostscript' if you wanted gs as in ghostscript"
alias fd="fdfind"
alias update="sudo apt update"
alias install="sudo apt install"
alias upgrade="sudo apt upgrade"
function zoomy() { open "zoommtg://zoom.us/join?action=join&confno=$1";}
function diezoom() { ps aux | grep [z]oom | cut -c12-16 | xargs kill ;}
# Linux environment setup
if [ $OS = Linux ]; then
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
alias ls='ls --width=100 --color=auto'
fi
# Mac environment setup
if [ $OS = Darwin ]; then
export p_user="/Users/$(whoami)"
. $HOME/.bashrc_apple
fi
export VISUAL="$(which v)"
export EDITOR="$VISUAL"
__history__() {
tac ~/.bash_history | sk
}
bind -m emacs-standard -x '"\C-r": __history__'
bind -m vi-command -x '"\C-r": __history__'
bind -m vi-insert -x '"\C-r": __history__'
alias hosty="cat /etc/hostname"
# set +x
# exec 2>&3 3>&-
# END STARTUP PROFILER