-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to define global pango markup wrappings #981
Comments
Sorry if I missed it but does this not also occur with i3pystatus? (Assuming it's the same as i3status-rust in that it outputs JSON for i3bar to parse and render) |
That's fine, I just wanted to know if they were somehow doing something different. icon_fmt looks ok but text_fmt may be non-trivial to implement if actual pango markup escaping is required (search the issue tracker for past issues wrt escaping). |
👍 Thanks for your input! I agree about |
Just a heads up, IIRC the only widget type that has pango support at the moment is the ButtonWidget, so you will have to add |
This might be quite difficult as not all icons are embedded in the same way and there might be variances between blocks. The easiest way to do it might be overriding the |
Thanks for that pointer @GladOSkar. This is my first time working on this repo, and I spent yesterday evening just reading around the source. My initial proto-prototype deals with calling I would love spend a little bit more time reading over how all of the blocks and widgets operate to see if there is a refactor that puts this logic in a very clean place, as well as addresses the I'll report back with my findings. |
Got a very early prototype working! Format string used:
The basic idea seems to work very nicely, and as expected, there is much work to be done with regard to pango-izing all of the blocks 🙂 @kepi I played around with some of the unicode whitespace characters as well while I was at it. The |
@kneitinger #1095 should cover the icon part of your request, would you like to try it out? |
@kneitinger Friendly nudge |
Hi thanks for the nudge, started using GitHub at work and my notifications exploded beyond usefulness 🙂 Picking up work on this again, happy to try out the icons and build on that great work! |
Hello all, great project! I'm in the process of porting my status from i3pystatus and having a wonderful time, but hit a small formatting roadblock that I wanted to get input on.
Problem Statement
I use an italic monospace font for i3, and due to that am having some issues with icon rendering in i3status-rs. All of my Font Awesome glyphs (both 4 and 5) are being italicized since my i3 bar config contains
As far as I can tell, while i3 does support fallback fonts, it does not have the ability to specify individual styles or sizes for them versus the intended font.
It appears as though I could possibly use
fontconfig
to tell the renderer to never apply italics toFont Awesome 5 Free
, but that is very cumbersome and I cannot imagine I'm the only one experiencing this issue.One way around this would be to use pango markup to in my TOML, such as:
if I want to keep my font the same, or
as well as my i3 workspace labels, if I switch my font to normal and italicize everything I want.
In either of these options, there is a ton of manual override, which isn't a pleasant user experience.
Proposed Solution
I was thinking that instead of having to manually adjust every icon, or every format string, there could be a top-level TOML setting that specifies the format that is applied to all icons and/or all text, such as:
where every icon or text string substitutes the
{}
in their respective formats.With something like this, I can largely rely on the wonderful defaults of the themes and blocks, but apply my own styling to a type of element, as opposed individual icons or block texts.
What are your thoughts? If this sounds like a good idea to folks, I'm happy to implement it...I just wanted to make sure that I'm not missing a super obvious solution, and that this is something people would want!
The text was updated successfully, but these errors were encountered: