81 lines
2.6 KiB
Bash
81 lines
2.6 KiB
Bash
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
|
# Initialization code that may require console input (password prompts, [y/n]
|
|
# confirmations, etc.) must go above this block; everything else may go below.
|
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
|
fi
|
|
|
|
#cat $HOME/.cache/wal/sequences
|
|
export PATH=$PATH:$HOME/.pulumi/bin:$HOME/.cargo/bin:$HOME/.local/share/gem/ruby/gems/bin
|
|
|
|
# plugins - using zap (https://github.com/zap-zsh/zap)
|
|
[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"
|
|
|
|
plug "zsh-users/zsh-autosuggestions"
|
|
plug "zap-zsh/supercharge"
|
|
plug "romkatv/powerlevel10k"
|
|
plug "zap-zsh/exa"
|
|
plug "zap-zsh/vim"
|
|
plug "zap-zsh/fzf"
|
|
plug "zsh-users/zsh-syntax-highlighting"
|
|
|
|
# exports
|
|
export EDITOR="vim"
|
|
export TERMINAL="foot"
|
|
export BROWSER="firefox"
|
|
export TERM="xterm-256color"
|
|
export DOTFILES="$HOME/.dotfiles"
|
|
export REPOS="$HOME/opt/repos"
|
|
export HRULEWIDTH=73
|
|
export GOPATH="$HOME/.local"
|
|
export GOBIN="${GOPATH}/go/bin"
|
|
export GO111MODULE="on"
|
|
export ANSIBLE_NOCOWS=1
|
|
export PATH="$GOPATH/go/bin:$GOBIN:$SCRIPTS:/usr/local/share/gems:$USER/.gem/ruby:$HOME/opt/work/bin:$HOME/bin:$HOME/.local/npm-global/bin:$PATH"
|
|
export GEM_HOME="$HOME/.local/share/gem/ruby/gems/"
|
|
export XDG_CONFIG_HOME="$HOME/.config"
|
|
|
|
# aliases
|
|
alias ts="timew sum today"
|
|
alias dot="cd $DOTFILES"
|
|
alias gb="git rev-parse --abbrev-ref HEAD"
|
|
alias vz="$EDITOR $HOME/.zshrc"
|
|
alias vb="$EDITOR $HOME/.bashrc"
|
|
alias chmox="chmod +x"
|
|
alias lg="lazygit"
|
|
#alias nvim="lvim"
|
|
alias vim="nvim"
|
|
alias gip="./get_ip_of.sh"
|
|
alias tt="taskwarrior-tui"
|
|
if command -v bat &>/dev/null; then
|
|
alias cat='bat -pp --theme "Visual Studio Dark+"'
|
|
alias catt='bat --theme "Visual Studio Dark+"'
|
|
fi
|
|
|
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
|
|
# Add work specific vars
|
|
[[ -f ~/.config/work/vars ]] && source ~/.config/work/vars
|
|
|
|
# Source virtualenvironment
|
|
VENV="$HOME/.local/bin/virtualenvwrapper.sh"
|
|
[[ -f "$VENV" ]] && source "$VENV" &>/dev/null
|
|
|
|
# Toggle opven-client@$client
|
|
function vpn() {
|
|
client="$1"
|
|
[[ -z "$client" ]] && echo "Need client to connect to" && return
|
|
systemctl is-active openvpn-client@$client &>/dev/null
|
|
active=$?
|
|
[[ "$active" -eq 0 ]] && echo "vpn halting" && sudo systemctl stop openvpn-client@$client && return
|
|
sudo systemctl start openvpn-client@$client && echo "vpn started"
|
|
}
|
|
|
|
function vpns() {
|
|
client="$1"
|
|
[[ -z "$client" ]] && echo "Need client to connect to" && return
|
|
systemctl is-active openvpn-client@$client
|
|
}
|
|
|