i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

Support non-pango fonts

Open YarekTyshchenko opened this issue 2 years ago • 6 comments

Seems to be related to this?:

https://github.com/greshake/i3status-rust/blob/325f6de4a20799625b7ae6c95a2c7e2241d06c3d/src/widget.rs#L94

2023-04-06-133155_117x38_scrot

[[block]]
block = "custom_dbus"
path = "/foo"
format = "$text.pango-str()"

Sending dbus command:

busctl --user call rs.i3status /foo rs.i3status.custom SetState s warning
busctl --user call rs.i3status /foo rs.i3status.custom SetText ss "1004" ""

Sending non-empty short-text doesn't seem to change anything

I'm using the semi-native theme, installed by copying the file and refering to it with full path. For some reason cargo didn't put themes into the expected location for me.

i3status-rs 0.30.6 (commit  )
i3 version 4.20.1 (2021-11-03) © 2009 Michael Stapelberg and contributors

YarekTyshchenko avatar Apr 06 '23 12:04 YarekTyshchenko

Which bar are you using?

MaxVerevkin avatar Apr 06 '23 12:04 MaxVerevkin

I just tested i3bar from i3 4.22-3 and it works fine.

MaxVerevkin avatar Apr 06 '23 12:04 MaxVerevkin

For some reason cargo didn't put themes into the expected location for me.

That's a limitation of cargo. See install.sh.

MaxVerevkin avatar Apr 06 '23 12:04 MaxVerevkin

Don't forget to enable pango in your config if you explicitly set font: https://github.com/greshake/i3status-rust#integrate-it-into-i3sway

MaxVerevkin avatar Apr 06 '23 12:04 MaxVerevkin

i3bar version 4.20.1 (2021-11-03) © 2010 Axel Wagner and contributors

My i3 settings are:

bar {
    status_command i3status-rs ~/.config/i3status-rs/config.toml
}

The issue seems to go away if I specify a pango font (font pango:monospace 12), but those fonts make the text blury, which is why I don't use them. Seems like a proper can of worms last time I looked into that issue. Any way around this?

Crisp: 2023-04-06-143534_158x29_scrot

Blurry: 2023-04-06-143513_116x30_scrot

YarekTyshchenko avatar Apr 06 '23 13:04 YarekTyshchenko

I can't get the <span/> to show up, but if you still see this problem you could test replacing the <span/> with \u{200b} (a zero width space)

bim9262 avatar Sep 13 '23 04:09 bim9262