powerlevel10k icon indicating copy to clipboard operation
powerlevel10k copied to clipboard

Bold fonts with directory shorten strategy set to "truncate_to_unique"

Open tgdfool2 opened this issue 3 years ago • 1 comments

Hi All,

I would like to set the font as bold for the current directory when using the trucate_to_unique strategy. How can I achieve this? I managed to set all the other segments as bold, but not the directory. Here is how my current setup looks like: image

I also tried with truncate_from_right and also here, I am not able to get bold fonts.

Thanks in advance for your help!

tgdfool2 avatar Sep 14 '22 10:09 tgdfool2

Looks like setting POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD=true makes the right most directory bold. But it is rather an undocumented feature; found it by chance in a forum.

Any way to get the full path highlighted in bold?

tgdfool2 avatar Sep 14 '22 10:09 tgdfool2

Any way to get the full path highlighted in bold?

I don't think there is a way to make the whole directory bold when using trucate_to_unique. For some other truncation strategies POWERLEVEL9K_DIR_CONTENT_EXPANSION='%B$P9K_CONTENT%b' should work.

romkatv avatar Sep 16 '22 07:09 romkatv

Thanks for your answer @romkatv.

Quickly tested this setting with truncate_from_right and it does almost the job. The icon and middle segments remain plain though: image

tgdfool2 avatar Sep 16 '22 08:09 tgdfool2

That doesn't surprise me.

romkatv avatar Sep 16 '22 08:09 romkatv