-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
147 lines (123 loc) · 2.96 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ -f ~/.bashrc_private ]] && source ~/.bashrc_private
[[ -f /usr/share/git/completion/git-completion.bash ]] && source /usr/share/git/completion/git-completion.bash
# alias'
alias ls='ls --color=auto'
alias upgrade='sudo pacman -Syu'
alias please='sudo $(history -p !!)'
alias lyrics='clyrics'
#dotfiles git sync alias
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
alias sudotfiles='sudo /usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=/'
alias gc='git clone'
#alias gd='git diff --color=always | more' #useless
#alias aur='git clone'
alias .aur='cd ~/.aur'
#swallow
alias fork='setsid -f'
alias weather='curl wttr.in'
alias work='source ~/.scripts/work.sh'
alias wifi='sudo ~/.scripts/openap.sh'
alias rss='newsboat'
alias core='corefreq-cli'
alias new='(setsid kitty </dev/null &>/dev/null &)'
alias gcmsg='gitmoji -c'
# alias from paulirish dotfiles
# Easier navigation: .., ..., ~ and -
alias ..="cd .."
alias cd..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
#more navigation stuff
alias conf="cd ~/.config/"
alias config="cd ~/.config/"
alias bashrc="vim ~/.bashrc"
alias i3conf="vim ~/.config/i3/config"
alias i3config="vim ~/.config/i3/config"
# mv, rm, cp
alias mv='mv -v'
alias rm='rm -i -v'
alias cp='cp -v'
alias chx='chmod +x'
# docker
alias dock="sudo docker"
alias dockc="sudo docker container"
alias info="pacman -Qi "
# kubernetes
source <(kubectl completion bash)
alias k=kubectl
complete -F __start_kubectl k
kc()
{
kubectl config use-context $1 || kubectl config get-contexts
}
#export
#c#
export DOTNET_ROOT=/opt/dotnet
# function to mkdir and cd to it
mcd()
{
mkdir -p -- "$1" &&
cd -P -- "$1"
}
# function for aur stuff
aur()
{
cd ~/.aur &&
git clone aur://"$1" &&
cd -P -- "$1" &&
vim PKGBUILD
}
# function to install python packages
py()
{
pip install --user "$1"
}
# function to start win10 vm
win10()
{
cd /etc/libvirt/qemu
sudo virsh start win10
cd ~/
}
# function to use work git
jc()
{
cd ~/code/work
git clone jc://"$1" &&
cd -P -- "$1" &&
echo "Done!"
}
decimal()
{
short="${1:0:2}"
[[ "$short" == "0x" ]] && echo $(("$1")) ||
echo $((0x"$1"))
}
hex()
{
printf '%x\n' "$1"
}
# Import colorscheme from 'wal' asynchronously
# & # Run the process in the background.
# ( ) # Hide shell job control messages.
(cat ~/.cache/wal/sequences &)
# Alternative (blocks terminal for 0-3ms)
cat ~/.cache/wal/sequences
# To add support for TTYs this line can be optionally added.
[[ -f ~/.cache/wal/colors-tty.sh ]] && source ~/.cache/wal/colors-tty.sh
# nodejs nvm
[[ -f /usr/share/nvm/init-nvm.sh ]] && source /usr/share/nvm/init-nvm.sh
PS1='[\u@\h \W]\$ '
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /usr/share/powerline/bindings/bash/powerline.sh
[[ -f ~/.fzf.bash ]] && source ~/.fzf.bash