-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
81 lines (62 loc) · 1.93 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
if [ -f ~/.bash/.bashrc_default ]; then
. ~/.bash/.bashrc_default
else
echo "Warning: ~/.bash/.bashrc_default didn't get sourced in '.bashrc' file.";
fi
alias wit='\git --git-dir="${HOME}"/.warfiles/ --work-tree="${HOME}"'
Exists() { which "${1}" &> /dev/null; echo ${?}; }
# Make sudo work with aliases
alias sudo="sudo "
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias lh='ls -Ap1 | egrep "^\..*$"'
alias src='source ~/.bashrc'
alias untar='tar -xvzf'
alias rr='reset'
alias gits='git status'
# -----[ Pacman and Yay ]----- {{{
alias pacman='sudo pacman'
alias p='sudo pacman'
alias pi='sudo pacman -S'
alias pu='sudo pacman -Syu'
alias y='yay'
alias yi='yay -S'
alias yu='yay -Syu'
# Remove a package and its deps that aren't needed by any other installed package.
alias pr='sudo pacman -Rs'
# Show pacman cache.
alias pcache='du -sh /var/cache/pacman/pkg/'
# Clean pacman cache.
alias pclean='sudo pacman -Sc'
# List all packages (pacman and non-AUR).
alias plsa='sudo pacman -Qqe'
# List all pacman ONLY (non-AUR / non-foreign) packages.
alias pls='sudo pacman -Qqen'
# List all non-AUR / non-foreign packages ONLY.
alias yls='sudo pacman -Qqm'
export NORMAL_VIM="vim -p";
export VISUAL="vim -p";
export EDITOR="vim -p";
if [ $(Exists "nvim") -eq 0 ]; then
# If nvim is installed only open nvim when vim is opened.
# Pane mode.
export VISUAL="nvim -p"
export EDITOR="nvim -p";
fi
alias vdiff="\${VISUAL} -d"
alias vi="\${NORMAL_VIM}"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/shahwar/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/shahwar/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/shahwar/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/shahwar/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<