Fix dotfiles structure

This commit is contained in:
2026-03-15 10:32:59 +05:30
parent ca014e9949
commit a2c3404cb2
2557 changed files with 148415 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#! kitty +launch
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2021, Kovid Goyal <kovid at kovidgoyal.net>
import glob
import json
import os
from operator import itemgetter
from kittens.themes.collection import parse_theme
def main():
themes = []
seen = {}
for theme in glob.glob('themes/*.conf'):
name = os.path.basename(theme)
with open(theme) as f:
text = f.read()
td = parse_theme(name, text)
td['file'] = theme
if td['name'] in seen:
raise SystemExit(
f'The theme {td["name"]} is defined multiple times')
seen[td['name']] = theme
themes.append(td)
themes.sort(key=itemgetter('name'))
with open('themes.json', 'w') as f:
json.dump(themes, f, indent=4, sort_keys=True)
if __name__ == '__main__':
main()