mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 08:15:21 +01:00
[GH-ISSUE #91] Control ironbar at runtime #2867
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#2867
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 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:
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?
@yavko commented on GitHub (Mar 31, 2023):
Honestly, I'ts just something I came up, I don't know how I would use it lol.
@yavko commented on GitHub (Apr 2, 2023):
I came up with another must feature, support to open the gtk inspector
@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.@yavko commented on GitHub (Apr 4, 2023):
Well, eww can do it, though I have no clue how tho
@JakeStanger commented on GitHub (Jun 18, 2023):
Turns out it's literally just:
👀
@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!
@JakeStanger commented on GitHub (Jun 22, 2023):
Watch this space, some very interesting stuff coming in the next few days (assuming I have time...)
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.
@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 --helpfor 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:
@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:nameinside of buttons actually in ironbar@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.
@yavko commented on GitHub (Jun 28, 2023):
Ah lol
@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.