zsh: Add ps1

This commit is contained in:
caem 2025-06-12 20:17:41 +02:00
parent 37fa71fde7
commit 585379ecbd
Signed by: caem
GPG key ID: 69A830D03203405F
2 changed files with 23 additions and 4 deletions

20
.zshrc
View file

@ -217,7 +217,6 @@ zstyle ':fzf-tab:complete:*' fzf-preview '
# on something that it should not be. This is the only way to do this. # on something that it should not be. This is the only way to do this.
zstyle ':fzf-tab:complete:*:options' fzf-preview zstyle ':fzf-tab:complete:*:options' fzf-preview
zstyle ':fzf-tab:complete:*:argument-1' fzf-preview zstyle ':fzf-tab:complete:*:argument-1' fzf-preview
zstyle ':fzf-tab:complete:*:argument-rest' fzf-preview
zstyle ':fzf-tab:complete:*:option--*' fzf-preview zstyle ':fzf-tab:complete:*:option--*' fzf-preview
autoload -Uz compinit autoload -Uz compinit
@ -231,6 +230,7 @@ alias ls="eza"
alias l="ls -la --icons --git" alias l="ls -la --icons --git"
alias cat="batcat --paging=never --style=numbers" alias cat="batcat --paging=never --style=numbers"
alias pussy="command cat" alias pussy="command cat"
alias reload="exec zsh"
alias nano="emacs -nw" alias nano="emacs -nw"
alias vi="emacs -nw" alias vi="emacs -nw"
@ -298,6 +298,18 @@ if [ -n "$(command -v pip3)" ] && [ -n "$(command -v virtualenv)" ]; then
source "$HOME/.local/share/python3-venv/bin/activate" source "$HOME/.local/share/python3-venv/bin/activate"
fi fi
# ==== GUIX_PROFILE="$HOME/.guix-profile"
# Misc source "$GUIX_PROFILE/etc/profile"
# ====
# ======
# Prompt
# ======
setopt prompt_subst
autoload -Uz vcs_info
NL=$'\n'
zstyle ':vcs_info:*' formats '%F{yellow}(%b)%f'
precmd () {
vcs_info
export PS1="%F{cyan}%*%f %F{green}%~%f ${vcs_info_msg_0_}${NL}%F{red}%(?..[%?] )%F{yellow}λ%f "
}

7
scripts/bootstrap vendored
View file

@ -18,5 +18,12 @@ sudo apt install -y \
sudo snap install --classic ghostty sudo snap install --classic ghostty
sudo snap install --classic emacs sudo snap install --classic emacs
zsh_path="$(command -v zsh)"
if [ -x "$zsh_path" ]; then
sudo chsh "$USER" -s "$zsh_path"
else
echo "$zsh_path is not executable!"
fi
guix pull guix pull
guix install guile-lsp-server guix install guile-lsp-server