bashrc: Organiation

This commit is contained in:
Bill Niblock 2017-07-05 14:43:45 -04:00
parent ae5cd4266a
commit 0025ac3652

View file

@ -1,46 +1,54 @@
# .bashrc #-----------------------------------------------------------------------------#
# General Bash Configuration File ## source ~/.bashrc ## niblock ##
#-----------------------------------------------------------------------------#
# Source global definitions # Source global definitions
if [ -f /etc/bashrc ]; then if [ -f /etc/bashrc ]; then
. /etc/bashrc . /etc/bashrc
fi fi
# Add Gems to path #-----------------------------------------------------------------------------#
if which ruby >/dev/null && which gem >/dev/null; then # Prompt
PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH" #-----------------------------------------------------------------------------#
fi
# Add Python projects to path
PYTHONPATH="${PYTHONPATH}:/home/niblock/Lab/gomez_audit"
export PYTHONPATH #-----------------------------------------------------------------------------#
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# complete -cf sudo
######
# Aliases # Aliases
### #-----------------------------------------------------------------------------#
alias tssh="source ~/.ssh/auth_ssh; ssh -A"
complete -F _ssh tssh
###### #-----------------------------------------------------------------------------#
# Functions # Functions
### #-----------------------------------------------------------------------------#
#If redshift wasn't automatically started, this will do it #If redshift wasn't automatically started, this will do it
function tint(){ function tint(){
redshift -l 42.8864500:-78.8783700 -t 5000:4000 & redshift -l 42.8864500:-78.8783700 -t 5000:4000 &
} }
#Wrapper function for livestreamer script # Function for keeping ssh-agent happy
function live(){ function yssh(){
case $1 in echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" > ~/.ssh/auth_ssh
'twitch' ) livestreamer twitch.tv/$2 best & ;;
'yt' | 'youtube' ) livestreamer $2 best & ;;
* ) echo "Not an option, try again." ;;
esac
} }
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting #-----------------------------------------------------------------------------#
# Path
#-----------------------------------------------------------------------------#
# Ruby Gems
if which ruby >/dev/null && which gem >/dev/null; then
PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH"
fi
# RVM
PATH="$HOME/.rvm/bin:$PATH"
# Add Python projects to path
PYTHONPATH="${PYTHONPATH}:/home/niblock/Lab/gomez_audit"
export PYTHONPATH
export PATH
export SSH_AUTH_SOCK=$HOME/.yubiagent/sock