Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # alias
- alias ll='ls -la --color=auto'
- alias s='ssh'
- alias grep='grep --color=auto'
- # ps1
- function timer_start {
- timer=${timer:-$SECONDS}
- }
- function timer_stop {
- timer_show=$(($SECONDS - $timer))
- unset timer
- }
- trap 'timer_start' DEBUG
- if [ "$PROMPT_COMMAND" == "" ]; then
- PROMPT_COMMAND="timer_stop"
- else
- PROMPT_COMMAND="$PROMPT_COMMAND; timer_stop"
- fi
- # setup term colors
- t_black=$(tput setaf 0)
- t_red=$(tput setaf 1)
- t_green=$(tput setaf 2)
- t_yellow=$(tput setaf 3)
- t_blue=$(tput setaf 33)
- t_pink=$(tput setaf 5)
- t_aqua=$(tput setaf 6)
- t_white=$(tput setaf 7)
- t_grey=$(tput setaf 8)
- t_normal=$(tput sgr0)
- # when tmux colors is 257+
- PS1='\[${t_yellow}\]\u\[${t_grey}\]@\[$(tput setaf 202)\]\h \[$(tput sgr0)\]\[${t_green}\]${timer_show}s \[$(tput bold)\]\[${t_blue}\]\w\[${t_aqua}\] $ \[${t_normal}\]'
- # for when `tmux colors` is 8
- #PS1='\[${t_yellow}\]\u\[${t_blue}\]@\[${t_aqua}\]\h \[${t_normal}\]\[${t_green}\]${timer_show}s \[$(tput bold)\]\[${t_blue}\]\w\[${t_aqua}\] $ \[${t_normal}\]'
- # fixing ubuntu on windows not putting correct dns suffix in resolv.conf
- if [ -f conf/resolv.conf ]; then
- sudo cat conf/resolv.conf | sudo tee -a /etc/resolv.conf
- fi
- # History change(s) (Steve M.'s sauce):
- export HISTTIMEFORMAT="%h %d %H:%M:%S "
- export HISTCONTROL=ignoredups:erasedups
- shopt -s histappend
- export HISTSIZE=500000
- export HISTFILESIZE=999999
- # adding to $PATH for jupyter notebook stuff
- export PATH=$PATH:~/.local/bin/
Add Comment
Please, Sign In to add comment