[GH-ISSUE #80] Support for simple labels #1452

Closed
opened 2026-05-22 22:52:22 +01:00 by JakeStanger · 2 comments
Owner

Originally created by @JustSimplyKyle on GitHub (Mar 1, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/80

Is your feature request related to a problem? Please describe.
currently(at least not without using the custom module), it's not possible to create a module that has two running script. (see e.g.)
scripts/wifi_icon scripts/wifi_essid

Describe the solution you'd like
We can either expand the current script module(by adding an option maybe called format)
or create a new module that supports the short-hand for scripts({{script}})

Describe alternatives you've considered
Using the custom module, which works but... it's not elegant
Additional context
While using the custom module workaround. I've found one tiny issue with the label set to this{{100:scripts/wifi_icon scripts/wifi_essid}}
it sometimes would output this instead. but sometimes it works.
image
i'm guessing it's somewhat of an racing condition? or does ironbar simply output the script which got executed first

Originally created by @JustSimplyKyle on GitHub (Mar 1, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/80 **Is your feature request related to a problem? Please describe.** currently(at least not without using the custom module), it's not possible to create a module that has two running script. (see e.g.) `scripts/wifi_icon scripts/wifi_essid` **Describe the solution you'd like** We can either expand the current script module(by adding an option maybe called `format`) or create a new module that supports the short-hand for scripts(`{{script}}`) **Describe alternatives you've considered** Using the custom module, which works but... it's not elegant **Additional context** While using the custom module workaround. I've found one tiny issue with the label set to this`{{100:scripts/wifi_icon scripts/wifi_essid}}` it *sometimes* would output this instead. but *sometimes* it works. ![image](https://user-images.githubusercontent.com/68589851/222185283-02a4dc7c-da21-4ea7-8246-128e8092bde2.png) i'm guessing it's somewhat of an racing condition? or does ironbar simply output the script which got executed first
Author
Owner

@JakeStanger commented on GitHub (Mar 1, 2023):

Agreed it could be more elegant for simple scenarios like this. I'm not sure how I want to tackle it yet, but will do some planning when I look at the other changes for 0.12. This will be fairly low priority, since there is a working solution for this already via custom.

Regarding the additional context, the system to embed scripts within text is shared across the bar, so I am almost certain that is the same issue as #69. It most likely is a race condition in that the first script to return gets added first, which is not supposed to happen. I'm hoping to look at that in the next few days.

<!-- gh-comment-id:1450692906 --> @JakeStanger commented on GitHub (Mar 1, 2023): Agreed it could be more elegant for simple scenarios like this. I'm not sure how I want to tackle it yet, but will do some planning when I look at the other changes for 0.12. This will be fairly low priority, since there is a working solution for this already via `custom`. Regarding the additional context, the system to embed scripts within text is shared across the bar, so I am almost certain that is the same issue as #69. It most likely is a race condition in that the first script to return gets added first, which is not supposed to happen. I'm hoping to look at that in the next few days.
Author
Owner

@JakeStanger commented on GitHub (Apr 7, 2023):

I've opted to add a new module called label which takes a single label option. The eventual plan is to migrate custom to use the modules, so that it relies on this new module to remove the duplication.

<!-- gh-comment-id:1500289505 --> @JakeStanger commented on GitHub (Apr 7, 2023): I've opted to add a new module called `label` which takes a single `label` option. The eventual plan is to migrate `custom` to use the modules, so that it relies on this new module to remove the duplication.
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#1452
No description provided.