mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #1597 from argosnothing/kitty-windows
added border coloring for kitty themes
This commit is contained in:
@@ -21,4 +21,6 @@ background {{colors.surface.default.hex}}
|
||||
foreground {{colors.on_surface.default.hex}}
|
||||
selection_foreground {{colors.on_surface_variant.default.hex}}
|
||||
selection_background {{colors.surface_variant.default.hex}}
|
||||
active_border_color {{colors.primary.default.hex}}
|
||||
inactive_border_color {{colors.surface_variant.default.hex}}
|
||||
url_color {{colors.primary.default.hex}}
|
||||
|
||||
@@ -46,6 +46,10 @@ class TerminalColors:
|
||||
visual_bell: str
|
||||
indexed: dict[int, str]
|
||||
tab_bar: dict
|
||||
|
||||
# Kitty border colors
|
||||
active_border: str
|
||||
inactive_border: str
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, data: dict, scheme: dict) -> "TerminalColors":
|
||||
@@ -69,6 +73,7 @@ class TerminalColors:
|
||||
m_primary = scheme.get("mPrimary", cursor)
|
||||
m_on_primary = scheme.get("mOnPrimary", cursor_text)
|
||||
m_secondary = scheme.get("mSecondary", normal["yellow"])
|
||||
m_surface_variant = scheme.get("mSurfaceVariant", selection_bg)
|
||||
|
||||
return cls(
|
||||
foreground=foreground,
|
||||
@@ -94,6 +99,10 @@ class TerminalColors:
|
||||
"newTab": {"bg": selection_bg, "fg": foreground},
|
||||
"newTabHover": {"bg": bright["black"], "fg": foreground},
|
||||
},
|
||||
|
||||
# Kitty border colors
|
||||
active_border=m_primary,
|
||||
inactive_border=m_secondary
|
||||
)
|
||||
|
||||
|
||||
@@ -186,6 +195,8 @@ class TerminalGenerator:
|
||||
lines.append(f"cursor_text_color {self._ensure_hash(c.cursor_text)}")
|
||||
lines.append(f"foreground {self._ensure_hash(c.foreground)}")
|
||||
lines.append(f"selection_background {self._ensure_hash(c.foreground)}")
|
||||
lines.append(f"active_border_color {self._ensure_hash(c.active_border)}")
|
||||
lines.append(f"inactive_border_color {self._ensure_hash(c.inactive_border)}")
|
||||
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user