Massive change to the structure of the tree.
This commit is contained in:
parent
2fc5f7a514
commit
c71934ed3b
137 changed files with 51 additions and 266 deletions
1
config/common/zsh/.zlogout
Normal file
1
config/common/zsh/.zlogout
Normal file
|
@ -0,0 +1 @@
|
|||
clear
|
18
config/common/zsh/.zshenv
Normal file
18
config/common/zsh/.zshenv
Normal file
|
@ -0,0 +1,18 @@
|
|||
#shellcheck disable=SC2034
|
||||
|
||||
skip_global_compinit=1
|
||||
export XDG_CACHE_HOME="/tmp/${USER}-cache"
|
||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||
export XDG_DATA_HOME="${HOME}/.local/share"
|
||||
export XDG_STATE_HOME="${HOME}/.local/state"
|
||||
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
||||
|
||||
# clean home - needs to be here for Docker Desktop
|
||||
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
|
||||
export GNUPGHOME="${XDG_DATA_HOME}/gnupg"
|
||||
export LESSHISTFILE='/dev/null'
|
||||
|
||||
# linux only
|
||||
# if test -z "$XDG_RUNTIME_DIR"; then
|
||||
# export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX)
|
||||
# fi
|
88
config/common/zsh/.zshrc
Normal file
88
config/common/zsh/.zshrc
Normal file
|
@ -0,0 +1,88 @@
|
|||
# shellcheck disable=SC1091,SC1094,SC2206,SC2148
|
||||
|
||||
# macOS specific
|
||||
if [[ $(uname -s) = "Darwin" ]]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
# prepare directories
|
||||
mkdir -p "${XDG_CACHE_HOME}/zsh"
|
||||
mkdir -p "${XDG_DATA_HOME}/zsh"
|
||||
|
||||
# history settings
|
||||
export HISTFILE="${XDG_DATA_HOME}/zsh/history"
|
||||
export HISTSIZE=10000
|
||||
export SAVEHIST=$HISTSIZE
|
||||
setopt EXTENDED_HISTORY
|
||||
setopt HIST_EXPIRE_DUPS_FIRST
|
||||
setopt HIST_FIND_NO_DUPS
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt HIST_REDUCE_BLANKS
|
||||
setopt HIST_SAVE_NO_DUPS
|
||||
setopt INC_APPEND_HISTORY
|
||||
setopt SHARE_HISTORY
|
||||
rm -rf "${ZDOTDIR}/.zsh_history" && ln -sf "${XDG_DATA_HOME}/zsh/history" "${ZDOTDIR}/.zsh_history"
|
||||
|
||||
# set path
|
||||
path=(~/.local/bin "${path[@]}")
|
||||
|
||||
# source configuration
|
||||
source "${ZDOTDIR}/aliases.zsh"
|
||||
source "${ZDOTDIR}/keys.zsh"
|
||||
source "${ZDOTDIR}/fzf.zsh"
|
||||
## it has to be last
|
||||
source "${ZDOTDIR}/atuin.zsh"
|
||||
|
||||
# set fpath
|
||||
fpath=(~/.local/git/zsh_modules/wd $fpath)
|
||||
|
||||
# theme and colors
|
||||
if [[ $(command -v vivid) ]]; then
|
||||
LS_COLORS=$(vivid generate molokai)
|
||||
export LS_COLORS
|
||||
else
|
||||
unset LS_COLORS
|
||||
fi
|
||||
source ~/.local/git/zsh_modules/powerlevel10k/powerlevel10k.zsh-theme
|
||||
source "${ZDOTDIR}/p10k.zsh"
|
||||
if [[ -r "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# completion
|
||||
autoload -Uz compinit
|
||||
if [ ! -e "${XDG_DATA_HOME}/zsh/zcompdump.zwc" ]; then
|
||||
autoload -Uz zrecompile
|
||||
zrecompile -p -R "${XDG_DATA_HOME}/zsh/zcompdump"
|
||||
fi
|
||||
compinit -C -d "${XDG_DATA_HOME}/zsh/zcompdump"
|
||||
|
||||
zstyle ':completion:*' menu no
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
|
||||
zstyle ':fzf-tab:complete:cd:*' popup-pad 60 0
|
||||
zstyle ':fzf-tab:complete:diff:*' popup-min-size 80 12
|
||||
|
||||
# source modules
|
||||
source "${HOME}/.local/git/zsh_modules/fzf-tab/fzf-tab.plugin.zsh"
|
||||
source "${HOME}/.local/git/zsh_modules/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"
|
||||
source "${HOME}/.local/git/zsh_modules/wd/wd.plugin.zsh"
|
||||
export WD_CONFIG="${XDG_CONFIG_HOME}/wd_list"
|
||||
|
||||
# quick note functionality
|
||||
if [[ -f "${HOME}/.note" ]]; then
|
||||
echo
|
||||
cat "${HOME}/.note"
|
||||
echo
|
||||
fi
|
||||
|
||||
# cleaning
|
||||
rm -rf "${HOME}/.warprc"
|
||||
|
||||
# local settings
|
||||
if [[ -f "${HOME}/.local/config/zsh" ]]; then
|
||||
source "${HOME}/.local/config/zsh"
|
||||
fi
|
90
config/common/zsh/aliases.zsh
Normal file
90
config/common/zsh/aliases.zsh
Normal file
|
@ -0,0 +1,90 @@
|
|||
LOCAL_GIT_DIR=${HOME}/.local/git
|
||||
|
||||
alias ga='git add .; git commit --no-edit --amend; git push --force-with-lease'
|
||||
alias gae='git add .; git commit --amend; git push --force-with-lease'
|
||||
gd() {
|
||||
curr_branch=$(git symbolic-ref --short -q HEAD)
|
||||
if [ $curr_branch = "master" ]; then
|
||||
echo "On master, aborting."
|
||||
return
|
||||
fi
|
||||
git checkout master
|
||||
git branch -D ${curr_branch}
|
||||
git pull
|
||||
}
|
||||
alias gl="git log --graph --abbrev-commit --date=short --pretty=format:'%Cred%h%Creset %Cgreen%cr%Creset: %s : %C(bold blue)%an%Creset %C(yellow)%d%Creset'"
|
||||
alias less='less -R'
|
||||
|
||||
if [[ $(command -v bat) ]]; then
|
||||
alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Bright'
|
||||
fi
|
||||
|
||||
if [[ $(command -v curlie) ]]; then
|
||||
alias curl=curlie
|
||||
fi
|
||||
|
||||
if [[ $(command -v eza) ]]; then
|
||||
alias ls='eza --git --octal-permissions --no-permissions --group-directories-first'
|
||||
alias ll='eza --git --octal-permissions --no-permissions --group-directories-first -l'
|
||||
else
|
||||
case $(uname -s) in;
|
||||
Darwin) alias ls='ls -G';;
|
||||
Linux) alias ls='ls --color';;
|
||||
esac
|
||||
alias ll='ls -l'
|
||||
fi
|
||||
|
||||
if [[ $(command -v fd) ]]; then
|
||||
if [[ -f ~/.local/config/fd ]]; then
|
||||
alias fd='fd -H -L --ignore-file ~/.local/config/fd'
|
||||
else
|
||||
alias fd='fd -H -L'
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $(command -v nvim) ]; then
|
||||
vim() {
|
||||
nvim $*; printf "\e[6 q"
|
||||
}
|
||||
vimdiff() {
|
||||
nvim -d $*; printf "\e[6 q"
|
||||
}
|
||||
export EDITOR=nvim
|
||||
export MANPAGER="nvim +Man!"
|
||||
elif [ $(command -v vim) ] ; then
|
||||
export EDITOR=vim
|
||||
else
|
||||
export EDITOR=vi
|
||||
fi
|
||||
|
||||
if [[ $(command -v rg) ]]; then
|
||||
alias grep='rg -i'
|
||||
else
|
||||
alias grep='grep --color'
|
||||
fi
|
||||
|
||||
function ud() {
|
||||
for i in ${LOCAL_GIT_DIR}/dotfiles ${LOCAL_GIT_DIR}/zsh_modules/*; do git -C ${i} pull; done
|
||||
. "${LOCAL_GIT_DIR}/dotfiles/_scripts/scripts/post-update.sh"
|
||||
}
|
||||
|
||||
function upgrade() {
|
||||
if [ $(uname -s) = "Darwin" ]; then
|
||||
brew update && brew upgrade && brew upgrade --cask --greedy -f && brew autoremove && brew cleanup
|
||||
rm -rf ~/Library/Caches/Homebrew/*
|
||||
elif [ $(uname -s) = "FreeBSD" ]; then
|
||||
pkg update -f
|
||||
pkg upgrade
|
||||
pkg autoremove
|
||||
freebsd-update fetch
|
||||
freebsd-update install
|
||||
rm -rf /var/cache/pkg/*
|
||||
pkg audit -F
|
||||
else
|
||||
case $(lsb_release -si 2>/dev/null) in
|
||||
Gentoo) eix-sync && eix-update && emerge -avuNDU @world ;;
|
||||
Ubuntu) apt update && apt upgrade ;;
|
||||
VoidLinux) xbps-install -Su && xbps-remove -RoO && xlocate -S && du -sh /var/cache/xbps && rm -rf /var/cache/xbps/* ;;
|
||||
esac
|
||||
fi
|
||||
}
|
3
config/common/zsh/atuin.zsh
Normal file
3
config/common/zsh/atuin.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
if [[ $(command -v atuin) ]]; then
|
||||
eval "$(atuin init zsh --disable-up-arrow)"
|
||||
fi
|
20
config/common/zsh/fzf.zsh
Normal file
20
config/common/zsh/fzf.zsh
Normal file
|
@ -0,0 +1,20 @@
|
|||
if [[ $(command -v fzf) ]]; then
|
||||
source <(fzf --zsh)
|
||||
export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.local/config/fd'
|
||||
export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file ~/.local/config/fd'
|
||||
FZF_COLORS='
|
||||
--color=fg:#f8f8f2,bg:#272822
|
||||
--color=hl:#fd4285,hl+:#fd4285
|
||||
--color=info:#e5da72,gutter:#272822,pointer:#fd4285,marker:#fd4285
|
||||
--border=none --preview=sharp --layout=reverse
|
||||
--prompt="> " --marker=">" --separator="" --scrollbar="│"
|
||||
'
|
||||
export FZF_DEFAULT_OPTS=${FZF_COLORS}" --multi -e --ansi --preview='bat --color=always --tabs=2 --style=plain --theme=Monokai\ Extended\ Bright {}'"
|
||||
export FZF_CTRL_R_OPTS=${FZF_COLORS}" -e --ansi --preview=''"
|
||||
_fzf_compgen_path() {
|
||||
fd -H -L --ignore-file "${HOME}/.local/config/fd" . "$1"
|
||||
}
|
||||
_fzf_compgen_dir() {
|
||||
fd -H -L --ignore-file "${HOME}/.local/config/fd" --type d . "$1"
|
||||
}
|
||||
fi
|
22
config/common/zsh/keys.zsh
Normal file
22
config/common/zsh/keys.zsh
Normal file
|
@ -0,0 +1,22 @@
|
|||
# key mode
|
||||
bindkey -e
|
||||
|
||||
# proudly stolen from oh-my-zsh
|
||||
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
|
||||
function zle-line-init() {
|
||||
echoti smkx
|
||||
}
|
||||
function zle-line-finish() {
|
||||
echoti rmkx
|
||||
}
|
||||
zle -N zle-line-init
|
||||
zle -N zle-line-finish
|
||||
fi
|
||||
if [[ -n "${terminfo[kcuu1]}" ]]; then
|
||||
autoload -U up-line-or-beginning-search
|
||||
zle -N up-line-or-beginning-search
|
||||
|
||||
bindkey -M emacs "${terminfo[kcuu1]}" up-line-or-beginning-search
|
||||
bindkey -M viins "${terminfo[kcuu1]}" up-line-or-beginning-search
|
||||
bindkey -M vicmd "${terminfo[kcuu1]}" up-line-or-beginning-search
|
||||
fi
|
166
config/common/zsh/p10k.zsh
Normal file
166
config/common/zsh/p10k.zsh
Normal file
|
@ -0,0 +1,166 @@
|
|||
'builtin' 'local' '-a' 'p10k_config_opts'
|
||||
[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')
|
||||
[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')
|
||||
[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
|
||||
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
|
||||
|
||||
() {
|
||||
emulate -L zsh -o extended_glob
|
||||
|
||||
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
|
||||
autoload -Uz is-at-least && is-at-least 5.1 || return
|
||||
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
||||
# aws
|
||||
# terraform
|
||||
# kubecontext
|
||||
# newline
|
||||
virtualenv
|
||||
context
|
||||
dir
|
||||
vcs
|
||||
background_jobs
|
||||
prompt_char
|
||||
)
|
||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||
command_execution_time
|
||||
vi_mode
|
||||
)
|
||||
|
||||
typeset -g POWERLEVEL9K_MODE=nerdfont-complete
|
||||
typeset -g POWERLEVEL9K_ICON_PADDING=none
|
||||
typeset -g POWERLEVEL9K_BACKGROUND=
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE=
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' '
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR=
|
||||
typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true
|
||||
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
|
||||
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=
|
||||
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=
|
||||
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
||||
typeset -g POWERLEVEL9K_SHOW_RULER=false
|
||||
typeset -g POWERLEVEL9K_RULER_CHAR='─'
|
||||
typeset -g POWERLEVEL9K_RULER_FOREGROUND=240
|
||||
|
||||
# prompt symbol
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❯'
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❯'
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='❯'
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
|
||||
|
||||
# working directory
|
||||
typeset -g POWERLEVEL9K_DIR_FOREGROUND=37
|
||||
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
||||
typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
|
||||
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
|
||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=37
|
||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=false
|
||||
local anchor_files=(
|
||||
.git
|
||||
)
|
||||
typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
|
||||
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=last
|
||||
typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
|
||||
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
|
||||
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
|
||||
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
|
||||
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
|
||||
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
|
||||
typeset -g POWERLEVEL9K_DIR_CLASSES=()
|
||||
|
||||
# vcs
|
||||
typeset -g POWERLEVEL9K_VCS_FOREGROUND=246
|
||||
typeset -g POWERLEVEL9K_VCS_LOADING_FOREGROUND=240
|
||||
typeset -g POWERLEVEL9K_VCS_LOADING_TEXT=
|
||||
typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0
|
||||
typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=
|
||||
typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind git-stash)
|
||||
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=''
|
||||
typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@'
|
||||
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON=
|
||||
typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*'
|
||||
typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣'
|
||||
typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡'
|
||||
typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1
|
||||
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }'
|
||||
typeset -g POWERLEVEL9K_VCS_STASH_ICON='≡'
|
||||
typeset -g POWERLEVEL9K_VCS_GIT_ICON='\uF126'
|
||||
typeset -g POWERLEVEL9K_VCS_GIT_GITHUB_ICON='\uF126'
|
||||
typeset -g POWERLEVEL9K_VCS_GIT_GITLAB_ICON='\uF126'
|
||||
typeset -g POWERLEVEL9K_VCS_GIT_BITBUCKET_ICON='\uF126'
|
||||
|
||||
# command_execution_time
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=2
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=220
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION=''
|
||||
|
||||
# background_jobs
|
||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
|
||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70
|
||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⇶'
|
||||
|
||||
# context (username/hostname)
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=196
|
||||
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=
|
||||
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'
|
||||
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
|
||||
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
|
||||
typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
|
||||
|
||||
# virtualenv
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=15
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
||||
|
||||
# kubecontext
|
||||
#typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile'
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION="☸"
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
|
||||
# '*prod*' PROD # These values are examples that are unlikely
|
||||
'*' DEFAULT)
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=38
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
|
||||
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
|
||||
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
|
||||
|
||||
# terraform
|
||||
typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false
|
||||
typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
|
||||
# '*prod*' PROD # These values are examples that are unlikely
|
||||
'*' DEFAULT)
|
||||
typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND=38
|
||||
|
||||
# aws
|
||||
#typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|terraform|aws-mfa'
|
||||
typeset -g POWERLEVEL9K_AWS_CLASSES=(
|
||||
# '*prod*' PROD # These values are examples that are unlikely
|
||||
'*' DEFAULT)
|
||||
typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
|
||||
|
||||
# vi_mode
|
||||
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
|
||||
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING='CMD '
|
||||
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=15
|
||||
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=1
|
||||
|
||||
# other settings
|
||||
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=same-dir
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
||||
(( ! $+functions[p10k] )) || p10k reload
|
||||
}
|
||||
|
||||
typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
|
||||
|
||||
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
|
||||
'builtin' 'unset' 'p10k_config_opts'
|
6
config/common/zsh/ssh.zsh
Normal file
6
config/common/zsh/ssh.zsh
Normal file
|
@ -0,0 +1,6 @@
|
|||
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
||||
ssh-agent > "$XDG_CACHE_HOME/ssh-agent.env"
|
||||
fi
|
||||
if [[ ! "$SSH_AUTH_SOCK" ]]; then
|
||||
source "$XDG_CACHE_HOME/ssh-agent.env" >/dev/null
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue