mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 09:15:22 +01:00
[GH-ISSUE #335] Respect interval in show_if or add show_if_interval #5751
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#5751
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/335
Is your feature request related to a problem? Please describe.
While trying to handle
checkupdatesscript as mentioned in #333 I tried to addshow_ifwith simplecheckupdates, as it returns 0 when there are some updates. I haveintervalforscriptset to 30 minutes.I would like whole updates module to be hidden when there are no updates.
Problem is, that
check_ifignoresintervaland runs constantly.Describe the solution you'd like
I would like for
show_ifto honorinterval, or add something likeshow_if_interval.Describe alternatives you've considered
With
scriptmodule, I can simply set some ironvar when there are updates. It might be even more efficitent, but it seems to me that I have to offload a lot of work to scripts, which seems little fragile to me.Additional context
Btw. all three issues are just ideas, feel free to reject them if you think it is better to use little heavier scripts leveraging ironvars feature.
@JakeStanger commented on GitHub (Oct 16, 2023):
I think what you're asking for can be done. The important thing to keep in mind here is that
show_ifis effectively its own script, independent of the module (when not using an ironvar). This means you can use shorthand script syntax to set the module and interval.Using your example from #333:
(I think you can also omit the
polland just use1800000:checkupdatesto keep things a bit tidier from memory)@kepi commented on GitHub (Oct 16, 2023):
I didn't realize that I can use shorthand form in
show_if. That is definitelly sufficient.Thanks!