Created
December 31, 2022 12:52
-
-
Save PaulLaux/824249c30523602f2130dca58bd157a0 to your computer and use it in GitHub Desktop.
zsh minimal config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/px1/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="random" | |
# Set list of themes to pick from when loading at random | |
# Setting this variable when ZSH_THEME=random will cause zsh to load | |
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ | |
# If set to an empty array, this variable will have no effect. | |
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to use hyphen-insensitive completion. | |
# Case-sensitive completion must be off. _ and - will be interchangeable. | |
# HYPHEN_INSENSITIVE="true" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
# DISABLE_AUTO_UPDATE="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=13 | |
# Uncomment the following line to disable colors in ls. | |
# DISABLE_LS_COLORS="true" | |
# Uncomment the following line to disable auto-setting terminal title. | |
# DISABLE_AUTO_TITLE="true" | |
# Uncomment the following line to enable command auto-correction. | |
# ENABLE_CORRECTION="true" | |
# Uncomment the following line to display red dots whilst waiting for completion. | |
# COMPLETION_WAITING_DOTS="true" | |
# Uncomment the following line if you want to disable marking untracked files | |
# under VCS as dirty. This makes repository status check for large repositories | |
# much, much faster. | |
# DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# Uncomment the following line if you want to change the command execution time | |
# stamp shown in the history command output. | |
# You can set one of the optional three formats: | |
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
# or set a custom format using the strftime function format specifications, | |
# see 'man strftime' for details. | |
# HIST_STAMPS="mm/dd/yyyy" | |
# Would you like to use another custom folder than $ZSH/custom? | |
# ZSH_CUSTOM=/path/to/new-custom-folder | |
# Which plugins would you like to load? | |
# Standard plugins can be found in ~/.oh-my-zsh/plugins/* | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
plugins=( | |
git | |
#golang | |
sudo | |
pass | |
#z | |
) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
# if [[ -n $SSH_CONNECTION ]]; then | |
# export EDITOR='vim' | |
# else | |
# export EDITOR='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# ssh | |
# export SSH_KEY_PATH="~/.ssh/rsa_id" | |
# Set personal aliases, overriding those provided by oh-my-zsh libs, | |
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases, run `alias`. | |
# | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
fpath=($fpath "/home/px1/.zfunctions") | |
export GOPATH=~/go | |
# autoload -U promptinit; promptinit | |
# prompt spaceship | |
#export NVM_DIR="$HOME/.nvm" | |
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
#[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
alias p='ping 1.1.1.1' | |
alias gs="git status" | |
alias gd="git diff" | |
alias gc="git checkout" | |
# git update master: | |
alias gum="gc master && git pull && gc -" | |
## Cargo | |
alias carc="cargo c" | |
alias carf="cargo fmt" | |
alias cart="cargo test --all-features" | |
alias svim='vim -u ~/.SpaceVim/vimrc' | |
alias vimip='vim +PlugInstall' | |
alias vimrc='vim ~/.vimrc' | |
alias vi='vim' | |
alias suvim='sudo vim' | |
alias n='vim ~/notes.md' | |
alias gn='cat ~/notes.md | grep' | |
alias cn='cat ~/notes.md ' | |
alias zshrc='vim ~/.zshrc' | |
alias lzsh='source ~/.zshrc' | |
alias ch='cat /etc/hosts' | |
alias hg='history | grep' | |
alias open='xdg-open' | |
alias o='xdg-open' | |
alias vpn='sudo protonvpn' | |
alias vpns='protonvpn s' | |
alias vpnc='sudo protonvpn c --cc CH && protonvpn s' | |
alias vpncr='sudo protonvpn c -r && protonvpn s' | |
alias vpncf='sudo protonvpn c -f && protonvpn s' | |
alias vpnr='sudo protonvpn r && vpns' | |
alias vpnd='sudo protonvpn d' | |
alias calc='f() {echo $1 | bc -l };f' | |
alias speed='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -' | |
#alias aws='aws2' | |
#complete -C '/usr/local/bin/aws2_completer' aws2 | |
alias myip='dig +short myip.opendns.com @resolver1.opendns.com' | |
## dd-wrt | |
alias wrt='ssh root@10.0.0.1' | |
alias rvpn='ssh root@10.0.0.1 /jffs/refresh-vpn/refresh-vpn.sh' | |
alias logvpn='ssh -t root@10.0.0.1 tail -f /jffs/refresh-vpn/log2.vpn' | |
## pi@pi | |
alias pi='ssh pi@10.0.0.100' | |
alias pi-reboot='ssh pi@pi sudo shutdown -r now' | |
alias pi-shutdown='ssh pi@pi sudo shutdown -h now' | |
## yarn | |
alias yr='yarn run' | |
## search google | |
alias gg='f2() { open "$(./search-google "$1")" ; };f2' | |
# gg {movie} alien 1979 | |
## postgreSQL | |
alias psql='sudo -u postgres psql' | |
## ngrok | |
alias ngrok='/home/px1/.cache/shopify/ngrok' | |
# delete shred files | |
#alias s='shred -uvz' | |
# wake on lan | |
alias wake_pc1="sudo etherwake -i enp0s31f6 -D 90:2B:34:18:CE:09 -b 10.0.0.255" | |
# Cargo | |
alias cs='cargo clippy --all-features --all-targets -- -D warnings' | |
alias ct='cargo test --all-features' | |
#alias newpass=`perl -MList::Util=shuffle -0ane 'print ((shuffle @F)[0..3],"\n")' < /usr/share/dict/words` | |
# include Z: | |
. ~/z.sh | |
HISTFILE=~/.zsh_history | |
HISTSIZE=50000 | |
SAVEHIST=$HISTSIZE | |
#bindkey "^[[OC" forward-word | |
#bindkey "^[[OD" backward-word | |
[[ -z "$TMUX" ]] && tmux | |
fpath=(~/.zsh.d/ $fpath) | |
autoload -U +X bashcompinit && bashcompinit | |
complete -o nospace -C /home/px1/bin/terraform terraform | |
autoload -U compinit | |
compinit -i | |
export PATH=$PATH:/home/px1/go/bin | |
# tabtab source for packages | |
# uninstall by removing these lines | |
[[ -f ~/.config/tabtab/__tabtab.zsh ]] && . ~/.config/tabtab/__tabtab.zsh || true | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
fpath=(~/.zsh.d/ $fpath) | |
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
eval "$(navi widget zsh)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment