Skip to content

Instantly share code, notes, and snippets.

@subnut
subnut / transient_prompt.zsh
Last active June 25, 2024 12:48
Transient prompt for zsh (insipred by romkatv's powerlevel10k)
### Simple transient prompt
[[ -c /dev/null ]] || return
zmodload zsh/system || return
## Set the transient prompt PROMPT here -
TRANSIENT_PROMPT='%# ' # Sample value
function set_prompt {
## Set the values of PROMPT and RPROMPT here
# nix-env -p /nix/var/nix/profiles/system --delete-generations old
# nix-collect-garbage -d
# nix-env -p /nix/var/nix/profiles/system --list-generations
## Remove entries from /boot/loader/entries:
# sudo bash -c "cd /boot/loader/entries; ls | grep -v <current-generation-name> | xargs rm"