3 #==============================================================================
9 #==============================================================================
12 #------ Export ----------------------------------------------------------------
16 stty
-ixon # Disable ctrl-s and ctrl-q.
18 #------ ALIAS -----------------------------------------------------------------
20 alias ll
='ls -lahG --color=auto --group-directories-first'
30 alias mkdir
='mkdir -p'
31 alias mk
="makepkg -sri"
32 alias f
="~/.scripts/find.sh"
33 alias fw
="~/.scripts/find_word.sh"
34 alias fr
="~/.scripts/find_replace_word.sh"
35 alias xc
='xclip -sel clip <'
37 alias pm
="sudo pacman"
38 alias pmu
="sudo pacman -Syyu"
39 alias pmo
="sudo pacman -Rns $(pacman -Qtdq)"
40 alias pmr
="sudo pacman -Rns"
43 alias vimrc
="vim ~/.vimrc"
44 alias bashrc
="vim ~/.bashrc"
45 alias dwmrc
="cd /mnt/data/dev/suckless/dwm-6.2/; vim config.def.h;"
46 alias blockrc
="cd /mnt/data/dev/suckless/dwmblocks/; vim blocks.h;"
48 alias gdiff
="/home/hassan/.scripts/create_diff_git.sh"
49 alias github
="eval \"$(ssh-agent -s)\"; ssh-add /home/hassan/.ssh/github"
51 alias ya
="youtube-dl -i --add-metadata -f bestaudio"
52 alias yv
="youtube-dl -i --add-metadata -f webm"
53 alias yvp
="youtube-dl -i --add-metadata -f webm -o \"%(autonumber)s-%(title)s.%(ext)s\""
55 #------ PROMPT ----------------------------------------------------------------
63 dgrey
="$esc[38;5;233m\]"
64 dgrey2
="$esc[38;5;234m\]"
65 gold
="$esc[38;5;214m\]"
66 gold2
="$esc[38;5;94m\]"
67 green
="$esc[38;5;2m\]"
68 orange
="$esc[38;5;166m\]"
69 blue2
="$esc[38;5;24m\]"
71 bg_black
="$esc[48;5;0m\]"
72 bg_dgrey
="$esc[48;5;233m\]"
73 bg_dgrey2
="$esc[48;5;234m\]"
74 bg_gold
="$esc[48;5;214m\]"
75 bg_gold2
="$esc[48;5;94m\]"
76 bg_blue
="$esc[48;5;27m\]"
77 bg_red
="$esc[48;5;88m\]"
78 bg_mag
="$esc[48;5;53m\]"
79 bg_green
="$esc[48;5;2m\]"
80 bg_orange
="$esc[48;5;166m\]"
81 bg_blue2
="$esc[48;5;24m\]"
83 gitbranch
="\$(__git_ps1 ' %s ')"
97 export PS1
="$dir_fg$dir_bg \W $branch_bg$dir_bgc$sep$branch_fg$gitbranch$restore$user_bgc$sep$restore "
99 #------ HISTORY CONFIG --------------------------------------------------------
101 export HISTSIZE
=10000
102 export HISTFILESIZE
=10000
103 export HISTTIMEFORMAT
='%b %d %I:%M %p '
104 export HISTCONTROL
=ignoreboth
105 export HISTIGNORE
="history:pwd:exit:df:ls:ls -lahG:ll"
106 export HISTFILE
=~
/.cache
/.bash_history
108 #------ GREP COLOR CODE -------------------------------------------------------
110 alias grep="grep --color=always"
111 export GREP_COLOR
="30;47"
113 #------ Archive extractor -----------------------------------------------------
118 *.
tar.bz2
) tar xjf
$1 ;;
119 *.
tar.gz
) tar xzf
$1 ;;
120 *.
tar.xz
) tar xf
$1 ;;
126 *.tbz2
) tar xjf
$1 ;;
131 *) echo "'$1' cannot be extracted via ex()";;
134 echo "'$1' is not a valid file"
138 #------ GIT -------------------------------------------------------------------
140 if [ -f /home
/hassan
/.git-completion.bash
]; then
141 source /home
/hassan
/.git-completion.bash
144 if [ -f /home
/hassan
/.git-prompt.sh
]; then
145 source /home
/hassan
/.git-prompt.sh
148 #------ MAN -------------------------------------------------------------------
150 export LESS_TERMCAP_mb
=$
'\e[1;32m'
151 export LESS_TERMCAP_md
=$
'\e[1;32m'
152 export LESS_TERMCAP_so
=$
'\e[01;44;37m'
153 export LESS_TERMCAP_us
=$
'\e[1;4;31m'
154 export LESS_TERMCAP_me
=$
'\e[0m'
155 export LESS_TERMCAP_se
=$
'\e[0m'
156 export LESS_TERMCAP_ue
=$
'\e[0m'