noctuid / zscroll

A text scroller for panels or terminals
GNU General Public License v3.0
198 stars 10 forks source link

Would it be possible to add an argument to buffer the command output? #6

Closed krinistof closed 3 years ago

krinistof commented 6 years ago

I have a weather scrpit, that gets the data from an API

Every time the scrolling happens it calls the script. I would like to tell the program to catch the prev output, and by a given interval check for it. If you think that this is too specific problem, i would tell you, that this could save some resource by calling the script less than necessary. Untill your answer I will update the weather script for catching, but in my opinion that could be useful for others than me.

Thanks for your work!

noctuid commented 6 years ago

I think that's a perfectly reasonable use case. I've added a -U / --update-interval flag that you can use to specify how often update commands should be called (e.g. zscroll -U 2 ... to only check for new data every ~2 seconds). Please test.