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

469 Commits

Author SHA1 Message Date
Jon Hadfield
988a9deee5
make PiHole module compatible with both versions 4 and 5 of PiHole. 2020-05-28 22:12:57 +01:00
Chris Cummer
92285b194f Merge branch 'master' of github.com:mryanmurphy/wtf into mryanmurphy-master 2020-05-26 21:25:11 -07:00
Matt Murphy
a0a85a5383 Make display whitespace consistent 2020-05-25 00:37:03 -04:00
Chris Cummer
b6f2d1423e Merge branch 'fix-gitlabtodo-domain' of github.com:gerchardon/wtf into gerchardon-fix-gitlabtodo-domain 2020-05-23 12:38:22 -07:00
Matt Murphy
b6a666fe59 Add setting to hide sections of GitHub module 2020-05-23 11:32:40 -04:00
Gerome Chardon
4a7bdeab3c Fix gitlabtodo usage of domain
Use domain in gitlabtodo
Handle error in gitlabtodo
2020-05-18 10:59:12 +02: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
e43c37cc07 Fix broken gCal title
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-15 01:39:11 -07:00
Sam Roberts
3c405da087 Use docker-credential-helper to manage secrets
Store service credentials securely in the stores supported by docker:
- https://github.com/docker/docker-credential-helpers#available-programs

Introduces a top-level config property, "secretStore" and additional
command line arguments to manage the stored secrets.

The value of secretStore is used to find a helper command,
`docker-credential-<secretStore>`.

The docker project currently provides 4 store helpers:
- "osxkeychain" (OS X only)
- "secretservice" (Linux only)
- "wincred" (Windows only)
- "pass" (any OS supporting pass, which uses gpg2)

Docker-for-desktop installs the credential helpers above, as well as
"desktop" (docker-credential-desktop).

Generic installation instructions for the helpers:
- https://github.com/docker/docker-credential-helpers#installation

Users could provide additional helpers, the only requirement is that the
helper implements the credential store protocol:
- https://github.com/docker/docker-credential-helpers#development

The credential protocol is open, and new credential stores can be
implemented by any CLI satisfying the protocol:
- https://github.com/docker/docker-credential-helpers#development

The modifications to existing modules is not tested due to lack
of API keys, but demonstrates the unobtrusive changes required to
use the secret store.
2020-05-10 19:26:32 -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
9cd9a58759 Fix a bunch of minor issues found by running staticcheck
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-05-06 22:44:24 -07:00
Adriano
e035f3a15a
Add ipv6 support to ipinfo (#885) 2020-05-02 07:05:49 -07:00
Risto Saarelma
c6f6036f5a
Fix feed module item sorting (#886)
Thanks!
2020-05-02 06:59:22 -07:00
Chris Cummer
880168989c Merge branch 'feature/gitlab-with-browser' of github.com:mogensen/wtf into mogensen-feature/gitlab-with-browser 2020-04-28 20:52:07 -07:00
Jon Hadfield
0b3a326fe3
fix digitalclock display bug. (#883) 2020-04-28 20:46:37 -07:00
Frederik Mogensen
dbab6be1d4 Gitlab: allow for opening items in browser 2020-04-27 09:08:37 +02:00
Chris Cummer
daf1e61335 Merge branch 'add_pihole' of github.com:jonhadfield/wtf into jonhadfield-add_pihole 2020-04-23 05:38:10 -07:00
Adriano
216124437a
Add event end time to gcal module display (#877)
* Add event end time to gcal module display

* Add settings for showing end time and add test coverage

* go mod tidy
2020-04-23 05:32:59 -07:00
Jon Hadfield
72ae0ccd8b
add pihole module. 2020-04-19 21:29:45 +01:00
Chris Cummer
cb0b2f19cf Update GitLab errors
The compiler is happy now....

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-04-18 19:02:27 -07:00
Chris Cummer
72619a99a4 handle multiple conversions per base currency
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-03-20 19:46:27 -07:00
Indradhanush Gupta
62e3523d29 modules/exchangerate: Display exchange rate for one unit of base currency 2020-03-16 20:23:15 +05:30
Chris Cummer
e453408457
WTF-847 Fix the formatting of the headings in the Docket widget (#862)
* WTF-847 Fix the formatting of the headings in the Docket widget

Fixes #847

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

* Run 'go mod tidy'

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-03-15 20:27:12 -07:00
Vinícius Letério
62f4a17459 ResourceUsage Widget @ Support to enable(default)/disable display of CPU, mem and swap 2020-03-05 01:19:40 -03:00
Chris Cummer
629661df05 Fix merge conflict in go.sum
Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-02-15 13:53:59 -08:00
Chris Cummer
8dde85989d
Remove some unnecessary type conversions (#841)
* Remove some unnecessary type conversions

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

* Tidy'd go.mod

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-02-15 13:02:10 -08:00
Elliot
6c1828234a
Initial commit of gitlab todo module (#830) 2020-02-15 12:33:23 -08:00
Yvonnick Esnault
2c6e546e1a fix(cds/favorites): next key
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
2020-02-11 15:11:10 +01:00
Yvonnick Esnault
25bcd15793 feat: cds modules
Signed-off-by: Yvonnick Esnault <yvonnick@esnau.lt>
2020-02-05 23:18:12 +01:00
davidsbond
1acaeb6ef8 Allow specifying k8s context in configuration 2020-01-17 20:42:25 +00:00
Bjoern Weidlich
ce0151becc
Added SpaceX Module 2020-01-06 23:21:44 -08:00
Chris Cummer
cc169f1674
WTF-33 gcal 'showAllDay' option added (#804)
When true, all-day events are displayed. When false, all-day
events are not displayed.

Defaults to true.

Closes #733

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-30 22:25:10 -05:00
Chris Cummer
e679a981da
WTF-758 Open HN comments if there's no external link (#802)
If an HN story has no external link associated with it,
open the HN comments page for the story.

Closes #758

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-30 22:21:59 -05:00
Bjoern Weidlich
86b32b3f9f Adding twitch module to display top streams (#805) 2019-12-30 22:20:53 -05:00
Chris Cummer
fa0d8761ae A few minor changes made while updating documentation
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-30 17:26:50 -05:00
Chris Cummer
e1d4e60216
Add myName setting to PagerDuty (#799)
If defined, this name will be highlighted in the PagerDuty widget
when that person is on-call.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-18 21:38:42 -08:00
Chris Cummer
a7facc85fa
Add 'withDate' option to digitalclock module (#797)
When `withDate` is `true`, it displays date information below the clock.
When `withDate` is `false`, it does not display date information.
Defaults to `true`.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-18 21:38:30 -08:00
Chris Cummer
d88b3ebaac
Google Calendar subheading now obey global subheading color (#798)
This can still be over-written by setting:

```
   gcal:
      colors:
        day: "orange::b"
```
explicitly in your gCal configuration.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 21:39:49 -08:00
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
140dd553e0
WTF-781 Todoist project ID conversion (#789)
* WTF-781 Switch Todoist IDs from `int` to `string`

On platforms that convert an `int` to `int32`, like the Raspberry Pi,
an `int` is not large enough to store Todoist project IDs.

Using a `string` ensures this never becomes a problem.

Fixes #781

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:25:52 -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
b7f8ec5ae2
Use WTF's version of spotigopher (#787)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-14 21:24:18 -08:00
Chris Cummer
703619bf0a
WTF-748 Fixes and improves module templating (#786)
Fixes and improves the module templating for creating new bare-bones
text widgets.

This command:

    WTF_WIDGET_NAME=MyNewWidget go generate -run=text

now properly generates:

    * the module directory in the /modules directory
    * the widget.go file
    * the settings.go file

with no linter warnings or errors.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-14 08:46:02 -08:00
Chris Cummer
ed1e6b2508
WTF-784 Fix CmdRunner title spacing issue (#785)
Closes #784.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-13 21:26:53 -08:00
Chris Cummer
58299c2efa
WTF-484 DigitalOcean module (#782)
* WTF-484 DigitalOcean module stubbed out
* WTF-484 Delete droplets via Ctrl-d
* WTF-484 Rebasing off master after a long time away
* WTF-484 Improve DigitalOcean display
* WTF-484 Can shutdown and restart the selected droplet
* WTF-484 Display info about the selected droplet using the ? key
* WTF-484 Display info about the selected droplet using the Return key
* WTF-484 Greatly improve the utils.Truncate function
* WTF-484 Display a droplet's features in the info modal
* WTF-484 Change reboot key from r to b to not conflict with refresh
* WTF-484 Panic if a keyboard control is mapped to the same character more than once
* WTF-484 Colorize droplet status indicator
* WTF-484 Extract view.InfoTable out into a reusable component
2019-12-13 11:33:29 -08:00
Chris Cummer
e1f1d0a410
WTF-781 Clean up Todoist project ID handling a bit (#783)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-13 08:51:12 -08:00
Charlie Wang
f1ed15a8e4 Prevent flickering in cmdRunner widgets (#778)
* Prevent flickering in cmdRunner widgets

This commit removes flickering in the cmdRunner widgets while preserving
the live-update functionality. It amends 45b955 by not redrawing on
every write call. Instead, the logic in Refresh is as follows:

1. If the command is already running, it will not try to re-run the
command. The default case in the select will trigger a re-draw instead
so that new output can be seen. This accommodates long-runing commands
eg. tailing a log.
2. If the command is not already running, it will trigger a new run.
When the command terminates, it will trigger a re-draw. This means the
widget refreshes as soon as possible, to accommodate the original use
case of running a command and displaying its output in the widget.

In all cases, the widget will not re-draw more often than the refresh
interval. This is what eliminates flickering, since the previous
implementation before using goroutines was not redrawing more than once
per refresh interval.

* Remove useless locking in Refresh

Since the Refresh command doesn't actually block on anything, and the
goroutines have their own locking, Refresh shouldn't lock.
2019-12-13 08:47:09 -08:00
Nikolay Mateev
ff2f07812d Enable Jenkins module to work with Multi-configuration projects (#779)
Awesome, thanks!
2019-12-13 08:36:11 -08:00
Nikolay Mateev
4ec9d33a6f Add shortcuts for GitHub Pull Requests and Issues (#777) 2019-12-13 08:27:35 -08:00