From 5f55e639bef13025189ea1a3bdb1e6e13c288839 Mon Sep 17 00:00:00 2001 From: Corrado Primier Date: Mon, 12 Jul 2021 00:00:19 +0100 Subject: [PATCH] Add ~.bashrc --- dot_bashrc | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 dot_bashrc diff --git a/dot_bashrc b/dot_bashrc new file mode 100644 index 0000000..cab96ff --- /dev/null +++ b/dot_bashrc @@ -0,0 +1,75 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +CYAN="\[$(tput setaf 4)\]" +RESET="\[$(tput sgr0)\]" + +# Set prompts +PS1="${CYAN}[\u@\h ${RESET}\D{%H:%M}${CYAN} \W]${RESET}\$ " +PS2="> " +[ -z "$PS1" ] && return + +if [[ -n "$DISPLAY" ]] ; then + [[ -n "$TMUX" ]] && export TERM=screen-256color || export TERM=xterm-256color +fi + +export EDITOR="vim" +export GREP_COLOR="1;33" +export GOPATH="$HOME/projects/go" +export HISTCONTROL="ignoredups" +export PATH="$PATH:$HOME/bin:" +export WORKON_HOME="~/.virtualenvs" + +# less colors +export LESS=-R +export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink +export LESS_TERMCAP_md=$'\E[1;36m' # begin bold +export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink +export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video +export LESS_TERMCAP_se=$'\E[0m' # reset reverse video +export LESS_TERMCAP_ue=$'\E[0m' # reset underline +export LESS_TERMCAP_us=$'\E[1;32m' # begin underline + +alias diff="diff --color=auto" +alias grep="grep --color=auto" +alias egrep="egrep --color=auto" +alias gst="git status" +alias ls="ls --color=auto" +alias l="ls" +alias la="ls -a" +alias ll="ls -l" +alias lla="ls -la" +alias mkdir="mkdir -p -v" +alias restricted-vim="rvim -Zi NONE" +alias rot13="tr a-zA-Z n-za-mN-ZA-M" +alias tmux="TERM=screen-256color-bce tmux" +alias updick='/usr/bin/uptime | perl -ne "/(\d+) d/;print 8,q(=)x\$1,\"D\n\""' + +if [[ $(command -v dircolors) ]] ; then + eval $(dircolors -b) +fi + +# Arch linux package search +if [[ $(command -v aura) ]] ; then + function psearch() { + aura -Ss $1 + aura -As $1 + } +fi + +# Base16 Shell +BASE16_SHELL="$HOME/.config/base16-shell/scripts/base16-monokai.sh" +[[ -s $BASE16_SHELL ]] && source $BASE16_SHELL + +# Virtualenv wrapper +[[ -s /usr/bin/virtualenvwrapper.sh ]] && source /usr/bin/virtualenvwrapper.sh + +# AWS +[[ -f $HOME/.aws ]] && source "$HOME/.aws" + +shopt -s autocd +shopt -s checkwinsize