blob: df61f7a9ffe0582ed83cfc8c1c721fad3387e769 (
plain)
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
62
63
64
|
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# PATH
export PATH="$PATH:$(go env GOBIN):$(go env GOPATH)/bin"
export PATH="$HOME/.local/bin:$PATH"
# editor and pager
export EDITOR=nvim
export PAGER='bat --style plain --color always'
# suggest packages on command not found
source /usr/share/doc/pkgfile/command-not-found.bash
# set autocd
shopt -s autocd
# refresh win size after each command
shopt -s checkwinsize
# vi mode
set -o vi
# set history config
HISTCONTROL=ignoreboth
HISTSIZE=10000
HISTFILESIZE=20000
shopt -s histappend
# sends a notification after long running job
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# aliases
alias grep='grep --color=auto'
alias l='ls -alF --color=auto'
alias la='ls -A --color=auto'
alias ls='ls -CF --color=auto'
alias s='cd ..'
alias v=nvim
alias r='source ~/.bashrc'
# PS1
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWSTASHTSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
GIT_PS1_SHOWCONFLICTSTATE=true
GIT_PS1_SHOWCOLORHINTS=true
source ~/.git-prompt.sh
PROMPT_DIRTRIM=4
PS1='\e[0;33m\]\u@\h\e[m\] ∴ \e[0;34m\]\w\e[m\]$(__git_ps1)\n \$ \[\e]0;\a\]'
PS2=' > '
# fastfetch
clear
fastfetch
|