While it's reasonable to have a refresh interval of several minutes between the GCal module hitting the server, the fact that the module (helpfully) displays the time until an event means that as times approach zero, they become relatively inaccurate - "3m" might show up next to a meeting that you were supposed to be in 2 minutes ago. (don't worry, that hasn't happened to me yet) This change introduces a goroutine to the GCal module that will update the module text using the most recently cached copy of events. By default, it runs every 30 seconds (this could be changed to 0 to make it opt-in if desired) or however many seconds is specified by the new config option `wtf.mods.gcal.textInterval`. To make sure the goroutine doesn't cause any synchronization issues if a text update were to trigger at the same time as a module refresh, this change also adds the use of `sync.Mutex` to gate setting GCal's text. Since both mutexes and having a goroutine within individual modules are not the sort of thing any other code in `wtf` does at this point in time, I'm definitely open to feedback on whether there might be better ways to do this. Additionally, the change in `wtf.go` fixes an issue I noticed when testing if my `Disable()` function worked - the main `Widgets` array wasn't being cleared out after disabling all widgets before re-creating new copies of them, so it still held pointers to the old ones.
A personal terminal-based dashboard utility, designed for displaying infrequently-needed, but very important, daily data.
Quick Start
Download and run the latest binary or install from source:
go get -u github.com/senorprogrammer/wtf
cd $GOPATH/src/github.com/senorprogrammer/wtf
make install
make run
Note: WTF is only compatible with Go versions 1.9.2 or later. It currently does not compile with gccgo
.
Documentation
See https://wtfutil.com for the definitive documentation. Here's some short-cuts:
Contributors
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
Thanks goes to these wonderful people:
This project follows the all-contributors specification. Contributions of any kind welcome!
Acknowledgments
The inspiration for WTF
came from Monica Dinculescu's
tiny-care-terminal.
Many thanks to Lendesk for supporting this project by providing time to develop it.
The following open-source libraries were used in the creation of WTF
.
Many thanks to all these developers.