initial
This commit is contained in:
156
.zshrc
Normal file
156
.zshrc
Normal file
@ -0,0 +1,156 @@
|
||||
#################################################################################
|
||||
#
|
||||
#__ __ _____ _ ____ __ _
|
||||
#| \/ |_ _|__ /___| |__ / ___|___ _ __ / _(_) __ _
|
||||
#| |\/| | | | | / // __| '_ \ | | / _ \| '_ \| |_| |/ _` |
|
||||
#| | | | |_| |/ /_\__ \ | | || |__| (_) | | | | _| | (_| |
|
||||
#|_| |_|\__, /____|___/_| |_(_)____\___/|_| |_|_| |_|\__, |
|
||||
# |___/ |___/
|
||||
# by @paramah
|
||||
#
|
||||
#################################################################################
|
||||
|
||||
#Load my environment exports
|
||||
[ -f ~/.exports ] && source ~/.exports
|
||||
|
||||
|
||||
export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
export PATH="${PATH}:${HOME}/.local/bin/"
|
||||
export PATH="${PATH}:${HOME}/.config/composer/vendor/bin"
|
||||
|
||||
# paramah configuration
|
||||
export PATH="/usr/bin/core_perl:$PATH"
|
||||
export PATH="/home/paramah/.gem/ruby/2.4.0/bin:$PATH"
|
||||
export PATH="/home/paramah/.gem/ruby/2.3.0/bin:$PATH"
|
||||
export PATH="/home/paramah/.gem/ruby/2.5.0/bin:$PATH"
|
||||
export PATH="/home/paramah/.local/bin:$PATH"
|
||||
|
||||
#Home bin (last always!)
|
||||
export PATH="/home/paramah/bin:$PATH"
|
||||
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=$HOME/.oh-my-zsh
|
||||
ZSH_THEME="powerlevel9k/powerlevel9k"
|
||||
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs_joined)
|
||||
|
||||
source /usr/bin/virtualenvwrapper.sh
|
||||
|
||||
plugins=(
|
||||
zsh-autosuggestions
|
||||
virtualenvwrapper
|
||||
taskwarrior
|
||||
archlinux
|
||||
systemd
|
||||
themes
|
||||
git
|
||||
)
|
||||
|
||||
|
||||
|
||||
source ~/.zplug/init.zsh
|
||||
|
||||
zplug 'ytet5uy4/fzf-widgets'
|
||||
zplug 'zsh-users/zaw'
|
||||
|
||||
|
||||
# Map widgets to key
|
||||
bindkey '^ge' fzf-select-widget
|
||||
bindkey '^@.' fzf-edit-dotfiles
|
||||
bindkey '^@c' fzf-change-directory
|
||||
bindkey '^@n' fzf-change-named-directory
|
||||
bindkey '^@f' fzf-edit-files
|
||||
bindkey '^@k' fzf-kill-processes
|
||||
bindkey '^gs' fzf-exec-ssh
|
||||
bindkey '^/' fzf-change-recent-directory
|
||||
bindkey '^r' fzf-insert-history
|
||||
bindkey '^xf' fzf-insert-files
|
||||
bindkey '^xd' fzf-insert-directory
|
||||
bindkey '^xn' fzf-insert-named-directory
|
||||
|
||||
## Git
|
||||
bindkey '^@g' fzf-select-git-widget
|
||||
bindkey '^@ga' fzf-git-add-files
|
||||
bindkey '^@gc' fzf-git-change-repository
|
||||
|
||||
# GitHub
|
||||
bindkey '^@h' fzf-select-github-widget
|
||||
bindkey '^@hs' fzf-github-show-issue
|
||||
bindkey '^@hc' fzf-github-close-issue
|
||||
|
||||
## Docker
|
||||
bindkey '^@d' fzf-select-docker-widget
|
||||
bindkey '^@dc' fzf-docker-remove-containers
|
||||
bindkey '^@di' fzf-docker-remove-images
|
||||
bindkey '^@dv' fzf-docker-remove-volumes
|
||||
|
||||
zplug load
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
export EDITOR='vim'
|
||||
else
|
||||
export EDITOR='nvim'
|
||||
fi
|
||||
|
||||
TMPDIR=/home/paramah/.tmp/
|
||||
|
||||
eval "$(jira --completion-script-zsh)"
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
TRAPWINCH() {
|
||||
zle && { zle reset-prompt; zle -R }
|
||||
}
|
||||
|
||||
|
||||
autoload bashcompinit
|
||||
bashcompinit
|
||||
dsh(){
|
||||
docker exec -it $1 sh -c "stty cols $COLUMNS rows $LINES && sh";
|
||||
}
|
||||
|
||||
dbash(){
|
||||
docker exec -it $1 bash -c "stty cols $COLUMNS rows $LINES && bash";
|
||||
}
|
||||
|
||||
_goinside(){
|
||||
COMPREPLY=( $(docker ps --format "{{.Names}}" -f name=$2) );
|
||||
}
|
||||
complete -F _goinside dsh;
|
||||
complete -F _goinside dbash;
|
||||
export goinside;
|
||||
|
||||
###################################
|
||||
# _ _
|
||||
# __ _| (_) __ _ ___ ___ ___
|
||||
# / _` | | |/ _` / __|/ _ \/ __|
|
||||
# | (_| | | | (_| \__ \ __/\__ \
|
||||
# (_)__,_|_|_|\__,_|___/\___||___/
|
||||
#
|
||||
##########################################################################################
|
||||
|
||||
|
||||
alias l="tmuxp load -d"
|
||||
alias dc="docker-compose"
|
||||
alias d="docker"
|
||||
alias t="tmux"
|
||||
alias b="buku --suggest"
|
||||
alias j="jrnl"
|
||||
alias wh="curl wttr.in/Gliwice"
|
||||
|
||||
alias drestart="sudo systemctl restart docker"
|
||||
alias dstop="sudo systemctl stop docker"
|
||||
alias dstart="sudo systemctl start docker"
|
||||
alias ls="exa"
|
||||
|
||||
# alias cat="bat"
|
||||
alias ping='~/bin/prettyping --nolegend'
|
||||
|
||||
alias sourcec="docker run --publish 7080:7080 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph --volume /var/run/docker.sock:/var/run/docker.sock sourcegraph/server:2.11.2"
|
||||
|
||||
alias hadolint="docker run --rm -i hadolint/hadolint"
|
||||
|
||||
|
Reference in New Issue
Block a user