feat: simpler zsh prompt

This commit is contained in:
AngeD 2022-12-11 01:35:20 +01:00
parent 9d7d5c02ad
commit abd62fcf14
4 changed files with 18 additions and 1752 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,5 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of "$ZDOTDIR"/.zshrc. # If you come from bash you might have to change your $PATH.
# Initialization code that may require console input (password prompts, [y/n] # export PATH=$HOME/bin:/usr/local/bin:$PATH
# 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
. "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH="$ZDOTDIR/ohmyzsh" export ZSH="$ZDOTDIR/ohmyzsh"
@ -12,7 +8,7 @@ export ZSH="$ZDOTDIR/ohmyzsh"
# load a random theme each time oh-my-zsh is loaded, in which case, # 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 # to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k" ZSH_THEME="simpletheme"
# Set list of themes to pick from when loading at random # Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load # Setting this variable when ZSH_THEME=random will cause zsh to load
@ -74,7 +70,7 @@ zstyle ':omz:update' mode disabled # disable automatic updates
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
plugins=(git vi-mode colored-man-pages gitignore) plugins=(vi-mode colored-man-pages kube-ps1 timer git gitignore)
. "$ZSH"/oh-my-zsh.sh . "$ZSH"/oh-my-zsh.sh
@ -95,9 +91,6 @@ plugins=(git vi-mode colored-man-pages gitignore)
# Compilation flags # Compilation flags
# export ARCHFLAGS="-arch x86_64" # export ARCHFLAGS="-arch x86_64"
# To customize prompt, run `p10k configure` or edit "$ZDOTDIR"/.p10k.zsh.
[[ ! -f "$ZDOTDIR"/.p10k.zsh ]] || . "$ZDOTDIR"/.p10k.zsh
. "$ZDOTDIR"/.docker_aliases . "$ZDOTDIR"/.docker_aliases
. "$ZDOTDIR"/.kubectl_aliases . "$ZDOTDIR"/.kubectl_aliases
. "$ZDOTDIR"/.zsh_aliases . "$ZDOTDIR"/.zsh_aliases

View File

@ -0,0 +1,13 @@
PROMPT='
$(kube_ps1)
%(?::%{$fg_bold[red]%}%? )%{$fg[cyan]%}%~%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
KUBE_PS1_PREFIX=
KUBE_PS1_SEPARATOR=' '
KUBE_PS1_DIVIDER=/
KUBE_PS1_SUFFIX=

@ -1 +1 @@
Subproject commit f4dc8c5be365668810783ced01a86ff8f251bfd7 Subproject commit 82c0db41bcfd3fd97d6170dcb7575f98e38fc68d