[GH-ISSUE #91] Control ironbar at runtime #8484

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

Originally created by @yavko on GitHub (Mar 30, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/91

Is your feature request related to a problem? Please describe.

I would like to reload my ironbar config, would also be cool to change config settings at runtime

Describe the solution you'd like

A IPC socket for ironbar that listens on a socket, and a basic cli tool for communicating with it

Describe alternatives you've considered

Maybe TCP? But TCP is slower and is harder to locate, since you have to use ports.

Additional context

I think Hyprland does it well, so maybe that could lead to inspiration

Originally created by @yavko on GitHub (Mar 30, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/91 **Is your feature request related to a problem? Please describe.** I would like to reload my ironbar config, would also be cool to change config settings at runtime **Describe the solution you'd like** A IPC socket for ironbar that listens on a socket, and a basic cli tool for communicating with it **Describe alternatives you've considered** Maybe TCP? But TCP is slower and is harder to locate, since you have to use ports. **Additional context** I think Hyprland does it well, so maybe that could lead to inspiration
JakeStanger 2026-05-23 03:52:22 +01:00
Author
Owner

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

This is something I've considered as a part of #71. Hot-reloading the full config is also something I want to implement eventually.

The rough plan so far is an IPC socket and CLI built into ironbar, toggleable via a feature flag, which provides the following functions:

  • Ability to update special variables (codename 'ironvar') to make dynamic content more elegant (for #71)
  • Ability to toggle popups and run whatever other in-built commands come along
  • Ability to reload config.

I'm not sure about changing config settings at runtime. I don't think it would be hugely complex to implement on top of hot-reloading, but I am not sure how much benefit it would have vs the complexity. What would you like to achieve with it, in case there's a different way we could go about it?

<!-- gh-comment-id:1491044767 --> @JakeStanger commented on GitHub (Mar 30, 2023): This is something I've considered as a part of #71. Hot-reloading the full config is also something I want to implement eventually. The rough plan so far is an IPC socket and CLI built into ironbar, toggleable via a feature flag, which provides the following functions: - Ability to update special variables (codename 'ironvar') to make dynamic content more elegant (for #71) - Ability to toggle popups and run whatever other in-built commands come along - Ability to reload config. I'm not sure about changing config settings at runtime. I don't think it would be hugely complex to implement on top of hot-reloading, but I am not sure how much benefit it would have vs the complexity. What would you like to achieve with it, in case there's a different way we could go about it?
Author
Owner

@yavko commented on GitHub (Mar 31, 2023):

I'm not sure about changing config settings at runtime. I don't think it would be hugely complex to implement on top of hot-reloading, but I am not sure how much benefit it would have vs the complexity. What would you like to achieve with it, in case there's a different way we could go about it?

Honestly, I'ts just something I came up, I don't know how I would use it lol.

<!-- gh-comment-id:1491143480 --> @yavko commented on GitHub (Mar 31, 2023): > I'm not sure about changing config settings at runtime. I don't think it would be hugely complex to implement on top of hot-reloading, but I am not sure how much benefit it would have vs the complexity. What would you like to achieve with it, in case there's a different way we could go about it? Honestly, I'ts just something I came up, I don't know how I would use it lol.
Author
Owner

@yavko commented on GitHub (Apr 2, 2023):

I came up with another must feature, support to open the gtk inspector

<!-- gh-comment-id:1493466936 --> @yavko commented on GitHub (Apr 2, 2023): I came up with another must feature, support to open the gtk inspector
Author
Owner

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

I don't think you can do that programatically, or at least I cannot find anything on it. You can launch ironbar with the inspector with GTK_DEBUG=interactive.

<!-- gh-comment-id:1495001069 --> @JakeStanger commented on GitHub (Apr 3, 2023): I don't think you can do that programatically, or at least I cannot find anything on it. You can launch ironbar with the inspector with `GTK_DEBUG=interactive`.
Author
Owner

@yavko commented on GitHub (Apr 4, 2023):

I don't think you can do that programatically, or at least I cannot find anything on it. You can launch ironbar with the inspector with GTK_DEBUG=interactive.

Well, eww can do it, though I have no clue how tho

<!-- gh-comment-id:1495218695 --> @yavko commented on GitHub (Apr 4, 2023): > I don't think you can do that programatically, or at least I cannot find anything on it. You can launch ironbar with the inspector with `GTK_DEBUG=interactive`. Well, eww can do it, though I have no clue how tho
Author
Owner

@JakeStanger commented on GitHub (Jun 18, 2023):

Well, eww can do it, though I have no clue how tho

Turns out it's literally just:

gtk::Window::set_interactive_debugging(true)

👀

<!-- gh-comment-id:1596269714 --> @JakeStanger commented on GitHub (Jun 18, 2023): > Well, eww can do it, though I have no clue how tho Turns out it's literally just: ```rs gtk::Window::set_interactive_debugging(true) ``` :eyes:
Author
Owner

@yavko commented on GitHub (Jun 22, 2023):

I know this might seem useless, but actually it has a lot of use, but I think being able to load CSS at runtime shouldn't be too hard. I personally would use this to change the background of the music widget to a blurred background of the cover. Also, I saw the work done on the branch so far https://github.com/JakeStanger/ironbar/compare/master...feat/cli-ipc, seems great!

<!-- gh-comment-id:1603023341 --> @yavko commented on GitHub (Jun 22, 2023): I know this might seem useless, but actually it has a lot of use, but I think being able to load CSS at runtime shouldn't be too hard. I personally would use this to change the background of the music widget to a blurred background of the cover. Also, I saw the work done on the branch so far https://github.com/JakeStanger/ironbar/compare/master...feat/cli-ipc, seems great!
Author
Owner

@JakeStanger commented on GitHub (Jun 22, 2023):

Also, I saw the work done on the branch so far https://github.com/JakeStanger/ironbar/compare/master...feat/cli-ipc, seems great!

Watch this space, some very interesting stuff coming in the next few days (assuming I have time...)

I think being able to load CSS at runtime shouldn't be too hard

I can see the use for that, and yeah I think that's fairly trivial with CSS - it's already hot-loading anyway, so should just be a matter of adding more files to the mix.

<!-- gh-comment-id:1603036107 --> @JakeStanger commented on GitHub (Jun 22, 2023): > Also, I saw the work done on the branch so far https://github.com/JakeStanger/ironbar/compare/master...feat/cli-ipc, seems great! Watch this space, some very interesting stuff coming in the next few days (assuming I have time...) > I think being able to load CSS at runtime shouldn't be too hard I can see the use for that, and yeah I think that's fairly trivial with CSS - it's already hot-loading anyway, so should just be a matter of adding more files to the mix.
Author
Owner

@JakeStanger commented on GitHub (Jun 22, 2023):

Tracking the branch in the draft PR https://github.com/JakeStanger/ironbar/pull/199 as we go to make it easier to follow along - suggestions and feedback as I go is very welcome, as I want to get this right before we merge it in.

Currently this includes a ping command, and a command to open the GTK inspector. I'm also tracking the dynamic variables from #71 but will keep discussion on those in that thread.

Run ironbar --help for CLI help. Commands can be sent while a main Ironbar instance is a running.

The IPC will not correctly close the socket, so it necessary to manually delete this currently:

rm /run/user/1000/ironbar-ipc.sock
<!-- gh-comment-id:1603377839 --> @JakeStanger commented on GitHub (Jun 22, 2023): Tracking the branch in the draft PR https://github.com/JakeStanger/ironbar/pull/199 as we go to make it easier to follow along - suggestions and feedback as I go is very welcome, as I want to get this right before we merge it in. Currently this includes a ping command, and a command to open the GTK inspector. I'm also tracking the dynamic variables from #71 but will keep discussion on those in that thread. Run `ironbar --help` for CLI help. Commands can be sent while a main Ironbar instance is a running. The IPC will not correctly close the socket, so it necessary to manually delete this currently: ``` rm /run/user/1000/ironbar-ipc.sock ```
Author
Owner

@yavko commented on GitHub (Jun 28, 2023):

Another command idea: popup
Example: ironbar popup open <name>
I think being able to open popups from other places could be useful, I also think this can be supplemented with popup:open:name inside of buttons actually in ironbar

<!-- gh-comment-id:1610966356 --> @yavko commented on GitHub (Jun 28, 2023): Another command idea: popup Example: `ironbar popup open <name>` I think being able to open popups from other places could be useful, I also think this can be supplemented with `popup:open:name` inside of buttons actually in ironbar
Author
Owner

@JakeStanger commented on GitHub (Jun 28, 2023):

Way ahead of you there ;) https://github.com/JakeStanger/ironbar/issues/71#issuecomment-1426882879

The implementation for this is a bit tricky, since modules and their popup control is fully self-contained, and relies on the module's location on the bar, so I'll probably get the main CLI/vars into master then work on that one separately.

<!-- gh-comment-id:1611045230 --> @JakeStanger commented on GitHub (Jun 28, 2023): Way ahead of you there ;) https://github.com/JakeStanger/ironbar/issues/71#issuecomment-1426882879 The implementation for this is a bit tricky, since modules and their popup control is fully self-contained, and relies on the module's location on the bar, so I'll probably get the main CLI/vars into master then work on that one separately.
Author
Owner

@yavko commented on GitHub (Jun 28, 2023):

Ah lol

<!-- gh-comment-id:1611348161 --> @yavko commented on GitHub (Jun 28, 2023): Ah lol
Author
Owner

@JakeStanger commented on GitHub (Jun 29, 2023):

The base CLI and IPC are merged 🎉 I will leave this open to track the couple of additional commands listed above, but for new ones pls now stick those in their own issue.

<!-- gh-comment-id:1613432723 --> @JakeStanger commented on GitHub (Jun 29, 2023): The base CLI and IPC are merged :tada: I will leave this open to track the couple of additional commands listed above, but for new ones pls now stick those in their own issue.
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#8484
No description provided.