mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 07:15:19 +01:00
[GH-ISSUE #334] Use module value as argument in show_if #2938
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#2938
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 @kepi on GitHub (Oct 16, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/334
Is your feature request related to a problem? Please describe.
I would like to i.e. hide some module when it's text is some specific value.
For simplification, this might be another solution to problem and example mentioned in #333 but this would be usefull for more modules than
script.Describe the solution you'd like
Maybe get value of module as argument to
show_ifscript so I can do something likeDescribe alternatives you've considered
I don't think that there is any alternative possible. For
scriptmodule, it might be with ironvars, but for other modules, there probably isn't (or I didn't find it in docs).@JakeStanger commented on GitHub (Oct 16, 2023):
I'm going to reject this one I'm afraid, as I don't think it'd be feasible. As explained in my comment in #333,
show_ifdoes not have this sort of context about the module, and adding it would be non-trivial. There are also some scenarios where it doesn't make sense (what is the "value" of theworkspacesmodule, or thelauncher?).Instead, ironvars are the only way of going about this. You can use
show_ifwith an ironvar on any module type, and any ofscript,labelorcustomwill suit your use-case here depending on how much flexibility you need.In the future if there is a clear use-case I may expand the ironvar system to provide some "system" variables, which could expose values from modules. This would likely be a limited and hard-coded set of values though.