Organize bashrc
This commit is contained in:
parent
9aa7a87d05
commit
d826f88f9a
79
.bashrc
79
.bashrc
@ -1,6 +1,7 @@
|
||||
###############################################################################
|
||||
# Tyler Perkins
|
||||
# .bashrc
|
||||
# .bashrc - My shell configuration
|
||||
|
||||
# Test for an interactive shell. There is no need to set anything
|
||||
# past this point for scp and rcp, and it's important to refrain from
|
||||
# outputting anything in those cases.
|
||||
@ -8,7 +9,11 @@ if [[ $- != *i* ]] ; then
|
||||
# Shell is non-interactive. Be done now!
|
||||
return
|
||||
fi
|
||||
#
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Conda Setup #################################################################
|
||||
###############################################################################
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('/home/tyler/code/miniconda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
|
||||
@ -23,41 +28,44 @@ else
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Export common environment ###################################################
|
||||
###############################################################################
|
||||
|
||||
# Set a huge history file
|
||||
HISTSIZE=20000
|
||||
HISTFILESIZE=30000
|
||||
|
||||
|
||||
#vi mode
|
||||
#set -o vi
|
||||
|
||||
# Put your fun stuff here.
|
||||
|
||||
#add .cargo/bin to path
|
||||
# add .cargo/bin to path
|
||||
export PATH="/home/tyler/.cargo/bin:$PATH"
|
||||
export PATH="/home/tyler/.local/bin:$PATH"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
#use vim as editor
|
||||
# use vim as editor
|
||||
export EDITOR="/usr/bin/vim"
|
||||
|
||||
#pyenv
|
||||
# pyenv
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PATH="$PYENV_ROOT/versions/bin/3.8.12/bin:$PATH"
|
||||
|
||||
#proton work directory set as enviroment var
|
||||
# proton work directory set as enviroment var
|
||||
export STEAM_COMPAT_DATA_PATH=~/.proton/
|
||||
export STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.steam/steam/steamapps/common/Proton\ 6.3/
|
||||
|
||||
# Pico programming
|
||||
export PICO_SDK_PATH=/home/tyler/code/pico/pico-sdk
|
||||
|
||||
# General environment variables
|
||||
# Kubernetes (kubectl) configuration file
|
||||
export KUBECONFIG=~/.kube/config
|
||||
|
||||
#eval "$(register-python-argcomplete pmbootstrap)"
|
||||
# Gpg keep key session to this TTY
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
#alias set
|
||||
###############################################################################
|
||||
# Convience Aliases ###########################################################
|
||||
###############################################################################
|
||||
|
||||
# alias set
|
||||
alias ls="ls --color"
|
||||
alias l="ls -al"
|
||||
alias lt="ls --human-readable --size -S --classify"
|
||||
@ -87,28 +95,42 @@ alias arduino=" arduino"
|
||||
alias logisim-evolution="_JAVA_AWT_WM_NONREPARENTING=1 logisim-evolution"
|
||||
alias vifm="vifmrun"
|
||||
alias f="vifm"
|
||||
alias new-motd="vim /home/tyler/.desktop/alarm/motd.txt"
|
||||
alias new-motd="vim $HOME/.desktop/alarm/motd.txt"
|
||||
|
||||
alias disable-alarm=". /home/tyler/.desktop/alarm/disable-alarm.sh"
|
||||
|
||||
if [ -f $HOME/.sdkman/bin/sdkman-init.sh ]; then
|
||||
source $HOME/.sdkman/bin/sdkman-init.sh
|
||||
fi
|
||||
alias disable-alarm=". $HOME/.desktop/alarm/disable-alarm.sh"
|
||||
|
||||
which doas > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
alias sudo="doas"
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# Misc Configurations #########################################################
|
||||
###############################################################################
|
||||
|
||||
# Setup sdkman
|
||||
if [ -f $HOME/.sdkman/bin/sdkman-init.sh ]; then
|
||||
source $HOME/.sdkman/bin/sdkman-init.sh
|
||||
fi
|
||||
|
||||
# Change shell character based on root/user
|
||||
if [ "$UID" -eq 0 ]; then
|
||||
export PS1="\033[1m\e[0;97m[\e[0;32m\u\e[0;97m@\e[0;31m\h \e[0;97m(\D{}) \w]\n# \033[0m"
|
||||
else
|
||||
export PS1="\033[1m\e[0;97m[\e[0;32m\u\e[0;97m@\e[0;31m\h \e[0;97m(\D{}) \w]\n$ \033[0m"
|
||||
fi
|
||||
|
||||
export KUBECONFIG=~/.kube/config
|
||||
export GPG_TTY=$(tty)
|
||||
# Custom command autocompletions
|
||||
PROG=tea source "$HOME/.config/tea/autocomplete.sh"
|
||||
PROG=pass source "$HOME/.local/bin/pass-completion.sh"
|
||||
|
||||
# Store history after every command
|
||||
shopt -s histappend
|
||||
PROMPT_COMMAND="history -a; history -c; history -r;$PROMPT_COMMAND"
|
||||
|
||||
###############################################################################
|
||||
# Shell welcome prompt ########################################################
|
||||
###############################################################################
|
||||
|
||||
#display colors
|
||||
_PROMPT_GREEN_='\033[1;32m'
|
||||
@ -119,14 +141,5 @@ _PROMPT_VAR_='\033[0;31m'
|
||||
echo -e "${_PROMPT_HEAD_}#########################"
|
||||
echo -e "${_PROMPT_HEAD_}#Welcome ${_PROMPT_VAR_}$(whoami)"
|
||||
echo -e "${_PROMPT_HEAD_}#EIp : ${_PROMPT_VAR_}$(ifconfig eth0 | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')"
|
||||
#echo -e "${_PROMPT_HEAD_}#WIp : ${_PROMPT_VAR_}$(ifconfig wlo1 | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')"
|
||||
#echo -e "${_PROMPT_HEAD_}#PIp : ${_PROMPT_VAR_}$(curl -s ipinfo.io/ip)"
|
||||
echo -e "${_PROMPT_HEAD_}#Time: ${_PROMPT_VAR_}$(date +"%T")"
|
||||
echo -e "${_PROMPT_HEAD_}#${_PROMPT_VAR_}\x1b[3m $(shuf -n 1 ~/.desktop/messages.txt) "
|
||||
|
||||
shopt -s histappend
|
||||
PROMPT_COMMAND="history -a; history -c; history -r;$PROMPT_COMMAND"
|
||||
|
||||
PROG=tea source "$HOME/.config/tea/autocomplete.sh"
|
||||
PROG=pass source "$HOME/.local/bin/pass-completion.sh"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user