Adding new stuff

This commit is contained in:
Viktor Barzin 2017-09-05 00:00:02 +03:00
parent c8039463a5
commit 6dfa0a64ac
2 changed files with 26 additions and 22 deletions

View file

@ -21,7 +21,8 @@ alias gp='git push origin master'
alias checkcpu='modprobe msr; rdmsr -a 0x19a'
alias fixcpu='wrmsr -a 0x19a 0x0'
alias daimi="egrep --color -n -i -R $1 --exclude='*.pyc'"
#alias daimi="egrep --color -n -i -R $1 --exclude='*.pyc'"
alias daimi="grep -rnw $2 $1"
alias muzika="xdg-open /home/viktor/Documents/Music/njoy.m3u"
alias randomstr="tr -dc a-z1-4 </dev/urandom | tr 1-2 ' \n' | awk 'length==0 || length>50' | tr 3-4 ' ' | sed 's/^ *//' | cat -s | sed 's/ / /g' |fmt"
alias battery="upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E 'time to empty|state|to\ full|percentage'"
@ -42,21 +43,29 @@ send_key() {
cat ~/.ssh/id_rsa.pub | ssh $1 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
}
function ls(){
if [[ $2 == "-l" ]]; then
if [[ $3 != "" ]]; then
exa -bghHliS $3
else
exa -bghHliS
fi
else
if [[ $2 != "" ]]; then
/bin/ls --color=auto $2
else
/bin/ls --color=auto
fi
fi
}
# function ls(){
# if [[ $2 == "-l" ]]; then
# if [[ $3 != "" ]]; then
# exa -bghHliS $3
# else
# exa -bghHliS
# fi
# else
# if [[ $2 != "" ]]; then
# /bin/ls --color=auto $2
# else
# /bin/ls --color=auto
# fi
# fi
# }
alias upgrade="sudo apt upgrade"
alias install="sudo apt install"
function secureme(){
workon ansible;
cd /home/viktor/ansible-play/
ansible-playbook -i ./hosts --extra-vars "ansible_sudo_pass=$ROOTPASS" --tags "vpn_startup" main.yml >> /dev/null
cd /home/viktor/;
sudo openvpn --config viktor.ovpn &
}

7
.zshrc
View file

@ -95,11 +95,6 @@ eval "$(jump shell)"
# Load aliases
. ~/.bash_aliases
#export PS1="%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%} $terminfo[bold]%2~ %{$reset_color%}
#export PS1="%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%} $terminfo[bold]%2~ $(git_prompt_info)%{$reset_color%}
#export PS1="%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%} $terminfo[bold]%2~ $(git_super_status)%{$reset_color%}
#╰─%B#%b ";
#PROMPT='%B%m%~%b$(git_super_status) '
j () {
local dir="$(jump cd $@)"
@ -108,7 +103,7 @@ j () {
# . ~/.bash_completion
source $ZSH/custom/plugins/zsh-git-prompt/zshrc.sh
# source $ZSH/custom/plugins/zsh-git-prompt/zshrc.sh
# Locale settings for perl