mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 09:15:22 +01:00
[GH-ISSUE #333] Use cmd exit value for show_if #7151
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#7151
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/333
Is your feature request related to a problem? Please describe.
From what I found in documentation, it seems that
show_ifcan't take exit value fromcmdwhen usingscriptmodule.As example, I want to show available updates on my Arch and it seems little wastefull to call
checkupdatestwice.Describe the solution you'd like
Not sure what best approach would be, but maybe simply receive exit value from
cmdas first argument?Describe alternatives you've considered
Maybe somehow manipulate ironvars? Seem little overkill to me, but maybe its better way.
@JakeStanger commented on GitHub (Oct 16, 2023):
Hey, I don't think this would be feasible unfortunately.
The
show_ifoption is handled outside of the module code, runs its own script, and has no visibility into the module itself so it can't easily be shared. I'd be hesitant to refactor the way that works to change that either, since the original behaviour would need to be kept for other module types.Instead the best option here is definitely to use an
ironvar. There's possibly opportunity to make that more elegant, especially since this is (I'd imagine) quite a common scenario, so I'm open to ideas around that.@JakeStanger commented on GitHub (Dec 3, 2023):
I'm going to close this as wontfix. If you disagree or have any further thoughts feel free to stick them here and I can always re-open.