Sean Smith
4eeb6d67a9
Support XDG_CONFIG_HOME
...
Clean up workflow and eliminate a method
One place where we calculate the full dir
Closes #699
2020-01-08 23:40:45 -05: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
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
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
50cc9669c5
Explicitly set the default config file's mode to 0600
2019-07-25 10:29:00 -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
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
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
Chris Cummer
f09d08bda2
WTF-400 Common settings implemented
2019-04-18 18:22:19 -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
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
Chris Cummer
0e141e03c8
Closes #217 . Use XDG-compatible config directory
...
This change is largely experimental and it's entirely possible it could
wipe out your existing configuration. Be warned.
Old config path was: ~/.wtf/
New config path is: ~/.config/wtf/
If an existing config directory already exists, this change attempts to
copy it to the new location.
Note that if your config file contains paths to files in the old config
directory, they won't work. You'll need to change them by hand.
2018-06-20 16:46:02 -07:00
Chris Cummer
4496cc7c31
Clean up the flag and config handling in main()
2018-06-16 09:14:24 -07:00
Chris Cummer
d9e1624304
Delete redundant config functions file
2018-06-13 09:28:58 -07:00
Andrew
a558ee948f
Reverted names
2018-06-10 03:36:53 +03:00
Andrew
da1ffdd817
Changed name to andrewzolotukhin
2018-06-10 03:15:58 +03:00
Chris Cummer
d2dfcd8978
Add cfg/ as a top-level package concept
2018-06-09 03:58:45 -07:00