theme dark:light

This commit is contained in:
Harivansh Rathi 2026-03-20 15:37:34 -04:00
parent 7ae7c1ceec
commit 67128fe09b
7 changed files with 190 additions and 40 deletions

View file

@ -4,71 +4,92 @@
stateDir = "${config.xdg.stateHome}/theme";
stateFile = "${config.xdg.stateHome}/theme/current";
ghosttyDir = "${config.xdg.configHome}/ghostty/themes";
ghosttyCurrentFile = "${config.xdg.configHome}/ghostty/themes/current.conf";
ghosttyCurrentFile = "${config.xdg.configHome}/ghostty/themes/cozybox-current";
tmuxDir = "${config.xdg.configHome}/tmux/theme";
tmuxCurrentFile = "${config.xdg.configHome}/tmux/theme/current.conf";
};
themes = {
dark = {
ghosttyTheme = "Gruvbox Material Dark";
background = "#181818";
surface = "#1e1e1e";
selectionBackground = "#504945";
selectionForeground = "#ebdbb2";
cursorColor = "#ddc7a1";
cursorText = "#181818";
foreground = "#ebdbb2";
text = "#d4be98";
mutedText = "#7c6f64";
red = "#ea6962";
green = "#8ec97c";
yellow = "#d8a657";
blue = "#5b84de";
aqua = "#8ec07c";
purple = "#d3869b";
orange = "#e78a4e";
border = "#181818";
palette = [
"#1d2021"
"#ea6962"
"#8ec97c"
"#d79921"
"#5b84de"
"#b16286"
"#689d6a"
"#a89984"
"#928374"
"#ea6962"
"#8ec97c"
"#fabd2f"
"#5b84de"
"#d3869b"
"#8ec07c"
"#ebdbb2"
];
};
light = {
ghosttyTheme = "Gruvbox Material Light";
background = "#e7e7e7";
surface = "#e1e1e1";
selectionBackground = "#c3c7c9";
selectionForeground = "#1d2021";
selectionForeground = "#3c3836";
cursorColor = "#282828";
text = "#282828";
cursorText = "#e7e7e7";
foreground = "#3c3836";
text = "#3c3836";
mutedText = "#665c54";
red = "#ea6962";
green = "#8ec97c";
yellow = "#d8a657";
blue = "#5b84de";
aqua = "#8ec07c";
purple = "#d3869b";
orange = "#e78a4e";
border = "#c3c7c9";
palette = [
"#f9f5d7"
"#ea6962"
"#8ec97c"
"#d8a657"
"#5b84de"
"#d3869b"
"#8ec07c"
"#7c6f64"
"#928374"
"#ea6962"
"#8ec97c"
"#d8a657"
"#5b84de"
"#d3869b"
"#8ec07c"
"#3c3836"
];
};
};
renderGhostty = mode: let
theme = themes.${mode};
paletteLines =
builtins.concatStringsSep "\n"
(builtins.genList
(index: "palette = ${toString index}=${builtins.elemAt theme.palette index}")
(builtins.length theme.palette));
in ''
theme = "${theme.ghosttyTheme}"
background = ${theme.background}
foreground = ${theme.foreground}
cursor-color = ${theme.cursorColor}
cursor-text = ${theme.cursorText}
selection-background = ${theme.selectionBackground}
selection-foreground = ${theme.selectionForeground}
palette = 1=${theme.red}
palette = 2=${theme.green}
palette = 3=${theme.yellow}
palette = 4=${theme.blue}
palette = 5=${theme.purple}
palette = 6=${theme.aqua}
palette = 9=${theme.red}
palette = 10=${theme.green}
palette = 11=${theme.yellow}
palette = 12=${theme.blue}
palette = 13=${theme.purple}
palette = 14=${theme.aqua}
${paletteLines}
'';
renderTmux = mode: let