-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
61 lines (54 loc) · 1.54 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
export LESSHISTFILE="~/.config/.lesshst"
export EDITOR=vim
# Prompt
GREEN="$(tput setaf 2)"
RED="$(tput setaf 1)"
RESET="$(tput sgr0)"
exitstatus()
{
RETURN=$?
if [[ ${RETURN} == 0 ]]; then
echo ""
else
echo "$(echo -e \\001)${RED}$(echo -e \\002)${RETURN}"
fi
}
export PS1="[\[${GREEN}\]\u\[${RESET}\] \w]\$(exitstatus)\$ \[${RESET}\]"
# Aliases
alias l='ls --color=auto -gohAp --group-directories-first'
alias grep='grep --color=auto'
alias diff='diff --color=auto'
alias gdb='gdb -q'
alias py='python3'
alias jn='jupyter notebook'
alias ip='ip -c'
alias tmux='tmux -2'
alias cal='cal -m3'
alias sc='systemctl'
alias rex='pkill xcape ; xcape'
alias packer='packer --noedit'
alias sudo='sudo '
alias watch='watch '
alias bc='bluetoothctl'
alias feh='feh --keep-zoom-vp --scale-down -B black'
# Less coloring
export LESS=-R
export LESS_TERMCAP_mb=$'\e[1;31m' # begin bold
export LESS_TERMCAP_md=$'\e[1;33m' # begin blink
export LESS_TERMCAP_so=$'\e[01;44;37m' # begin reverse video
export LESS_TERMCAP_us=$'\e[01;30m' # begin underline
export LESS_TERMCAP_me=$'\e[0m' # reset bold/blink
export LESS_TERMCAP_se=$'\e[0m' # reset reverse video
export LESS_TERMCAP_ue=$'\e[0m' # reset underline
# Running ssh-agent
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent > ~/.config/.ssh-agent
fi
if [[ "$SSH_AGENT_PID" == "" ]]; then
eval "$(<~/.config/.ssh-agent)" > /dev/null
fi
source ~/config/.bashrc.local