Closed futurist closed 1 year ago
I've been thinking about adding "Triggers" to SiwftBar, where Trigger is something that kicks off plugin refresh. In this sense Locked\Unlocked is a kind of Trigger.
Something like this will work?
Trigger looks good. Maybe some other form like linux init script does: https://old.calculate-linux.org/main/en/initscripts https://gist.github.com/drmalex07/298ab26c06ecf401f66c
That way trigger/event can send stop/start etc. messages, or directly send the events to scripts?
directly send the events to scripts
I don't see how it is doable. i'm goinng to handle it the same as Sleep\Wake cycle by setting an environment variable. If and when we implement triggers, it will work as follows:
IS_LOCKED=TRUE
) which script can read and do whatever is needed.Sepparetly from that, we can implement "Don't refresh this script when locked" option on per plugin basis, which sounds like what you wanted originally.
Program want to get notification about system status, like lock/unlocked, like below:
https://stackoverflow.com/questions/35932501/check-device-is-locked-or-unlocked
I have a script running related to screen unlocked, and stop running when screen locked, need this type of notification.
Can swiftbar add this support?