79 lines
2.2 KiB
Bash
79 lines
2.2 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
|
|
|
|
# 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/.oh-my-zsh"
|
|
|
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
|
|
|
# Uncomment the following line if pasting URLs and other text is messed up.
|
|
# DISABLE_MAGIC_FUNCTIONS=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"
|
|
|
|
HIST_STAMPS="dd.mm.yyyy"
|
|
|
|
# Would you like to use another custom folder than $ZSH/custom?
|
|
ZSH_CUSTOM="$HOME/.config/oh-my-zsh"
|
|
|
|
# Standard plugins can be found in $ZSH/plugins/
|
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
|
plugins=(
|
|
git
|
|
ansible
|
|
extract
|
|
history
|
|
pass
|
|
sudo
|
|
zsh-interactive-cd
|
|
)
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
# User configuration
|
|
|
|
# You may need to manually set your language environment
|
|
# export LANG=en_US.UTF-8
|
|
|
|
export EDITOR=/usr/bin/vim
|
|
export HISTORY_IGNORE="(ls|cd|pwd|exit|history|cd -|cd ..)"
|
|
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
|
|
|
setopt completealiases
|
|
|
|
prompt_context(){}
|
|
|
|
## compdef kitty
|
|
|
|
_kitty() {
|
|
local src
|
|
# Send all words up to the word the cursor is currently on
|
|
src=$(printf "%s
|
|
" "${(@)words[1,$CURRENT]}" | kitty +complete zsh)
|
|
if [[ $? == 0 ]]; then
|
|
eval ${src}
|
|
fi
|
|
}
|
|
compdef _kitty kitty
|
|
|
|
autoload -Uz compinit
|
|
compinit
|
|
# Completion for kitty
|
|
kitty + complete setup zsh | source /dev/stdin
|
|
|
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|