da-rth / yasb

A highly configurable cross-platform (Windows) status bar written in Python.
MIT License
1.37k stars 80 forks source link

Clarifying the run_interval unit in config.yaml #6

Closed TransientError closed 2 years ago

TransientError commented 2 years ago

Hi,

Thanks for making this. It's a really beautiful app.

I was trying to create a custom widget, but wasn't really able to determine what the units for run_interval are.

In the sample config.yaml, I see

        # run every hour
        run_interval: 6000000

but I wasn't sure what unit that could be.

Looking through the code, it appears we're using QTimer behind the scenes, and from what I could tell from their docs, it should be in milliseconds. In that case this comment would be wrong since it's 3600000 ms in an hour. I was thinking it might be a little bug.

da-rth commented 2 years ago

Hey @TransientError, thanks for checking out the project.

You are correct in that the amount of milliseconds specified in the example config for the CustomWidget is incorrect. It should indeed be 3600000 milliseconds. This has just been changed in https://github.com/denBot/yasb/commit/0726bcab838f51dd0fff9a5e8f6c95880e5de141