1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

30 Commits

Author SHA1 Message Date
Chris Cummer
10f761dbcb
20191217 gosec (#796)
* Add gosec to the Makefile

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Fix some issues found by gosec

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 14:59:16 -08:00
Chris Cummer
cde904ff08
Use errcheck to find unhandled errors (#795)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 08:26:16 -08:00
Chris Cummer
3a388fba23
20191215 code improvements (#790)
* Upgrade godo to latest
* Fix a bunch of issues found by
* Running staticcheck on a codebase for the first time is a sobering experience
* go mod tidy
* More static improvements

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:25:29 -08:00
Chris Cummer
200dbcc03c
WTF-730 Fix missing color key config error (#738)
* WTF-730 Fix missing color key config error

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Add Subheading color formatting to modules

Users can now set a `subheading` color in their config to change the
color of subheadings in widget display.

Defaults to `red`.

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Fix oustanding color issues

Clean up missing color config changes not addressed in earlier commits.

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Remove unused dependency

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Base cleanup

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Fix a few bugs related to color config changes

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Fix issues with PagerDuty subheading display

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-730 Fix bug with Todo list colour rendering

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 11:21:45 -08:00
Daanikus
db9f3c7b99 close unclosed file 2019-10-22 17:00:43 +13:00
Chris Cummer
bf877f5fa7 Constantize the defaultFocus value for each module 2019-09-22 18:12:29 -07:00
Sean Smith
8835f532cc Refactor a number of widgets to display client errors
Rather than swallowing or crashing, display appropriate errors
2019-09-01 13:19:07 -04:00
Sean Smith
14e7619075 Renormalize the redraw function
Have all instances take a function
Update the remaining modules to take this into account
Numerous smaller refactors to make some widgets work more or less the same
2019-08-27 21:51:37 -04:00
Sean Smith
51e4325f0b Handle all the widgets that use GetRect 2019-08-24 23:20:38 -04:00
Chris Cummer
dbc047516d Move all components responsible for module composition into /view 2019-08-04 21:42:40 -07:00
Chris Cummer
4c2b52cdbb Improve the config file handling process
* Don't create a default config if a custom config is being passed in
* Textfile: don't die if the file cannot be found
2019-08-02 01:51:56 -07:00
Chris Cummer
0bc6965681 WTF-504 Improve the default config 2019-07-22 22:54:01 -07:00
Chris Cummer
d9c362ee9f Make the line wrap settings for the Textfile module configurable via the 'wrapText' setting 2019-06-14 21:27:09 -07:00
Sean Smith
02e0666697 Remove more app usages which are unnecessary 2019-05-24 22:22:56 -04:00
Kirill Motkov
f0771cd013 Some code improvements
* Some assignments simplified by using assignment operators
* Rewrite switch statement with only one case as if.
* Rewrite if-else chain as a switch statement.
* go fmt `modules/todoist/project.go` file.
2019-05-21 17:29:09 +03:00
Sean Smith
cd35d1e0a3 Re-add command line help 2019-05-11 19:47:59 -04:00
Sean Smith
7f3daaac59 Have keyboard widget manage its own help
Define help with keys
This means that keys and help are automatically in sync
This means that you can't define keys, but forget help
This unfortunately also means that formatting may not be quite as good
2019-05-11 12:15:52 -04:00
Sean Smith
c328ba4c11 Split up logger and widget
This allows us to use the logger from the wtf directory
For example when trying to debug sort ordering in focus_tracker
2019-05-10 19:07:52 -04:00
Chris Cummer
075402315e Fix missing title in Clocks 2019-05-10 08:42:37 -07:00
Sean Smith
018d2af3ae Add a global Redraw method for TextWidget
Partially addresses #429, by centralizing widget drawing
2019-05-10 08:42:37 -07:00
Chris Cummer
2d0706c40b WTF-427 Use new keyboard implementation for widgets. Closes #427 2019-05-06 12:54:07 -07:00
Chris Cummer
ed8d357881 Simplifies the use of MultiSourceWidget
Widgets that embed MultiSourceWidget no longer have to explicitly call
loadSources(). This is done as part of the set-up for MultiSourceWidget.
2019-04-28 20:43:39 -07:00
Sean Smith
2d7cafa3bf Rip out two more instances of global config
One setting TERM environment variable
Another in multisource widget
2019-04-27 22:26:23 -04:00
Sean Smith
5abd701b40 Decouple modules from global config
Rather than referencing wtc.Config, instead pass the global config
Also, look up config for the module early and pass that in sooner, to deal with fewer long paths and get rid of the
ConfigKey variable
2019-04-27 22:26:23 -04:00
Chris Cummer
a1aae6206f Fix race conditions caused by writing to view 2019-04-25 00:11:16 -07:00
Chris Cummer
88fdf9702b WTF-400 Move settings-related functions from util.go into common_settings.go 2019-04-21 21:35:45 -07:00
Chris Cummer
f09d08bda2 WTF-400 Common settings implemented 2019-04-18 18:22:19 -07:00
Chris Cummer
b50c762dab WTF-400 Move name and configKey values from widget to settings 2019-04-17 17:16:26 -07:00
Chris Cummer
c489f2a4f4 WTF-400 Textfile extracted to new config format 2019-04-16 09:30:32 -07:00
Sean Smith
8030380f89 Migrate all modules to their own subfolder
Handles #375
2019-02-18 11:16:34 -05:00