[GH-ISSUE #1076] [FR] show one widget on multiple panels #1746

Open
opened 2026-05-22 22:54:29 +01:00 by JakeStanger · 3 comments
Owner

Originally created by @ildar on GitHub (Jul 6, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1076

Is your feature request related to a problem? Please describe.
Script driven widgets (e.g. a label with label: '{{date}}') may consume considerable amount of CPU and i/o. Showing such widgets in multiple panels multiplies the expenses.

Describe the solution you'd like
Having widgets displayed multiple times (on different panels). I.e. all scripts are run once and displayed multi-times.

Describe alternatives you've considered
Copy-pasting widgets makes extra CPU and i/o cunsumption

Additional context
Alternatively one panel could be shown on multiple screens with the mechanism described above.

Originally created by @ildar on GitHub (Jul 6, 2025). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1076 **Is your feature request related to a problem? Please describe.** Script driven widgets (e.g. a label with `label: '{{date}}'`) may consume considerable amount of CPU and i/o. Showing such widgets in multiple panels multiplies the expenses. **Describe the solution you'd like** Having widgets displayed multiple times (on different panels). I.e. all scripts are run once and displayed multi-times. **Describe alternatives you've considered** Copy-pasting widgets makes extra CPU and i/o cunsumption **Additional context** Alternatively one panel could be shown on multiple screens with the mechanism described above.
Author
Owner

@ildar commented on GitHub (Jul 6, 2025):

I just figured out that something can be done right now:

  1. use an ironvar as the value
  2. update that value in a pseudowidget

that'll save resources.

<!-- gh-comment-id:3041260158 --> @ildar commented on GitHub (Jul 6, 2025): I just figured out that something can be done right now: 1. use an ironvar as the value 2. update that value in a pseudowidget that'll save resources.
Author
Owner

@ildar commented on GitHub (Jul 6, 2025):

example:

ironvar_defaults:
  backlight: '?'
name: "top-panel"
    end:
    - type: label
      name: 'backlight'
      label: '🔅 #backlight%'
    - type: label
      name: 'updater_1s'
      label: >
        {{watch:1:
          while true; do
            ironbar var set backlight "$(light)" | sed s/ok//
            sleep 1
          done | tr -d '\n'
        }}
<!-- gh-comment-id:3041393113 --> @ildar commented on GitHub (Jul 6, 2025): example: ``` ironvar_defaults: backlight: '?' name: "top-panel" end: - type: label name: 'backlight' label: '🔅 #backlight%' - type: label name: 'updater_1s' label: > {{watch:1: while true; do ironbar var set backlight "$(light)" | sed s/ok// sleep 1 done | tr -d '\n' }} ```
Author
Owner

@JakeStanger commented on GitHub (Jul 7, 2025):

Yeah using an ironvar with an external script is the best answer for now. Long-term I am playing with adding a Lua API that will allow for interacting with ironvars in-process

<!-- gh-comment-id:3044257129 --> @JakeStanger commented on GitHub (Jul 7, 2025): Yeah using an ironvar with an external script is the best answer for now. Long-term I am playing with adding a Lua API that will allow for interacting with ironvars in-process
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#1746
No description provided.