3 #==============================================================================
7 # Description : bash configuration file
8 #==============================================================================
10 #------ Export ----------------------------------------------------------------
14 stty
-ixon # Disable ctrl-s and ctrl-q.
16 #------ ALIAS -----------------------------------------------------------------
27 alias mkdir
='mkdir -p'
28 alias mk
="makepkg -sri"
29 alias f
="~/.scripts/find.sh"
30 alias fw
="~/.scripts/find_word.sh"
31 alias fr
="~/.scripts/find_replace_word.sh"
32 alias xc
='xclip -sel clip <'
34 if [[ "$OSTYPE" == "openbsd"* ]]; then
35 alias lsb
="dmesg | egrep '^(cd|wd|sd|fd). at '"
39 if [[ "$OSTYPE" == "linux-gnu" ]]; then
40 alias ll
='ls -lahG --color=auto --group-directories-first'
41 alias pm
="sudo pacman"
42 alias pmu
="sudo pacman -Syyu"
43 alias pmo
="sudo pacman -Rns $(pacman -Qtdq)"
44 alias pmr
="sudo pacman -Rns"
45 alias aur
="yaourt -Qm --aur"
46 alias grep="grep --color=always"
47 export GREP_COLOR
="30;47"
51 alias vimrc
="vim ~/.vimrc"
52 alias bashrc
="vim ~/.bashrc"
53 alias dwmrc
="cd /mnt/data/dev/suckless/dwm-6.2/; vim config.def.h;"
54 alias blockrc
="cd /mnt/data/dev/suckless/dwmblocks/; vim blocks.h;"
56 alias gdiff
="~/.scripts/create_diff_git.sh"
57 alias github
="eval \"$(ssh-agent -s)\"; ssh-add ~/.ssh/github"
59 alias ya
="youtube-dl -i --add-metadata -f bestaudio"
60 alias yv
="youtube-dl -i --add-metadata -f webm"
61 alias yvp
="youtube-dl -i --add-metadata -f webm -o \"%(autonumber)s-%(title)s.%(ext)s\""
62 # alias curlf="xargs -n 1 curl -O < "
63 # alias wgetf="wget -i filename.txt"
65 #------ PROMPT ----------------------------------------------------------------
72 dgrey
="$esc[38;5;233m\]"
73 dgrey2
="$esc[38;5;234m\]"
74 gold
="$esc[38;5;214m\]"
75 gold2
="$esc[38;5;94m\]"
76 green
="$esc[38;5;2m\]"
77 orange
="$esc[38;5;166m\]"
78 blue2
="$esc[38;5;24m\]"
80 bg_black
="$esc[48;5;0m\]"
81 bg_dgrey
="$esc[48;5;233m\]"
82 bg_dgrey2
="$esc[48;5;234m\]"
83 bg_gold
="$esc[48;5;214m\]"
84 bg_gold2
="$esc[48;5;94m\]"
85 bg_blue
="$esc[48;5;27m\]"
86 bg_red
="$esc[48;5;88m\]"
87 bg_mag
="$esc[48;5;53m\]"
88 bg_green
="$esc[48;5;2m\]"
89 bg_orange
="$esc[48;5;166m\]"
90 bg_blue2
="$esc[48;5;24m\]"
92 # gitbranch="\$(__git_ps1 ' %s ')"
93 gitbranch
="\$(__git_ps1 ' %s ')"
107 export PS1
="$dir_fg$dir_bg \W $branch_bg$dir_bgc$sep$branch_fg$gitbranch$restore$user_bgc$sep$restore "
109 #------ HISTORY CONFIG --------------------------------------------------------
110 export HISTSIZE
=10000
111 export HISTFILESIZE
=10000
112 export HISTTIMEFORMAT
='%b %d %I:%M %p '
113 export HISTCONTROL
=ignoreboth
114 export HISTIGNORE
="history:pwd:exit:df:ls:ls -lahG:ll"
115 export HISTFILE
=~
/.cache
/.bash_history
117 #------ Archive extractor -----------------------------------------------------
121 *.
tar.bz2
) tar xjf
$1 ;;
122 *.
tar.gz
) tar xzf
$1 ;;
123 *.
tar.xz
) tar xf
$1 ;;
129 *.tbz2
) tar xjf
$1 ;;
134 *) echo "'$1' cannot be extracted via ex()";;
137 echo "'$1' is not a valid file"
141 #------ GIT -------------------------------------------------------------------
142 if [ -f ~
/.git-completion.bash
]; then
143 source ~
/.git-completion.bash
146 if [ -f ~
/.git-prompt.sh
]; then
147 source ~
/.git-prompt.sh
150 #------ MAN -------------------------------------------------------------------
151 export LESS_TERMCAP_mb
=$
'\e[1;32m'
152 export LESS_TERMCAP_md
=$
'\e[1;32m'
153 export LESS_TERMCAP_so
=$
'\e[01;44;37m'
154 export LESS_TERMCAP_us
=$
'\e[1;4;31m'
155 export LESS_TERMCAP_me
=$
'\e[0m'
156 export LESS_TERMCAP_se
=$
'\e[0m'
157 export LESS_TERMCAP_ue
=$
'\e[0m'