This commit is contained in:
Daniel Flanagan 2024-03-26 11:51:35 -05:00
parent e209716a07
commit d2a5c90021
2 changed files with 20 additions and 13 deletions

View file

@ -1,10 +1,24 @@
{ {
pkgs,
# font, # font,
# colors, colors,
... ...
}: { }: {
programs.wezterm = { programs.wezterm = with colors.withHashPrefix; {
enable = true; enable = true;
extraConfig = builtins.readFile ./wezterm/config.lua; extraConfig = builtins.readFile ./wezterm/config.lua;
colorSchemes = {
catppuccin-mocha-sapphire = {
ansi = map (x: colors.withHashPrefix.${toString x}) (pkgs.lib.lists.range 0 7);
brights = map (x: colors.withHashPrefix.${toString (x + 8)}) (pkgs.lib.lists.range 0 7);
foreground = fg;
background = bg;
cursor_fg = bg;
cursor_bg = text;
cursor_border = text;
};
};
}; };
} }

View file

@ -49,18 +49,11 @@ wezterm.on('format-tab-title', function (tab, _, _, _, _, max_width)
return ' ' .. string.sub(title, 0, max_width - 2) .. ' ' return ' ' .. string.sub(title, 0, max_width - 2) .. ' '
end) end)
---@diagnostic disable-next-line: unused-local local colors, metadata = wezterm.color.load_scheme(wezterm.home_dir .. "/.config/wezterm/colors/catppuccin-mocha-sapphire.toml")
local function scheme_for_appearance(appearance) wezterm.colors = colors
-- TODO: some way to detect if WM or something?
-- if appearance:find "Dark" then
-- return "Catppuccin Mocha"
-- else
-- return "Catppuccin Latte"
-- end
return "Catppuccin Mocha"
end
config.color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()) -- config.color_scheme_dirs = { '~/.config/wezterm/colors' }
-- config.color_scheme = 'catpuccin-mocha-sapphire';
config.inactive_pane_hsb = { config.inactive_pane_hsb = {
saturation = 0.8, saturation = 0.8,