Hi. I’ve been using powerlevel10k for a long time, but a few days ago, I decided I wanted to customize it a bit. I opened the .p10k.zsh file, and I was shocked. It’s really massive, with TONS of options. I’ve been digging through for a few hours already, and it’s absolutely amazing how much you can customize it without actually programming anything. I was wondering what other people are using. So my questions are:
- Do you customize your shell prompt?
- If yes, do you use some framework or pre-made theme, or do you just configure it the vanilla way in your bashrc/zshrc/…
- How is your experiences with it so far?
- Share screenshot of your prompts, please (Sadly, my prompt is currently half done, so I can’t really share it)
Zsh and Starship.rs on top with few extra minor things. I like my shell fast and clean.
I’m using guake
I like that it’s just the F12 key away then F11 to expand to full window. Supports multiple tabs.
Anyone using guake?
There are two usability tweaks that I would find it hard to live without: (1) red prompt on last-command failure, and (2) highlight what I type, dehighlight output:
Reason for 1 is obvious, 2 is more subtle: it helps my eye scan scrollback and identify what I’ve typed, which is what I’m scanning for 90% of the time.
Implementations vary, here’s how I do it in zsh:
PS1='%(?.%K{cyan}%F{white}.%B%K{red}%F{white})XX%b%k%f %(?.%F{cyan}.%F{red})yyy%k%b%F{yellow}%(!.#.$)%f '
. Duplication is evil, but AFAIK necessary because the conditional (error check) is%(?
and I highlight both parts of my two-part prompt. Suggestions welcome for removing the duplication.zle_highlight=("default:fg=white")
(on a Solarized Dark term, where the default fg color is light gray. Adjust to fit your needs).
.bashrc:
# Prompt
# "Make it simple, just the dollar sign"
# "Say no more, fam"
# - if error code is not 0, then prepend [N] where N is the error code
# - if user is root, use red and #
blue='\e[34m'
red='\e[31m'
bold='\e[1m'
reset='\e[0m'
PS1='$( status=$?; [ $status -ne 0 ] && echo "[$status] ")\['"$blue""$bold"'\]$\['"$reset"'\] '
if [[ $EUID -eq 0 ]]; then
PS1='$( status=$?; [ $status -ne 0 ] && echo "[$status] ")\['"$red""$bold"'\]#\['"$reset"'\] '
fi
.inputrc:
# vi mode, change to 'emacs' here if you prefer
set editing-mode vi
# vi INSERT prompt
set vi-ins-mode-string "\1\e[30;44m\2 INS \1\e[0m\2 "
# vi NORMAL prompt
set vi-cmd-mode-string "\1\e[30;47m\2 NOR \1\e[0m\2 "
PS1="> "