greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

Regression in icon configuration location #1193

Closed xxxserxxx closed 3 years ago

xxxserxxx commented 3 years ago

I just pulled and built and am seeing an issue with the icon configuration:

[
[{"full_text":" Configuration error: failed to parse TOML from file contents.
Cause: Icon set 'awesome5' not found for key `icons` at line 92 column 1 ","name":"0","instance":"0","separator":false,"separator_block_width":0,"markup":"pango"}],

Configuration error: failed to parse TOML from file contents.
Cause: Icon set 'awesome5' not found for key `icons` at line 92 column 1

with the config:

[theme]
file = "ser"

[icons]
file = "awesome5"

It works if I copy the awesome5.toml file to $XDG_CONFIG_DIR and fully specify the path (just copying the file does not work):

[icons]
file = "/home/ser/.config/i3status-rust/themes/icons/awesome5.toml"

This is either a regression, or the wiki -- which says the path and suffix are optional -- is no longer correct. The regression happened between d0caebc2d0a7b2608746bcfaf87a6bfc1edd6a32 (works) and 4d55b1d94ee09cbdefd805841fb54a2a4a0663a4 (doesn't work).

ammgws commented 3 years ago

It's looking for the file in /home/ser/.config/i3status-rust/icons/ but you have it in /home/ser/.config/i3status-rust/themes/icons/. Can you confirm?

xxxserxxx commented 3 years ago

Yes, confirmed. Moving it (and the wiki is correct; I misread the instructions) and removing the full path works.

This is still a change from the previous behavior in the earlier version, where it was not necessary to copy the awesome5.toml file into $XDG_CONFIG_DIR. My previous config was:

[theme]
file = "ser"
[icon]
name = "awesome5"

which worked without the toml copy. With the upgrade, this broke, which lead to me changing name to file (since the wiki says name is an alias), which also did not work, which lead to copying the toml. Was this change intentional?

Edit: we can close this if the behavior change was intented, as the original bug was about behavior being different from the wiki, which is not true.

ammgws commented 3 years ago

Yes it was intentional in order to move all the theme/icon stuff out of the rust code. Listed as a breaking change here: https://github.com/greshake/i3status-rust/blob/master/NEWS.md

xxxserxxx commented 3 years ago

Ok, thanks; I'll start watching NEWS.md.