206 lines
7.9 KiB
Bash
206 lines
7.9 KiB
Bash
# ██
|
|
# ██
|
|
# ██████ ██████░██
|
|
# ░░░░██ ██░░░░ ░██████░
|
|
# ██ ░░█████ ░██░░░██░
|
|
# ██ ░░░░░██░██ ░██░
|
|
# ██████ ██████ ░██ ░██░
|
|
# ░░░░░░ ░░░░░░ ░░░ ░░░
|
|
|
|
export DEFAULT_USER="hate"
|
|
|
|
# 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/hate/.oh-my-zsh
|
|
|
|
# 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.
|
|
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
|
#ZSH_THEME="agnoster"
|
|
ZSH_THEME="spaceship"
|
|
#ZSH_THEME="powerlevel9k/powerlevel9k"
|
|
# Set list of themes to load
|
|
# Setting this variable when ZSH_THEME=random
|
|
# cause zsh load theme from this variable instead of
|
|
# looking in ~/.oh-my-zsh/themes/
|
|
# An empty array have no effect
|
|
# ZSH_THEME_RANDOM_CANDIDATES=(f-magic" "robbyrussell" "agnoster" )
|
|
#source ~/kube-ps1/kube-ps1.sh
|
|
#PROMPT='$(kube_ps1)'$PROMPT
|
|
# 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"
|
|
|
|
# Auto completion
|
|
autoload -Uz compinit
|
|
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)
|
|
if [ $(date +'%j') != $updated_at ]; then
|
|
compinit -i
|
|
else
|
|
compinit -C -i
|
|
fi
|
|
|
|
# Load complist module
|
|
zmodload -i zsh/complist
|
|
|
|
# Save history
|
|
HISTFILE=$HOME/.zsh_history
|
|
HISTSIZE=100000
|
|
SAVEHIST=$HISTSIZE
|
|
|
|
# No duplicates in history
|
|
setopt hist_ignore_all_dups # remove older duplicate entries from history
|
|
setopt hist_reduce_blanks # remove superfluous blanks from history items
|
|
setopt inc_append_history # save history entries as soon as they are entered
|
|
setopt share_history # share history between different instances of the shell
|
|
|
|
# Auto correction
|
|
setopt correct_all # autocorrect commands
|
|
setopt auto_list # automatically list choices on ambiguous completion
|
|
setopt auto_menu # automatically use menu completion
|
|
setopt always_to_end # move cursor to end if word had one match
|
|
|
|
# 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.
|
|
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
|
# 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? (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=(docker helm kube-ps1 kubectl gpg-agent git zsh-autosuggestions zsh-syntax-highlighting archlinux battery tmux extract yadm web-search)
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
# User configuration
|
|
|
|
# My scripts
|
|
PATH=/home/hate/.local/bin:/home/hate/.config/Scripts:/home/hate/.gem/ruby/2.5.0/bin:$PATH
|
|
|
|
# zsh.functions
|
|
#FPATH="$HOME/.zfunc:$FPATH"
|
|
|
|
# Load functions on terminal startup
|
|
#source ~/.zfunc/functions.zsh
|
|
|
|
# GNUPG
|
|
GNUPGHOME=/home/hate/.gnupg
|
|
|
|
# export MANPATH="/usr/local/man:$MANPATH"
|
|
# You may need to manually set your language environment
|
|
# export LANG=en_US.UTF-8
|
|
|
|
# Preferred editor
|
|
export EDITOR=nvim
|
|
|
|
# Preferred browser
|
|
export BROWSER=/usr/bin/google-chrome-stable
|
|
|
|
#fzf
|
|
export FZF_CTRL_R_OPTS='--sort --exact'
|
|
export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
|
|
|
|
# Compilation flags
|
|
export ARCHFLAGS="-arch x86_64"
|
|
|
|
# Import colorscheme from 'wal' asynchronously
|
|
# & # Run the process in the background.
|
|
# ( ) # Hide shell job control messages.
|
|
(cat ~/.cache/wal/sequences &)
|
|
|
|
# Wpg restore on terminals
|
|
#(cat $HOME/.config/wpg/sequences &)
|
|
|
|
# To add support for TTYs this line can be optionally added.
|
|
#source ~/.cache/wal/colors-tty.sh
|
|
|
|
#gnupg
|
|
export GNUPGHOME="~/.gnupg"
|
|
|
|
#ssh
|
|
export SSH_KEY_PATH="~/.ssh/id_rsa"
|
|
|
|
#Check the weather:
|
|
weath() { curl wttr.in/Hameenlinna ;}
|
|
|
|
#FASD
|
|
eval "$(fasd --init auto)"
|
|
|
|
# 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"
|
|
alias openskylab="sudo openvpn ~/.openvpn/OPNsense-udp-1194-config.ovpn"
|
|
alias reload="source ~/.zshrc"
|
|
alias torrent="transmission-remote -n 'transmission:transmission' -a"
|
|
alias mirror="sudo reflector --protocol https --latest 50 --number 20 --sort rate --save /etc/pacman.d/mirrorlist"
|
|
alias v="f -e nvim" #quick opening files with vim
|
|
alias m="f -e mpv" #quick opening files with mpv
|
|
alias o="a -e xdg-open" #quick opening files with xdg-open
|
|
alias ..="cd .."
|
|
alias play="ncmpcpp -S visualizer"
|
|
alias userkey="gpg --search-keys"
|
|
alias wspeedd="speedometer -rx wlp11s0"
|
|
alias wspeedu="speedometer -tx wlp11s0"
|
|
alias edis='expressvpn disconnect && sudo cp ~/resolv.conf /etc/resolv.conf'
|
|
alias aws1='ssh ubuntu@ec2-18-196-102-236.eu-central-1.compute.amazonaws.com'
|
|
alias gcp='gcloud compute ssh instance-1'
|
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
|
|
# The next line updates PATH for the Google Cloud SDK.
|
|
if [ -f '/home/hate/google-cloud-sdk/path.zsh.inc' ]; then source '/home/hate/google-cloud-sdk/path.zsh.inc'; fi
|
|
|
|
# The next line enables shell command completion for gcloud.
|
|
if [ -f '/home/hate/google-cloud-sdk/completion.zsh.inc' ]; then source '/home/hate/google-cloud-sdk/completion.zsh.inc'; fi
|
|
#Powerlevel9k-options
|
|
POWERLEVEL9K_MODE="nerd-complete"
|
|
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs load ram disk_usage ip battery time)
|
|
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(host context dir vcs custom_wifi_signal)
|
|
POWERLEVEL9K_CUSTOM_WIFI_SIGNAL="echo signal: \$(nmcli device wifi | grep yes | awk '{print \$8}')"
|
|
POWERLEVEL9K_CUSTOM_WIFI_SIGNAL_BACKGROUND="blue"
|
|
POWERLEVEL9K_CUSTOM_WIFI_SIGNAL_FOREGROUND="yellow"
|
|
POWERLEVEL9K_BATTERY_STAGES=(
|
|
$'▏ ▏' $'▎ ▏' $'▍ ▏' $'▌ ▏' $'▋ ▏' $'▊ ▏' $'▉ ▏' $'█ ▏'
|
|
$'█▏ ▏' $'█▎ ▏' $'█▍ ▏' $'█▌ ▏' $'█▋ ▏' $'█▊ ▏' $'█▉ ▏' $'██ ▏'
|
|
$'██ ▏' $'██▎ ▏' $'██▍ ▏' $'██▌ ▏' $'██▋ ▏' $'██▊ ▏' $'██▉ ▏' $'███ ▏'
|
|
$'███ ▏' $'███▎ ▏' $'███▍ ▏' $'███▌ ▏' $'███▋ ▏' $'███▊ ▏' $'███▉ ▏' $'████ ▏'
|
|
$'████ ▏' $'████▎▏' $'████▍▏' $'████▌▏' $'████▋▏' $'████▊▏' $'████▉▏' $'█████▏' )
|
|
#Spaceship-options
|
|
SPACESHIP_TIME_SHOW="true"
|
|
SPACESHIP_BATTERY_SHOW="always"
|