1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
Bryan Austin 1077adbff2 Update GCal module's "time until event" text more frequently
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.
2018-06-18 17:45:04 -07:00
2018-06-17 08:05:39 -07:00
2018-06-17 08:06:58 -07:00
2018-06-08 13:23:07 -07:00
2018-06-10 03:47:14 +03:00
2018-06-02 14:03:36 +02:00
2018-06-13 02:14:04 -07:00
2018-06-10 03:36:53 +03:00
2018-06-01 13:41:27 -07:00
2018-06-08 13:23:07 -07:00
2018-06-08 13:23:07 -07:00
2018-06-08 12:04:56 -07:00

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:


Chris Cummer


Hossein Mehrabi


FengYa


deltax


Bill Keenan


June S


liyiheng


baustinanki


lucus lee


Mike Lloyd


Sergio Rubio


Farhad Farahi


Lasantha Kularatne


Mark Old


flw


David Barda


Geoff Lee


George Opritescu


Grazfather


Michael Cordell


Patrick José Pereira


sherod taylor


Andrew Scott


Anand Sudhir Prayaga


Lassi Piironen


BlackWebWolf


andrewzolotukhin

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.

Description
The personal information dashboard for your terminal
Readme 49 MiB
Languages
Go 99.1%
Makefile 0.6%
Smarty 0.2%