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

56 Commits

Author SHA1 Message Date
Chris Cummer
d6208b4730 Add a focusable over-ride setting for widgets that are non-focusable by
default

For widgets that are non-focusable by default, you can now specify

    focusable: true

in their config to over-ride the default 'false' value.
2019-09-22 17:51:06 -07:00
Sean Smith
9f81207037 Clean up cfg error handling a bit
Pass in the actual file being used, rather than hardcoded `config.yaml`
Differences between two error messages are not that distinct
Centralize on one and clean up all the `isCustomConfig` tracking
2019-09-12 20:28:24 -04:00
Sean Smith
bb3c24df73
Normalize coloring (#620)
Allow all colors to be configurable on a module level
2019-09-10 21:22:11 -04:00
Chris Cummer
f83e57c0b7 WTF-566 Support GitLab projects as list 2019-09-06 20:52:26 -07:00
Sean Smith
0c8c1989b7 Fix module color config
Make sure we use `moduleConfig` with appropriate path
And `colorsConfig` for appropriate fallback
2019-09-04 21:42: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
b9d1017754 Remove another panic call 2019-08-03 12:27:38 -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
4c0f7650dd Improve error messages 2019-07-29 06:15:51 -07:00
Chris Cummer
50cc9669c5 Explicitly set the default config file's mode to 0600 2019-07-25 10:29:00 -07:00
Chris Cummer
0bc6965681 WTF-504 Improve the default config 2019-07-22 22:54:01 -07:00
Chris Cummer
7a7df7d4a7 Clean up the /cfg files a bit; simplify config handling in main.go 2019-07-21 16:23:45 -07:00
Chris Cummer
5e18538f14 Display a useful error message for custom configuration files 2019-07-20 13:04:13 -07:00
Chris Cummer
452e6f20db WTF-510 Add error messaging if the config directories cannot be created 2019-07-20 12:23:19 -07:00
Chris Cummer
00ccf8a95b WTF-510 Create the ~/.config directory if it is missing 2019-07-20 12:12:04 -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
c308d1b6c2 Add help tag to Title in common_settings 2019-07-06 02:10:06 -07:00
Chris Cummer
eff0d55c28 Fix spelling mistake in DefaultFocussedRowColor() name 2019-07-05 22:33:15 -07:00
Chris Cummer
0104f97805 Use a map to return the failed position value and error message 2019-07-05 22:21:50 -07:00
Chris Cummer
774c465f57 WTF-482 More explicit param name in position.go 2019-07-05 21:45:59 -07:00
Chris Cummer
5a39bc00ce WTF-482 Remove commented-out code 2019-07-05 21:45:59 -07:00
Chris Cummer
ca81aa5134 WTF-482 Fix redundant newline warning 2019-07-05 21:45:59 -07:00
Chris Cummer
08c7e768c0 WTF-482 Sanity-check position configuration data for modules
If a module is missing any of the positional data it now informs the
user and exits gracefully with an error.
2019-07-05 21:45:59 -07:00
Chris Cummer
9d38f5439d Improve the error messaging around a mis-configured configuration file 2019-06-30 21:19:36 -07:00
Sean Smith
d8f337884f Add more 'man page' like functionality 2019-05-24 00:06:10 -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
Chris Cummer
a9c5dc3be8 WTF-427 Add KeyboardWidget and switch Todo widget to using it 2019-05-06 12:54:04 -07:00
Sean Smith
fa0edec74b Fix up Unknown widget to work again
Store module Type in common settings to enable this
Simplify the function params to be more inline with existing ones, vs being unique
2019-05-02 23:40:49 -04:00
Sean Smith
14abd422b2 Add default titles, to mimic original behavior
Have the modules set their own titles
If no title is specified, use this title, rather than default to name
2019-04-30 23:38:37 -04:00
Sean Smith
ce2a9b3301 Get rid of the rest of global config
Pass appropriate config to display/focus tracker
Move open file command to a singular global
Remove global config variable
2019-04-27 22:26:23 -04:00
Sean Smith
bcf899df72 Further reduce usage of global
Bargraph moves to common settings
"Global" config moves out of wtf and into cfg for the few things that need it
We can probably eliminate a global config used across things if we want to
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
d0c1a5db96 WTF-413 Fix right-align to account for both widget borders. Closes #413 2019-04-25 19:52:15 -07:00
Chris Cummer
f60ce6967d Clean up TextWidget by simplifying the view creation 2019-04-23 19:59:51 -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
6fd9430ef8 WTF-400 TextWidget properly renders title again 2019-04-19 14:06:55 -07:00
Chris Cummer
a8e3602817 WTF-400 Fix title display in CmdRunner 2019-04-19 09:35:05 -07:00
Chris Cummer
59f0bc6cfc WTF-400 Partial conversion to new Common settings 2019-04-18 19:02:08 -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
daa422aee4 WTF-400 Minor code cleanup 2019-04-16 13:32:29 -07:00
Chris Cummer
8bc217e9a1 WTF-400 Logger extracted to new config format 2019-04-15 20:29:45 -07:00
Chris Cummer
cf661e7e15 WTF-400 Todo extracted to new config format 2019-04-15 10:05:57 -07:00
Anand Sudhir Prayaga
c8b6eb2b60 Fix references to old Github repo location with new one 2018-11-28 14:47:06 +01:00
Anand Sudhir Prayaga
9a89bf81e0 Use new config file path in error message 2018-08-20 14:24:34 +02:00
Chris Cummer
1f27cf5b00 Clean up the code in cfg/ a bit 2018-08-03 05:31:31 -07:00
Chris Cummer
0b1ec96545 Formatting fixes 2018-06-28 17:46:55 -07:00
Chris Cummer
1b32dd8277 Delete unused function 2018-06-24 07:52:42 -07:00
Chris Cummer
343612eb5e Update new config paths in documentation 2018-06-20 16:59:11 -07:00