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

37 Commits

Author SHA1 Message Date
Chris Cummer
fd794707cd
☢️ WTF-1031 Support multiple simultaneous configurations (#1032)
* WTF-1031 Rename WtfApp.app to WtfApp.tviewApp

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

* WTF-1031 Add scaffolding for main to support multiple WtfApp instances

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

* WTF-1031 WIP

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

* Remove common functionality from KeyboardWidget and into Base

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

* Augment with some descriptive comments

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

* Add full support for multiple app instances via the AppManager.

Still to do:

* Config support for multiple apps/multiple config files
* The ability to switch between apps

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

* Move SetTerminal out of main and into its own file

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-12-21 03:25:41 -08:00
Chris Cummer
d6a0797bf2 Simplify the inclusion of the Common config settings into each module
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:18:46 -08:00
Chris Cummer
f9a06540f1 Simplify the view loading for the keyboard widget
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:12:15 -08:00
Chris Cummer
4a820dd0e5 Make every widget a keyboard widget
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-11-26 23:12:15 -08:00
Sam Roberts
4bb725db9e golangci-lint configuration file
golangci-lint can run all the currently enabled linters, and as far as I
can tell, does it in under 5 seconds as opposed to over 180 seconds
(compare `time make cilint` and `time make lint`).

Some of the linters that are listed in the "enabled" section but
commented out looked like a good idea to me, and fairly low hanging
fruit to fix, but they are not passing at the moment.

All the linters covered in the current Makefile are run.

TODO:
- replace lint target in Makefile with golangci-lint
- remove .github/workflow/errcheck.yml
2020-05-16 12:34:57 -07:00
Chris Cummer
f0ca3b8a58
Another actions test (#889)
* Another actions test

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

* Add BuildTest action

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

* Remove lint check for the time being (so many issues)

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

* Fix issues found by errcheck

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

* Fix errors found by staticcheck

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

* Fix issues found by goimports

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

* Comment out the  action for the time being

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

* Fix shadowed variables

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

* go mod tidy

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

* Remove buildtest.yml

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

* go mod tidy

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-09 12:51:08 -07:00
Chris Cummer
bf877f5fa7 Constantize the defaultFocus value for each module 2019-09-22 18:12:29 -07:00
Erik Steenman
1365b6023b WTF-575: URL-Decode Jenkins branch names 2019-09-01 11:44:44 +02: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
3a716bcf9a Convert the bulk of modules over to RedrawFunc 2019-08-26 23:07:02 -04:00
Sean Smith
264f49fd2c Fix race with HighlightableHelper
GetRect can lead to a race condition
Add a RenderFunc method so that we can call try to
wrap even more of our rendering in the thread safe
`QueueUpdateDraw` method
2019-08-24 22:15:35 -04:00
Sean Smith
28f9b55e4f
Move jenkins filter to the data retrieval portion (#533)
Per #532, we are keeping track of all items regardless of filter,
meaning that selection does not work as expected
2019-08-17 15:58:59 -04:00
Chris Cummer
4e46fff145 Move the utils.go file into the /utils directory 2019-08-05 10:50:12 -07:00
Chris Cummer
dbc047516d Move all components responsible for module composition into /view 2019-08-04 21:42:40 -07:00
Chris Cummer
b07f3c5e67 Reimpliments the module configuration validation
Now supports displaying errors from multiple widgets.
2019-07-07 16:04:43 -07:00
Sean Smith
c4d58ece81 Add a helper function to do highlighting in a uniform way 2019-05-24 22:06:47 -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
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
210723cd74 Create abtract scrollable widget
This cleans up a bunch of boilerplate for scrollable items and standardizes their usage
2019-05-10 17:06:45 -04: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
Sean Smith
a5f98c138a Move closing region tag to the end of the line
Highlight works by highlighting the entire region that exists
Since current region starts and immediately ends, there is no highlighting
2019-05-09 11:00:19 -04:00
Chris Cummer
2d0706c40b WTF-427 Use new keyboard implementation for widgets. Closes #427 2019-05-06 12:54:07 -07:00
Chris Cummer
378cce8726 Re-apply the explicit title rendering for focusable widgets 2019-04-30 09:09:11 -07:00
Sean Smith
17d53ca39a Update title handling so that config based title can be used
There is already default handling of title. Remove instances where people are unknowingly overriding it
For instances where we want to set special things, make sure to use CommonSettings.Title, so people can still override
2019-04-30 07:13:52 -07:00
Chris Cummer
5445309aa0 WTF-315 Fix race conditions caused by writing to view 2019-04-25 19:39:49 -07:00
Chris Cummer
fa357294fb Fix HackerNews row selection issue. Closes #411 2019-04-23 03:14:50 -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
2ed3c087b8 WTF-400 Move jobNameRegex setting into Jenkins settings 2019-04-17 17:42:51 -07:00
Chris Cummer
b50c762dab WTF-400 Move name and configKey values from widget to settings 2019-04-17 17:16:26 -07:00
Jack Morris
9f878c9e12
import regexp
Adding in regexp import
2019-04-17 10:43:24 +01:00
Jack Morris
a89e32141f
Allow users to filter jenkins jobs by regex
Allows users to filter the Jenkins jobs shown in the widget by providing a regular expression in the config file. The regex should be specified in the config like so:
```
jobNameRegex: ^[a-z]+.$
```
Another example:
```
jobNameRegex^[a-z]+\[[0-9]+\]$
```
2019-04-17 10:24:39 +01:00
Chris Cummer
9b41e6e732 WTF-400 Jenkins extracted to new config format 2019-04-15 10:16:06 -07:00
Jack Morris
58228834fc
Allow users to choose color
Change boolean in config yaml to 'successBallColor' which allows users to choose their own if they wish
2019-04-15 17:03:49 +01:00
Jack Morris
db7e4b960c
Jenkins Green Balls Plugin Support
Adds support for a 'greenBalls' boolean parameter in the config file which overrides the default value of "blue" with "green".
2019-04-15 12:06:37 +01:00
Chris Cummer
aa313bdaa4 WTF-389 Log an exception and terminate if widget config is invalid
If, on startup, a widget's positional configuration is invalid (ie:
cannot be displayed onscreen) then terminate the app and inform about
which widget is erroring
2019-04-12 05:29:44 -07:00
Sean Smith
8030380f89 Migrate all modules to their own subfolder
Handles #375
2019-02-18 11:16:34 -05:00