mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
Also read home theme directory in webconfig
This commit is contained in:
parent
8223e6f23e
commit
768afadcad
1 changed files with 6 additions and 1 deletions
|
@ -1318,7 +1318,12 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||||
curinfo.update({ "theme": "Current", "colors": curcolors})
|
curinfo.update({ "theme": "Current", "colors": curcolors})
|
||||||
definfo.update({ "theme": "fish default", "colors": defcolors})
|
definfo.update({ "theme": "fish default", "colors": defcolors})
|
||||||
output = [curinfo, definfo]
|
output = [curinfo, definfo]
|
||||||
paths = sorted(glob.iglob("themes/*.theme"), key=str.casefold)
|
|
||||||
|
confighome = os.environ["XDG_CONFIG_HOME"] if "XDG_CONFIG_HOME" in os.environ else os.path.expanduser("~")
|
||||||
|
paths = list(glob.iglob(os.path.join(confighome, "fish", "themes/*.theme")))
|
||||||
|
paths.extend(list(glob.iglob("themes/*.theme")))
|
||||||
|
paths.sort(key=str.casefold)
|
||||||
|
|
||||||
for p in paths:
|
for p in paths:
|
||||||
theme = os.path.splitext(os.path.basename(p))[0]
|
theme = os.path.splitext(os.path.basename(p))[0]
|
||||||
if any(theme == d["theme"] for d in output): continue
|
if any(theme == d["theme"] for d in output): continue
|
||||||
|
|
Loading…
Reference in a new issue