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

219 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
9f94e8c63a Add an app exit banner message 2020-10-11 16:55:16 -07:00
Chris Cummer
fd91a48f58 WTF-897 Exchange Rate improvements
Allows the user to set the precision for their exchange rate values.

Config setting:
```
exchangerates:
  precision: 3
```

Default is `7`.

Also aligns converted values along the decimal place for improved
aesthetics.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2020-07-27 17:21:36 -07: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
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
Sean Smith
5979564483 Update test case for default color
Tcell's default is default, so using that changes the tests
2019-09-04 22:20:48 -04:00
Sean Smith
e8f38ffda6 Support hex colors
Closes #546
Though only support full hex, not short hex
This limitation is from tcell
2019-09-04 22:17:34 -04:00
Sean Smith
146cbb598a Attempt to offer linux transparency
Add 'transparent' as a color option
Default to 'transparent'
Make sure to set color to appropriate things, so transparency is achieved
2019-08-20 22:28:14 -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
94d63306d4 Move Bargraph functionality into /view 2019-08-04 21:21:16 -07:00
Chris Cummer
59429b097d Fix failing UnixTime tests 2019-08-04 09:05:46 -07:00
Chris Cummer
b0c175dd57 Add more specs in the /wtf directory 2019-08-04 08:37:52 -07:00
Chris Cummer
d6254ebba6 Add specs for /wtf/datetime 2019-08-03 18:54:04 -07:00
Chris Cummer
681dd85ce6 Add specs for /wtf/colors 2019-08-03 18:31:00 -07:00
Chris Cummer
a1aafbeade Move /wtf tests into /wtf directory 2019-08-03 17:19:55 -07:00
Chris Cummer
52023a4db0 Remove a stray Log() statement from MultiSourceWidget 2019-08-02 02:00:24 -07:00
Chris Cummer
82c89668a0 Move the ModuleValidator from /wtf to /app 2019-07-29 06:15:51 -07:00
Chris Cummer
b790b27000 Move the FocusTracker from /wtf to /app 2019-07-29 06:15:51 -07:00
Chris Cummer
73391b06e4 Add ability to explicitly stop modules via a QuitChan 2019-07-29 06:15:51 -07:00
Chris Cummer
cfd3c731ba Move the scheduler up into /app 2019-07-29 06:15:51 -07:00
Chris Cummer
a6d18e286a Extract most app setup out of main and into wtf_app 2019-07-29 06:15:51 -07:00
Chris Cummer
324666a3ec Clean up the MakeWidgets process by miniming the number of params passed around 2019-07-29 06:15:51 -07:00
Chris Cummer
e593a0d007 Better naming for some of the core interfaces 2019-07-17 07:11:43 -07:00
Chris Cummer
7ddf4a566d WIP 2019-07-17 06:58:53 -07:00
Chris Cummer
0801f9bf4c Delete Position test. Position struct no longer exists 2019-07-17 06:58:33 -07:00
Chris Cummer
c2e240014d Add support for a new 'border' property on widgets
Sets whether or not the widget should be drawn with a border (and by
extension a title).

If 'true', the border is drawn. If 'false', no
border is drawn. Defaults. to 'true'. Optional.
2019-07-10 22:30:36 -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
Chris Cummer
2da3344612 Get --module=[modname] working again (broke when position config validation was added) 2019-07-06 01:55:54 -07:00
Chris Cummer
eff0d55c28 Fix spelling mistake in DefaultFocussedRowColor() name 2019-07-05 22:33:15 -07:00
Chris Cummer
5dbce09e4f Make Transmission widget scrollable 2019-06-26 06:58:27 -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
Chris Cummer
042f602ddb Tabbing to widgets properly sets the IsFocused property. Closes #467 2019-05-25 15:19:18 -07:00
Chris Cummer
90362dea4b
Merge branch 'master' into configdocs 2019-05-25 10:17:18 -07:00
Sean Smith
c4d58ece81 Add a helper function to do highlighting in a uniform way 2019-05-24 22:06:47 -04:00
Sean Smith
d8f337884f Add more 'man page' like functionality 2019-05-24 00:06:10 -04:00
Chris Cummer
9a877b5e04 Improve the look of the help modal a little bit 2019-05-23 15:09:35 -07:00
Chris Cummer
5db30c0e8d Add help screen to main app 2019-05-23 14:24:15 -07:00
Sean Smith
2fb1a06ca0 Add Scrollable to todoist widget
This is now a multi-source scrollable widget, trying to leverage as much of existing functionality as possible for
consistency
2019-05-22 00:22:17 -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
34bf319c2e Rename Prev/Next in MultiSourceWidget
This will open the possibility of a MultiSourceScrollableWidget with no collisions
2019-05-18 11:23:12 -04:00
Chris Cummer
4863901859 Improve the comments in utils.go 2019-05-13 17:15:09 -07:00
Chris Cummer
0a2addb532 Add some comments to the functions in utils.go 2019-05-13 17:03:59 -07:00
Chris Cummer
f7b69fac7c Extend ToStrs() to support ints or strings 2019-05-13 16:57:34 -07:00
Sean Smith
6a41935e61 Flip todoist over to multiview widget
This can also probably be made scrollable in the future as well
2019-05-12 23:15:48 -04:00
Sean Smith
46c31103b8 Make widget name part of the output 2019-05-11 20:00:35 -04:00
Sean Smith
9b8ce06990 Split out char/key mapping help
This makes help more inline with previous instances
Wrap everything in `[]`, so keys like ` ` show up correctly
Pad characters for keypresses, so things have pretty alignment
2019-05-11 19:55:03 -04: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
Chris Cummer
8c4346f8b8
Merge branch 'master' into splituplogger 2019-05-11 08:43:37 -07:00