powerlevel10k
powerlevel10k copied to clipboard
Bold the entire vcs segment
Is there a way to make the entire vcs segment bold? I tried the following based on https://github.com/romkatv/powerlevel10k/issues/1063#issuecomment-712649752:
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='%B[$P9K_CONTENT]%b'
But that only bolds the [:
My guess is that somewhere in $P9K_CONTENT there's an %b or similar that is resetting formatting so the bold doesn't get applied. How do I work around this?
So I came up with a workaround. First to find what the contents looked like in the first place:
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='$(print -r -- "$P9K_CONTENT" > /tmp/a.txt)'
Which shows:
❯ cat /tmp/a.txt
%b%k%F{005}main%b%k%F{005}%b%k%F{005} !1
So yeah, the %b and %k is escaping the bold.
So, one hacky thing you could do is just append %B after each %k:
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='%B[${P9K_CONTENT//\%k/${MATCH}%B}]%b'
There's probably a better solution (please let me know!), but this works (for now).