halo icon indicating copy to clipboard operation
halo copied to clipboard

feature request: any appetite for supporting dynamic text?

Open davidxia opened this issue 3 years ago • 2 comments

Description

I'd like the text to be dynamic, e.g. an updating timestamp or time since something happened. I have a prototype here where users can make text a function instead of a static string.

with Halo(text=lambda: f'date {datetime.datetime.now()}'):
    time.sleep(100)

Any appetite for supporting this? If so, any feedback on my PR would be great. I still have to add tests.

davidxia avatar Nov 11 '21 13:11 davidxia

I have just attempted the changes that were recommended on my local machine and they seem to work well. Thanks for putting in the work! @davidxia

Nbelles avatar Feb 24 '22 18:02 Nbelles

@Nbelles thanks, hoping the maintainer(s) notice and reply :)

davidxia avatar Feb 24 '22 19:02 davidxia