I'm working on a shell script that displays information like the calendar, datetime, and CPU usage in Rofi, but I'm struggling with how to style the output. I found a configuration file named config.rasi that resembles CSS, but whenever I try to use HTML tags in my output, like the span tag, it just displays the code instead of formatting the text. I've checked the manual but didn't find the answer I'm looking for. If anyone can help me understand how to format my text properly in Rofi, I'd really appreciate it!
2 Answers
To style your text in Rofi, you need to modify the config.rasi file, which indeed acts like CSS. If you're trying to implement HTML styling, remember that Rofi doesn’t interpret HTML directly; it displays the tags as text. Instead, you should familiarize yourself with Rofi's specific styling rules in the Rasi format. Check out examples of existing themes to see how they achieve different styles with plain text and Rasi syntax.
You might want to look into the specific classes and elements that Rofi supports. It doesn't use standard HTML/CSS formatting fully, so simple span tags won’t work. Focus on defining styles within the config.rasi file using Rofi's syntax. Try running tests with plain text first to ensure styling is applied correctly before bringing in more complex outputs.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically