Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a78da1a28 | |||
| ec5893581e | |||
| 8afdadc263 | |||
| 5bb280b1da |
6
TODO.md
6
TODO.md
@@ -1,5 +1 @@
|
||||
- Push scheme generation to `~/.config/autoconf`
|
||||
- Copy default app registry to the config location
|
||||
- Formalize the theme spec (JSON) and `autoconf gen` to produce color configs
|
||||
- Likely need to formalize the `sync.sh` script logic better, possibly associated directly
|
||||
with registry TOML
|
||||
- Add local app caching for `auto` logic
|
||||
|
||||
@@ -28,6 +28,9 @@ dependencies = [
|
||||
"colorama",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
symconf = "symconf.__main__:main"
|
||||
|
||||
[project.optional-dependencies]
|
||||
tests = ["pytest"]
|
||||
docs = [
|
||||
|
||||
@@ -92,10 +92,13 @@ subparsers = parser.add_subparsers(title='subcommand actions')
|
||||
add_set_subparser(subparsers)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main():
|
||||
args = parser.parse_args()
|
||||
|
||||
if 'func' in args:
|
||||
args.func(args)
|
||||
else:
|
||||
parser.print_help()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -307,7 +307,7 @@ class ConfigManager:
|
||||
|
||||
group_dir = Path(self.config_dir, 'groups')
|
||||
if not group_dir.exists():
|
||||
return {}
|
||||
return {}, []
|
||||
|
||||
# handle non-palette-scheme groups
|
||||
group_matches = {}
|
||||
@@ -345,8 +345,6 @@ class ConfigManager:
|
||||
|
||||
group_matches[fkey] = list(match_dict.values())
|
||||
|
||||
print(group_matches)
|
||||
|
||||
# first handle scheme maps; matching palette files should already be found in the
|
||||
# regular group matching process
|
||||
palette_dict = self._stack_toml(group_matches.get('palette', []))
|
||||
@@ -492,7 +490,7 @@ class ConfigManager:
|
||||
app_name,
|
||||
scheme='any',
|
||||
palette='any',
|
||||
):
|
||||
) -> list:
|
||||
'''
|
||||
Execute matching scripts in the app's ``call/`` directory.
|
||||
|
||||
@@ -515,7 +513,7 @@ class ConfigManager:
|
||||
call_dir = Path(app_dir, 'call')
|
||||
|
||||
if not call_dir.is_dir():
|
||||
return
|
||||
return []
|
||||
|
||||
prefix_order = [
|
||||
('none' , 'none'),
|
||||
@@ -624,7 +622,7 @@ class ConfigManager:
|
||||
# app's config map points config tails to absolute paths
|
||||
if config_tail in app_settings['config_map']:
|
||||
to_symlink.append((
|
||||
abs_pat(Path(app_settings['config_map'][config_tail])), # point from real config path
|
||||
util.absolute_path(Path(app_settings['config_map'][config_tail])), # point from real config path
|
||||
full_path, # to internal config location
|
||||
))
|
||||
|
||||
@@ -661,8 +659,9 @@ class ConfigManager:
|
||||
# previously set by this script), throw an error.
|
||||
if from_path.exists() and not from_path.is_symlink():
|
||||
print(
|
||||
Fore.RED + \
|
||||
f'Symlink target "{from_path}" exists and isn\'t a symlink, NOT overwriting;' \
|
||||
+ ' please first manually remove this file so a symlink can be set.'
|
||||
+ ' please first manually remove this file so a symlink can be set.'
|
||||
)
|
||||
links_fail.append((from_path, to_path))
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user