1use ishou_tokens::TokenSet;
5
6pub fn render(t: &TokenSet) -> String {
7 let c = &t.color;
8 let hex = |rgb: ishou_tokens::Rgb| rgb.hex();
9 let mut out = String::from("# ishou — pleme-io Ghostty config (generated)\n\n");
10
11 out.push_str(&format!("background = {}\n", hex(c.polar_night_0)));
13 out.push_str(&format!("foreground = {}\n", hex(c.snow_storm_2)));
14 out.push_str(&format!("cursor-color = {}\n", hex(c.frost_1)));
15 out.push_str(&format!("selection-background = {}\n", hex(c.polar_night_2)));
16 out.push_str(&format!("selection-foreground = {}\n", hex(c.snow_storm_2)));
17
18 let palette = [
20 c.polar_night_0, c.aurora_red, c.aurora_green, c.aurora_yellow,
21 c.frost_3, c.aurora_purple, c.frost_0, c.snow_storm_0,
22 c.polar_night_3, c.aurora_red, c.aurora_green, c.aurora_yellow,
23 c.frost_2, c.aurora_purple, c.frost_1, c.snow_storm_2,
24 ];
25 for (i, p) in palette.iter().enumerate() {
26 out.push_str(&format!("palette = {i}={}\n", hex(*p)));
27 }
28
29 let shaders = [
31 "stardust", "sonic-boom", "prompt-saber", "cursor-glow",
32 "cursor-trail", "bloom", "frost-haze", "spotlight",
33 "background-pulse", "chromatic-aberration", "film-grain", "screen-curvature",
34 ];
35 for s in shaders {
36 out.push_str(&format!("custom-shader = ${{blackmatter-ghostty}}/shaders/{s}.glsl\n"));
37 }
38 out
39}