nix/graphical/terminal.nix
2025-08-08 17:00:13 +10:00

112 lines
2.9 KiB
Nix

{
pkgs,
lib,
config,
...
}:
{
# hm.programs.kitty =
# let
# inherit (config) rice;
# in
# {
# enable = true;
# font = {
# inherit (rice.fonts.monospace) name size;
# };
# settings = with rice.palette.hex; {
# foreground = util.fg;
# background = util.bg;
# inherit (util) cursor;
# cursor_text = util.bg;
# selection_foreground = util.fg_sel;
# selection_background = util.bg_sel;
# color0 = normal.black;
# color1 = normal.red;
# color2 = normal.green;
# color3 = normal.yellow;
# color4 = normal.blue;
# color5 = normal.magenta;
# color6 = normal.cyan;
# color7 = normal.white;
# color8 = bright.black;
# color9 = bright.red;
# color10 = bright.green;
# color11 = bright.yellow;
# color12 = bright.blue;
# color13 = bright.magenta;
# color14 = bright.cyan;
# color15 = bright.white;
# sync_to_monitor = "yes";
# shell = "fish";
# cursor_trail = 100;
# };
# };
home.packages = [ pkgs.ghostty ];
home.xdg.config.files = {
"ghostty/themes/rice" = {
generator =
(pkgs.formats.keyValue {
listsAsDuplicateKeys = true;
mkKeyValue = lib.generators.mkKeyValueDefault { } " = ";
}).generate
"ghostty-theme";
value =
let
inherit (config.rice.palette.shortHex) util;
inherit (config.rice.palette.hex) normal bright;
in
{
foreground = util.fg;
background = util.bg;
cursor-color = util.cursor;
palette = [
"0=${normal.black}"
"1=${normal.red}"
"2=${normal.green}"
"3=${normal.yellow}"
"4=${normal.blue}"
"5=${normal.magenta}"
"6=${normal.cyan}"
"7=${normal.white}"
"8=${bright.black}"
"9=${bright.red}"
"10=${bright.green}"
"11=${bright.yellow}"
"12=${bright.blue}"
"13=${bright.magenta}"
"14=${bright.cyan}"
"15=${bright.white}"
];
selection-foreground = util.fg_sel;
selection-background = util.bg_sel;
};
};
"ghostty/config" = {
generator = lib.generators.toKeyValue { };
value =
let
inherit (config) rice;
in
{
theme = "rice";
font-size = rice.fonts.monospace.size;
font-family = rice.fonts.monospace.name;
window-decoration = "server";
gtk-titlebar = false;
gtk-single-instance = true;
linux-cgroup = "always";
gtk-wide-tabs = false;
};
};
};
# hm.programs.ghostty = {
# enable = true;
# package = null;
# installBatSyntax = true;
# enableFishIntegration = true;
# clearDefaultKeybinds = false;
# };
}