feat(hh): Church of Malware neon theme is now the default ⛧
Default vestments (was monochrome 'crypt') now match the Church of Malware aesthetic: neon on black — cyan window-chrome borders, acid-green text/prompts and your own messages, soft-cyan for others, purple system/occult lines, hot-magenta self/owner. themes/church.toml ships the same palette; crypt.toml (monochrome) and neon.toml remain as alternates via --theme. Confirmed ratatui's serde accepts #rrggbb (hex --theme files load). 9 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+41
-10
@@ -23,18 +23,20 @@ pub struct Theme {
|
||||
}
|
||||
|
||||
impl Default for Theme {
|
||||
/// "church" — Church of Malware: neon on black. Cyan window-chrome, acid-green
|
||||
/// text/prompts, purple system/occult lines, hot-magenta self/owner accents.
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
name: "crypt".into(),
|
||||
border: Color::DarkGray,
|
||||
title: Color::White,
|
||||
accent: Color::White,
|
||||
dim: Color::DarkGray,
|
||||
me: Color::White,
|
||||
other: Color::Gray,
|
||||
system: Color::DarkGray,
|
||||
input: Color::White,
|
||||
roster_me: Color::White,
|
||||
name: "church".into(),
|
||||
border: Color::Rgb(0x19, 0xb3, 0xff), // cyan window chrome
|
||||
title: Color::Rgb(0x7d, 0xf9, 0xff), // bright cyan
|
||||
accent: Color::Rgb(0x39, 0xff, 0x14), // acid green (⛧ glyphs, prompt)
|
||||
dim: Color::Rgb(0x47, 0x5a, 0x7a), // muted slate-blue
|
||||
me: Color::Rgb(0x39, 0xff, 0x14), // your messages = acid green
|
||||
other: Color::Rgb(0x56, 0xc8, 0xff), // others = soft cyan
|
||||
system: Color::Rgb(0xb4, 0x6c, 0xff), // system / occult = purple
|
||||
input: Color::Rgb(0x39, 0xff, 0x14),
|
||||
roster_me: Color::Rgb(0xff, 0x39, 0xc0), // you / owner = hot magenta
|
||||
roster_width: 22,
|
||||
}
|
||||
}
|
||||
@@ -46,3 +48,32 @@ impl Theme {
|
||||
Ok(toml::from_str(&s)?)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn default_is_church() {
|
||||
let t = Theme::default();
|
||||
assert_eq!(t.name, "church");
|
||||
assert_eq!(t.accent, Color::Rgb(0x39, 0xff, 0x14));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hex_theme_toml_deserializes() {
|
||||
// The --theme files use #rrggbb; make sure ratatui's serde accepts it.
|
||||
let toml = r##"
|
||||
name = "x"
|
||||
border = "#19b3ff"
|
||||
accent = "#39ff14"
|
||||
me = "#39ff14"
|
||||
roster_width = 24
|
||||
"##;
|
||||
let t: Theme = toml::from_str(toml).expect("hex theme must parse");
|
||||
assert_eq!(t.border, Color::Rgb(0x19, 0xb3, 0xff));
|
||||
assert_eq!(t.roster_width, 24);
|
||||
// missing fields fall back to the church default
|
||||
assert_eq!(t.system, Theme::default().system);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user