jirutka / swaylock-effects

Swaylock, with fancy effects
MIT License
180 stars 19 forks source link

[Feature Request] Refresh interval for custom effects #64

Closed ngruychev closed 6 months ago

ngruychev commented 9 months ago

Allow a refresh/update interval to be specified with custom effects, for example:

swaylock --effect-custom /path/to/effect.so --effect-custom-interval 1
# or
swaylock --effect-custom <interval>;<path to .so>

Why:

Lets users make their own custom integrations w/ swaylock-effects, e.g. a battery indicator, playerctl indicator, weather indicator, et cetera. I was trying to solve #41 for myself using the custom effect feature, but unfortunately it turns out that the effect only gets ran once. It would be nice to support custom effects as a means to get other integrations in swaylock, instead of having issues like #41 or #17 sit open for a while without a solution

LMK if you wouldn't mind if I made a PR for this

jirutka commented 8 months ago

This is a great idea, but how invasive changes to the code base will it require?

Cornelius-Figgle commented 8 months ago

issues like #41 or #17 sit open for a while without a solution

@sidharthmrao has an open PR (#65) that closes #41, and possibly #17

ngruychev commented 6 months ago

Sorry for the late reply, this has been at the bottom of my backlog really. The changes would indeed be too invasive, after some experimenting, as the effects feature hadn't been designed with refreshing in mind, nor for displaying information, and I don't think it would be the right call to modify it to do that. A plugin system could be implemented that does something similar, but a simpler solution would be #65 and I think that might be a better choice