You are not logged in.

#1 2022-03-11 20:18:05

sittingpapera
Member
Registered: 2022-03-11
Posts: 1

dwmblocks doesn't display icons properly

Hi everyone, I downloaded and built dwmblocks, and the first time I ran it, it couldn't show certain icons, so I edited the block scripts and put in my own icons, and removed the ^L ^K ^M characters they had, and now the icons are showing properly, but there still are some squares (like unrecognised characters) where there shouldn't be any icon (it adds squares around two of the blocks). Like this https://imgur.com/a/A5mMyRP
the temperature and battery icons are showing properly, but are surrounded by characters that shouldn't be there... I tried looking into the source code of dwmblocks, but I can't find anything that prints wierd characters. Any help?

Offline

#2 2022-03-12 09:43:45

drewcube
Member
Registered: 2022-03-06
Posts: 10

Re: dwmblocks doesn't display icons properly

This is a debugging event against your installed fonts and the script for that block.  There are also several dwmblocks implementations, and that might matter as well.  I like dwmblocks-async myself.

Take a block that isn't working right - meaning the output isn't correct.

In the script for that block, strip out or comment out the icons.  Start with just the numbers and get those right.  Then add spaces.  Likely the echo or printf commands have some hidden characters that are causing the blocks to appear.

Use the 'pkill -RTMIN+val dwmblocks' to have that block rest.  val is the appropriate column from the config.h file (may vary between dwmblock implementations).

You'll have to do some online sleuthing with your installed fonts to see what icons they support.  If you find suitable icons, add those back to your script.  if you don't find suitable replacements, find a font set that works for you.

Usually one or more of the nerd fronts have good enough icons to use.

Last edited by drewcube (2022-03-12 16:55:11)

Offline

Board footer

Powered by FluxBB