polybar / polybar-scripts

This is a community project. We write and collect scripts for polybar!
The Unlicense
2.46k stars 338 forks source link

[bug] info-cava.py is not work #417

Closed awarewen closed 1 year ago

awarewen commented 1 year ago

Info-cava.py script output in the wrong position

https://user-images.githubusercontent.com/53365857/228590251-7c7d0057-0e99-439e-a28d-74a51bc623fe.mp4

OS: arch linux Terminal: kitty bar: polybar Run Command: polybar -c ~/todo/dots-2.0/Configs/eww/mybar/polybar.ini cava& > /dev/null

x70b1 commented 1 year ago

You should check your used font first. Your polybar drops the output because the font that you use can not display the chars. That what the warning output is for.

awarewen commented 1 year ago

image I'm sorry to reopen this issue, as I only had time to look into it today due to some other reasons. I have checked the Polybar WIKI and defined a font according to its format, but it seems that the font is not being loaded correctly according to the logs in Polybar. Thank you for this project, it's really cool.

awarewen commented 1 year ago

image

https://user-images.githubusercontent.com/53365857/231460039-24256d53-9b29-4a4a-96d3-0202704cdc74.mp4

My Kitty terminal is also using this font. From the status of the widget, it seems that the correct characters have passed the detection and are displayed on the bar, but only as empty characters (I described it poorly).

:crying_cat_face:

awarewen commented 1 year ago

image

It's Done! It's great!

It's really the font. Polybar checks the fonts in the user directory, but the fonts I installed with 'Yay' are under `/usr/share/fonts/' and need to be moved to the user directory: ' ~/. Local/share/fonts'

And set the font index in the configuration [ bar/XX ] , but I don't quite understand the rules for the name (why 'Iosevka' instead of 'Iosevka') , and finally specify the index in [ module ] .

Thanks for help. :cat2:

x70b1 commented 1 year ago

polybar should also read the fonts from /usr/share/fonts. Now you use Iosevka instead of Caskaydia. That could solved the issue.

The wiki page is a great start to play around with fonts.

But yeah, fonts are probably the topic with the most questions on polybar.