forked from Shinonome/caelestia-cli
feat: theme fuzzel
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
font=JetBrains Mono NF:size=17
|
||||
terminal=foot -e
|
||||
prompt="> "
|
||||
layer=overlay
|
||||
lines=15
|
||||
width=60
|
||||
dpi-aware=no
|
||||
inner-pad=10
|
||||
horizontal-pad=40
|
||||
vertical-pad=15
|
||||
match-counter=yes
|
||||
|
||||
[colors]
|
||||
background=282c34dd
|
||||
text=abb2bfdd
|
||||
prompt=d19a66ff
|
||||
placeholder=666e7cff
|
||||
input=abb2bfff
|
||||
match=be5046ff
|
||||
selection=d19a6687
|
||||
selection-text=abb2bfff
|
||||
selection-match=be5046ff
|
||||
counter=666e7cff
|
||||
border=d19a6677
|
||||
|
||||
[border]
|
||||
radius=10
|
||||
width=2
|
||||
|
||||
[colors]
|
||||
background=$surfacedd
|
||||
text=$onSurfacedd
|
||||
prompt=$primaryff
|
||||
placeholder=$outlineff
|
||||
input=$onSurfaceff
|
||||
match=$tertiaryff
|
||||
selection=$primary87
|
||||
selection-text=$onSurfaceff
|
||||
selection-match=$tertiaryff
|
||||
counter=$outlineff
|
||||
border=$primary77
|
||||
@@ -19,6 +19,13 @@ def gen_scss(colours: dict[str, str]) -> str:
|
||||
return scss
|
||||
|
||||
|
||||
def gen_replace(colours: dict[str, str], template: Path) -> str:
|
||||
template = template.read_text()
|
||||
for name, colour in colours.items():
|
||||
template = template.replace(f"${name}", colour)
|
||||
return template
|
||||
|
||||
|
||||
def c2s(c: str, *i: list[int]) -> str:
|
||||
"""Hex to ANSI sequence (e.g. ffffff, 11 -> \x1b]11;rgb:ff/ff/ff\x1b\\)"""
|
||||
return f"\x1b]{';'.join(map(str, i))};rgb:{c[0:2]}/{c[2:4]}/{c[4:6]}\x1b\\"
|
||||
@@ -91,16 +98,18 @@ def apply_discord(scss: str) -> None:
|
||||
|
||||
|
||||
def apply_spicetify(colours: dict[str, str]) -> None:
|
||||
template = (templates_dir / "spicetify.ini").read_text()
|
||||
|
||||
for name, colour in colours.items():
|
||||
template = template.replace(f"${name}", colour)
|
||||
|
||||
template = gen_replace(colours, templates_dir / "spicetify.ini")
|
||||
try_write(config_dir / "spicetify/Themes/caelestia/color.ini", template)
|
||||
|
||||
|
||||
def apply_fuzzel(colours: dict[str, str]) -> None:
|
||||
template = gen_replace(colours, templates_dir / "fuzzel.ini")
|
||||
try_write(config_dir / "fuzzel/fuzzel.ini", template)
|
||||
|
||||
|
||||
def apply_colours(colours: dict[str, str]) -> None:
|
||||
apply_terms(gen_sequences(colours))
|
||||
apply_hypr(gen_conf(colours))
|
||||
apply_discord(gen_scss(colours))
|
||||
apply_spicetify(colours)
|
||||
apply_fuzzel(colours)
|
||||
|
||||
Reference in New Issue
Block a user