[GH-ISSUE #1371] Built-in profiles conflict with user configuration #7431

Closed
opened 2026-05-23 02:54:24 +01:00 by JakeStanger · 4 comments
Owner

Originally created by @itshog on GitHub (Feb 13, 2026).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1371

As stated in the wiki, the new brightness module ships with default profiles which set the icon according to the percentage. This seems to override the user-specified format property: in particular, my use case is showing the number without the percentage symbol (I use a vertical bar, so having the "%" symbols takes up unnecessary space and I find it quite ugly), but something like this doesn't work:

[[end]]
type = "brightness"
format = "{percentage}"
justify = "center"

[end.mode]
type = "systemd"
subsystem = "backlight"

In fact, I believe that the format option is overridden by the profiles which set the icons. Interestingly though I found out that the only way to override these profiles is by creating a new one for each of the levels mentioned in the wiki: for instance, something like the following only works when the percentage is exactly 30, everything below will still have the built-in formatting with the percentage symbol.

[[end]]
type = "brightness"
format = "{percentage}"
justify = "center"

[end.mode]
type = "systemd"
subsystem = "backlight"

[end.profiles.30]
when = 30
format = "\n{percentage}"

I hope this could be fixed, and thanks for the amazing project!

Originally created by @itshog on GitHub (Feb 13, 2026). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1371 As stated in the [wiki](https://github.com/JakeStanger/ironbar/wiki/brightness#icons), the new brightness module ships with default profiles which set the icon according to the percentage. This seems to override the user-specified `format` property: in particular, my use case is showing the number _without_ the percentage symbol (I use a vertical bar, so having the "%" symbols takes up unnecessary space and I find it quite ugly), but something like this doesn't work: ```toml [[end]] type = "brightness" format = "{percentage}" justify = "center" [end.mode] type = "systemd" subsystem = "backlight" ``` In fact, I believe that the `format` option is overridden by the profiles which set the icons. Interestingly though I found out that the only way to override these profiles is by creating a new one _for each of the levels mentioned in the wiki_: for instance, something like the following only works when the percentage is exactly 30, everything below will still have the built-in formatting with the percentage symbol. ```toml [[end]] type = "brightness" format = "{percentage}" justify = "center" [end.mode] type = "systemd" subsystem = "backlight" [end.profiles.30] when = 30 format = "\n{percentage}" ``` I hope this could be fixed, and thanks for the amazing project!
Author
Owner

@JakeStanger commented on GitHub (Feb 13, 2026):

Thanks for reporting. I was somewhat aware this was going to be a potential issue but I guess I underestimated it.

I think what we need is the ability to disable the defaults. There's a couple of potential solutions here that I see:

  1. Setting any profiles yourself completely overwrites the defaults. So profiles = {} means you'd have a clean slate.
  2. Keep the current merge behaviour, and add a use_default_profiles boolean option, which could be set to false to avoid merging in the defaults.

Additionally we might want to change the merge behaviour, although I'm struggling to see how that would help in this case. Ideas welcome though

<!-- gh-comment-id:3899363910 --> @JakeStanger commented on GitHub (Feb 13, 2026): Thanks for reporting. I was somewhat aware this was going to be a potential issue but I guess I underestimated it. I think what we need is the ability to disable the defaults. There's a couple of potential solutions here that I see: 1. Setting any profiles yourself completely overwrites the defaults. So `profiles = {}` means you'd have a clean slate. 2. Keep the current merge behaviour, and add a `use_default_profiles` boolean option, which could be set to false to avoid merging in the defaults. Additionally we might want to change the merge behaviour, although I'm struggling to see how that would help in this case. Ideas welcome though
Author
Owner

@itshog commented on GitHub (Feb 19, 2026):

  1. Keep the current merge behaviour, and add a use_default_profiles boolean option, which could be set to false to avoid merging in the defaults.

This second option seems reasonable to me, especially if the use_default_profiles option could be specified per-module, since a user may want to override the built-in profiles (and have a "clean slate") for a module and not for another. Thanks for looking into this!

<!-- gh-comment-id:3929817256 --> @itshog commented on GitHub (Feb 19, 2026): > 2. Keep the current merge behaviour, and add a `use_default_profiles` boolean option, which could be set to false to avoid merging in the defaults. This second option seems reasonable to me, especially if the `use_default_profiles` option could be specified per-module, since a user may want to override the built-in profiles (and have a "clean slate") for a module and not for another. Thanks for looking into this!
Author
Owner

@itshog commented on GitHub (Apr 5, 2026):

After further examination I believe the issue runs deeper than that: in fact, I tried to overwrite every possible brightness profile by specifying a custom profile for each integer from 1 to 100, and some of these profiles still aren't applied.

Now my config looks like this:

[end.profiles.51]
when = 51
format = "\n{percentage}"

[end.profiles.52]
when = 52
format = "\n{percentage}"

[end.profiles.53]
when = 53
format = "\n{percentage}"

[end.profiles.54]
when = 54
format = "\n{percentage}"

[end.profiles.55]
when = 55
format = "\n{percentage}"

[end.profiles.56]
when = 56
format = "\n{percentage}"

[end.profiles.57]
when = 57
format = "\n{percentage}"

[end.profiles.58]
when = 58
format = "\n{percentage}"

[end.profiles.59]
when = 59
format = "\n{percentage}"

[end.profiles.60]
when = 60
format = "\n{percentage}"

[end.profiles.61]
when = 61
format = "\n{percentage}"

[end.profiles.62]
when = 62
format = "\n{percentage}"

But for some reasons the percentage symbol still appears on some values, like 55:

Image
<!-- gh-comment-id:4188571505 --> @itshog commented on GitHub (Apr 5, 2026): After further examination I believe the issue runs deeper than that: in fact, I tried to overwrite every possible brightness profile by specifying a custom profile for each integer from 1 to 100, and some of these profiles still aren't applied. Now my config looks like this: ```toml [end.profiles.51] when = 51 format = "\n{percentage}" [end.profiles.52] when = 52 format = "\n{percentage}" [end.profiles.53] when = 53 format = "\n{percentage}" [end.profiles.54] when = 54 format = "\n{percentage}" [end.profiles.55] when = 55 format = "\n{percentage}" [end.profiles.56] when = 56 format = "\n{percentage}" [end.profiles.57] when = 57 format = "\n{percentage}" [end.profiles.58] when = 58 format = "\n{percentage}" [end.profiles.59] when = 59 format = "\n{percentage}" [end.profiles.60] when = 60 format = "\n{percentage}" [end.profiles.61] when = 61 format = "\n{percentage}" [end.profiles.62] when = 62 format = "\n{percentage}" ``` But for some reasons the percentage symbol still appears on some values, like 55: <img width="120" height="49" alt="Image" src="https://github.com/user-attachments/assets/2721dbab-eeca-496d-b3ea-fd73611528e9" />
Author
Owner

@JakeStanger commented on GitHub (Apr 20, 2026):

I'll be pushing up a PR in a second that adds the new use_default_profiles option. Would you be able to give that a go and see if it resolves the original issue please?

But for some reasons the percentage symbol still appears on some values, like 55:

This makes sense. The default profiles are merged in after the user profile due to some serde limitations. If the names match they are skipped, but your names differ (50, 60 instead of level50, level60) so the default profile ends up taking priory.

<!-- gh-comment-id:4283988353 --> @JakeStanger commented on GitHub (Apr 20, 2026): I'll be pushing up a PR in a second that adds the new `use_default_profiles` option. Would you be able to give that a go and see if it resolves the original issue please? > But for some reasons the percentage symbol still appears on some values, like 55: This makes sense. The default profiles are merged in *after* the user profile due to some serde limitations. If the names match they are skipped, but your names differ (`50`, `60` instead of `level50`, `level60`) so the default profile ends up taking priory.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#7431
No description provided.