211 lines
5.6 KiB
Bash
211 lines
5.6 KiB
Bash
#################################################################################
|
|
#
|
|
#__ __ _____ _ ____ __ _
|
|
#| \/ |_ _|__ /___| |__ / ___|___ _ __ / _(_) __ _
|
|
#| |\/| | | | | / // __| '_ \ | | / _ \| '_ \| |_| |/ _` |
|
|
#| | | | |_| |/ /_\__ \ | | || |__| (_) | | | | _| | (_| |
|
|
#|_| |_|\__, /____|___/_| |_(_)____\___/|_| |_|_| |_|\__, |
|
|
# |___/ |___/
|
|
# 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"
|
|
export PATH=$PATH:$HOME/.SpaceVim/bin
|
|
export PATH=$PATH:$HOME/.captain/bin
|
|
|
|
#Home bin (last always!)
|
|
export PATH="/home/paramah/go/bin:$PATH"
|
|
export PATH="/home/paramah/bin:$PATH"
|
|
|
|
#symfony
|
|
export PATH="$HOME/.symfony/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 virtualenv nodeenv)
|
|
|
|
export CHROME_BIN=/usr/bin/chromium
|
|
|
|
source /usr/bin/virtualenvwrapper.sh
|
|
|
|
plugins=(
|
|
zsh-autosuggestions
|
|
virtualenvwrapper
|
|
taskwarrior
|
|
archlinux
|
|
systemd
|
|
themes
|
|
git
|
|
fzf
|
|
git-flow-completion
|
|
go
|
|
)
|
|
|
|
|
|
|
|
source ~/.zplug/init.zsh
|
|
|
|
zplug 'ytet5uy4/fzf-widgets'
|
|
zplug 'zsh-users/zaw'
|
|
#zplug 'voronkovich/project.plugin.zsh'
|
|
|
|
|
|
# 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
|
|
|
|
export DISABLE_AUTO_TITLE='true'
|
|
|
|
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 -y "
|
|
alias dc="docker-compose"
|
|
alias d="docker"
|
|
alias t="tmux"
|
|
alias b="buku --suggest"
|
|
alias j="jrnl"
|
|
alias g="git"
|
|
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 yaycc="yay -Sc"
|
|
alias frp="frpc -c ~/frpc.ini"
|
|
|
|
alias mleft="xrandr --output HDMI1 --rotation left"
|
|
alias mnormal="xrandr --output HDMI1 --rotation normal"
|
|
|
|
alias l="sudo systemctl restart docker && tmux kill-server"
|
|
|
|
alias crl="dbus-send --session --dest=org.Cinnamon.LookingGlass --type=method_call /org/Cinnamon/LookingGlass org.Cinnamon.LookingGlass.ReloadExtension string:'EXTENSION_UUID' string:'APPLET'"
|
|
|
|
# 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"
|
|
|
|
|
|
telegram-desktop () { # launch telegram and send it to scratchpad
|
|
(/usr/bin/telegram-desktop &)
|
|
sleep 2
|
|
i3-msg '[class="Telegram"] move scratchpad'
|
|
}
|
|
|
|
telegram-desktop () { # launch telegram and send it to scratchpad
|
|
(/usr/bin/mattermost-desktop &)
|
|
sleep 2
|
|
i3-msg '[class="Mattermost"] move scratchpad'
|
|
}
|
|
|
|
theme () {
|
|
(wal -qi $WALLPAPER)
|
|
(feh --bg-scale $WALLPAPER)
|
|
}
|
|
|
|
autoload -U +X bashcompinit && bashcompinit
|
|
complete -o nospace -C /usr/bin/vault vault
|
|
|
|
#wal -i ~/Wallpapers/5sense1.jpg
|
|
#wal -i ~/Wallpapers/steampunk_1.jpg
|
|
#wal -i ~/Wallpapers/steampunk_5.jpg
|
|
#wal -i ~/Wallpapers/rail.jpg
|
|
#wal -i ~/Wallpapers/forrest_new.jpg
|
|
#wal -i ~/Wallpapers/cyberpunk_city.jpg
|
|
#xrdb ~/.Xresources
|
|
#sudo sh -c 'echo -n "elantech" > /sys/bus/serio/devices/serio1/protocol'
|
|
source <(hcloud completion zsh)
|
|
#eval "$(starship init zsh)"
|
|
#neofetch
|