There were some requests to make a powerline prompt for manjaro-zsh-config some years ago. I made one, but I didn’t have time to upload it before my computer broke. However, I found that powerline 10k is better anyway. More features, better performance and more customization.
Powerline would be enabled only for terminals and disabled for TTY for compatibility reasons.
me I use powerline-go, less segments but compiled so more fast and run segments simultaneously not one by one
Also exists some written with rust as starship …
If it is just for the prompt I believe powerline is overkill.
I am using this customized theme for zsh:
PR_RST="%f"
if [[ $UID -eq 0 ]];
then
# root
ucolor="%F{196}"
pcolor="%F{196}"
hcolor="%F{208}"
else
# user
ucolor="%F{39}"
pcolor="%F{39}"
hcolor="%F{208}"
fi
PROMPT=$'
%{$ucolor%}[%n@${PR_RST}%{$hcolor%}%m%{$ucolor%}] ${PR_RST}%{$pcolor%}%d${PR_RST}
%{$pcolor%}%i#${PR_RST} '
And it looks like this:
I find it important to see the username, the hostname and the working directory on a separate line so that there is a full line available for long commandlines. And the color coding is for convenience. With different colors for the root user.
I wanted to upload a screenshot of it, but I am not allowed to add a “media file” to this post. Hmmm.
I also tried that, but it seemed less configurable. Also, powerline10k acts as fast, because it draws the prompt when the other plug-ins are still loading.
Naturally
I think the exit code is also very useful. I hadn’t thought I needed the execution time of the previous command, but now that I have it, I like it. Also, the got stuff is useful if you use git.
Anyway, I’m open to other powerline implementations too, and also other ideas if we end up not going with powerline.