hard link all the dot files and add some new stuff...

This commit is contained in:
viktorbarzin 2019-01-14 13:52:03 +00:00
parent 26832898cd
commit 525ec8a095
318 changed files with 74 additions and 31 deletions

View file

@ -2,7 +2,7 @@ alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias py='python3.6'
alias py='python3'
alias whatisopen='sudo netstat -pnlt'
alias calc='gcalccmd'
alias pmr='python manage.py runserver'
@ -10,6 +10,10 @@ alias nopmr="netstat -pnlt | grep -E -o -e '[0-9]+/python' | cut -d '/' -f 1 | x
alias pmm='python manage.py migrate'
alias pmmm='python manage.py makemigrations'
# Start vim with system clipboard
# alias vim="vimx" # don't alias this - make symlink instead
alias vi="vim"
# git aliases
alias gs='git status'
alias ga='git add'
@ -17,6 +21,8 @@ alias gc='git commit'
alias gp='git push origin master'
alias gpull='git pull origin master'
alias gpp='git push production master' # push to production for personal website
# MSR registers is responsible for lag after suspend
alias checkcpu='modprobe msr; rdmsr -a 0x19a'
alias fixcpu='wrmsr -a 0x19a 0x0'
@ -64,10 +70,25 @@ alias mkdir="mkdir -pv"
# fi
# }
alias update="sudo apt update"
alias upgrade="sudo apt upgrade"
alias install="sudo apt install"
alias remove="sudo apt remove"
# Get packet manager
declare -A osInfo;
osInfo[/etc/redhat-release]=dnf
osInfo[/etc/arch-release]=pacman
osInfo[/etc/gentoo-release]=emerge
osInfo[/etc/SuSE-release]=zypp
osInfo[/etc/debian_version]=apt-get
# for f in "${!osInfo[@]}" # bash version
for f in "${(@k)osInfo}" # zsh version
do
if [[ -f $f ]];then
pm=${osInfo[$f]}
fi
done
alias update="sudo $pm update"
alias upgrade="sudo $pm upgrade"
alias install="sudo $pm install"
alias remove="sudo $pm remove"
# secureme(){
# workon ansible;
@ -255,17 +276,20 @@ alias hosts="sudo vim /etc/hosts"
}
alias gg="xset dpms force off"
hib(){
# sudo swapon /dev/kubuntu-vg/swap_1 2&>/dev/null
# sudo systemctl hibernate
# sudo swapoff /dev/kubuntu-vg/swap_1 2&>/dev/null
sudo swapon -a
/bin/lock
sleep 2
sudo s2disk 2>1 > /dev/null
}
alias hib="sudo systemctl hibernate"
# where systemctl doesn't work
# hib(){
# # sudo swapon /dev/kubuntu-vg/swap_1 2&>/dev/null
# # sudo systemctl hibernate
# # sudo swapoff /dev/kubuntu-vg/swap_1 2&>/dev/null
# sudo swapon -a
# /bin/lock
# sleep 2
# sudo s2disk 2>1 > /dev/null
# }
alias tricks="vi ~/tricks/tricks.txt"
alias ftricks="vi ~/tricks/fedora.txt"
alias xo="xdg-open"
alias time='"time"' # Disable bash builit
alias vix="vim -X" # Fast vim startup wihtout x (no ystem clipboard)
@ -306,3 +330,6 @@ function certinfo {
curl --insecure -v https://"$1" 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }';
}
alias speedtest="curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py |python -"
alias backupnas="rsync -az --progress --delete /home nas:/volume1/Backup/Viki/laptop/yuhu-fedora; rsync -az --progress --delete /opt
nas:/volume1/Backup/Viki/laptop/yuhu-fedora"

View file

@ -9,6 +9,7 @@
# -- general -------------------------------------------------------------------
set -g default-shell /usr/bin/zsh
set -g default-terminal "screen-256color" # colors!
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences

View file

@ -234,16 +234,6 @@ tmux_conf_theme_clock_colour='#00afff' # light blue
tmux_conf_theme_clock_style='24'
# -- clipboard -----------------------------------------------------------------
# in copy mode, copying selection also copies to the OS clipboard
# - true
# - false (default)
# on macOS, this requires installing reattach-to-user-namespace, see README.md
# on Linux, this requires xsel or xclip
# tmux_conf_copy_to_os_clipboard=false
# -- user customizations -------------------------------------------------------
# this is the place to override or undo settings
@ -293,4 +283,7 @@ bind h resize-pane -L 5
run-shell /home/viktor/.tmux/resurrect/resurrect.tmux
# bind -T copy-mode-vi y send-keys -X copy-pipe 'xclip -in -selection clipboard'
# Copy to system clipboard using xlip
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'

3
.vimrc
View file

@ -268,7 +268,8 @@ let g:syntastic_loc_list_height=1
vnoremap // y/<C-R>"<CR>
" Showing line numbers and length
set tw=79 " width of document (used by gd)
" set tw=79 " width of document (used by gd)
set tw=120 " width of document (used by gd)
set nowrap " don't automatically wrap on load
set fo-=t " don't automatically wrap text when typing
set colorcolumn=120

0
virtualenvwrapper.sh → .virtualenvwrapper.sh Normal file → Executable file
View file

18
.zshenv
View file

@ -1,5 +1,15 @@
eval "$(pyenv init -)"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export VIRTUALENVWRAPPER_PYTHON=python
# export PYENV_ROOT="$HOME/.pyenv"
# export PATH="$PYENV_ROOT/bin:$PATH"
# eval "$(pyenv init -)"
#export PATH="/home/viktor/.pyenv/bin:$PATH"
#eval "$(pyenv init -)"
#eval "$(pyenv virtualenv-init -)"
export VIRTUALENVWRAPPER_PYTHON=python3
export VIRTUALENV_PYTHON=python3
export WORKON_HOME=$HOME/.virtualenvs
# export VIRTUALENV_PYTHON=python
source /home/viktor/.virtualenvwrapper.sh

13
.zshrc
View file

@ -4,6 +4,7 @@
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# unset LD_PRELOAD
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
@ -93,7 +94,7 @@ fi
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
eval "$(jump shell)"
#eval "$(jump shell)"
# Load aliases
. ~/.bash_aliases
@ -131,3 +132,13 @@ export LESS_TERMCAP_us=$'\e[1;4;31m'
# Enable extended glob
setopt extendedglob
# Enable Ctrl-x-e to edit command line
autoload -U edit-command-line
# Emacs style
zle -N edit-command-line
bindkey '^xe' edit-command-line
bindkey '^x^e' edit-command-line
# Vi style:
# zle -N edit-command-line
# bindkey -M vicmd v edit-command-line

Some files were not shown because too many files have changed in this diff Show more