-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
63 lines (49 loc) · 1.36 KB
/
Copy path.bashrc
File metadata and controls
63 lines (49 loc) · 1.36 KB
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
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
# Prompt
## Git Status
gitstat () {
GitStatus=""
Gs=$(git status -s 2>/dev/null)
Gb=$(git branch --show-current 2>/dev/null)
if [ "$Gb" != '' ]
then
if [ "$Gs" == '' ]
then
GitBranch="\033[32m $(git branch --show-current 2>/dev/null) \033[0m"
GitStatus="\033[94mgit:[$GitBranch\033[94m] \033[0m"
else
GitBranch="\033[33m $(git branch --show-current 2>/dev/null) \033[0m"
GitStatus="\033[94mgit:[$GitBranch\033[94m] \033[0m"
fi
else
Gitstatus=""
fi
echo -e "$GitStatus"
}
## The prompt
PROMPT_COMMAND='PS1_CMD1=$(gitstat 2>/dev/null)'
PS1='\[\e[96;1m\]\u\[\e[0m\] \[\e[97;1m\]>\[\e[0m\] \[\e[95;1m\]\W\[\e[0m\] \[\e[94;1m\]${PS1_CMD1}\[\e[0m\]'
# Variables
export EDITOR='vim'
export VISUAL='vim'
export PATH="$PATH:/$HOME/.local/bin"
# Aliases
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias xcpy="xsel -ib"
alias xpst="xsel -ob"
alias ls="lsd"
alias la="ls -al"
alias ll="ls -l"
alias ff="fastfetch --kitty-icat ~/Pictures/.pp/neofetch.png"
alias vi="vim"
alias watch="watch -n 0.5 -t"
alias reset="source ~/.bashrc"
alias tmuxa="tmux attach-session"
alias tmuxk="tmux kill-session -t"
alias arpscan="arp-scan --localnet"