1
0
Fork 0
mirror of https://gitlab.com/mlunax/dotfiles.git synced 2025-04-12 05:40:17 +00:00

add new prompt

This commit is contained in:
Luna 2024-04-19 16:40:47 +02:00
parent a6bcefd246
commit c1e7c19ca6

23
.zshrc
View file

@ -10,14 +10,27 @@ export TERM="xterm-256color"
export OTHER=$HOME/.zsh
export ZSH=$HOME/.oh-my-zsh
__ptrc_prompt() {
local c_green=$'%{\x1b[32m%}'
local c_blue=$'%{\x1b[34m%}'
local c_reset=$'%{\x1b[0m%}'
local c_red=$'%{\x1b[31m%}'
local c_cyan=$'%{\x1b[36m%}'
if [ "$SSH_TTY" ]; then
local hostprefix="${c_red}${USER}${c_reset}@${c_cyan}${HOST} "
else
local hostprefix=""
fi
echo "${hostprefix}${c_blue}%~ ${c_green}>$c_reset "
}
if iscmd starship; then
source <(starship init zsh --print-full-init)
else
export ZSH_THEME="powerlevel10k/powerlevel10k"
source $OTHER/powerlevel_settings.sh
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
setopt promptsubst
export PS1='$(__ptrc_prompt)'
fi
if [ -d /usr/share/zsh/plugins ] && [ -d /usr/share/zsh/plugins/zsh-autosuggestions ]; then