-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
executable file
·91 lines (72 loc) · 2.15 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
81
82
83
84
85
86
87
88
89
90
91
### EXPORT
. ~/.bash_profile
export TERM="xterm-256color" # getting proper colors
export DISPLAY=:1
export EDITOR="vim"
export HISTCONTROL=ignoredups:erasedups:ignorespace # no duplicate entries
#colorscript -e illumina
## CHANGE TITLE OF TERMINALS
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|alacritty|st|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
;;
esac
shopt -s autocd # autocd when entering just a path
#shopt -s checkwinsize
up () {
local d=""
local limit="$1"
# Default to limit of 1
if [ -z "$limit" ] || [ "$limit" -le 0 ]; then
limit=1
fi
for ((i=1;i<=limit;i++)); do
d="../$d"
done
# perform cd. Show error if cd fails
if ! cd "$d"; then
echo "Couldn't go up $limit dirs.";
fi
}
#bash insulter
if [ -f /etc/bash.command-not-found ]; then
. /etc/bash.command-not-found
fi
# aliases
#git
alias addup='git add -u '
alias addall='git add . '
alias branch='git branch '
alias checkout='git checkout '
alias delbra='git branch -D '
alias clone='git clone '
#alias commit='git commit -m '
alias fetch='git fetch '
alias pull='git pull origin '
alias push='git push origin '
alias stat='git status ' # 'status' is protected name so using 'stat' instead
alias ls="ls --color=auto"
alias la="ls -a --color=auto"
alias v="vim"
alias n="nvim"
# alias termlog="loginctl terminate user ceaser"
alias ls="ls --color=auto"
# alias hiber_="systemctl hibernate"
alias cls="clear"
alias checkint="ping archlinux.org -c3"
alias pacup="sudo pacman -Syu"
alias "anser"="adb shell pm list packages| grep " #to search for apps through adb/pm
alias "andel"="adb shell pm uninstall -k --user 0 " #to remove apps through adb
alias fm=ranger #ranger
alias lg=lazygit #for lazygit
#bluetooth
alias aircon="bluetoothctl connect 25:A0:0B:9F:C0:13"
alias aircond="bluetoothctl disconnect 25:A0:0B:9F:C0:13"
#for autocompletion based on autocompletion
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
# control panel
#for prompt