2024-02-18 23:06:36 +03:00
|
|
|
{ lib, config, ... }:
|
2023-07-31 00:09:57 +03:00
|
|
|
|
|
|
|
let
|
2024-04-16 02:51:46 +03:00
|
|
|
cfg = config.local.programs.terminals.wezterm;
|
|
|
|
themeCfg = config.local.themes."${config.local.theme.name}";
|
2023-07-31 00:09:57 +03:00
|
|
|
in
|
|
|
|
{
|
2024-04-16 02:51:46 +03:00
|
|
|
options.local.programs.terminals.wezterm = with lib; {
|
|
|
|
enable = mkEnableOption "wezterm";
|
2023-07-31 00:09:57 +03:00
|
|
|
fontSize = mkOption {
|
|
|
|
type = types.number;
|
|
|
|
default = 11.0;
|
|
|
|
description = "Wezterm font size";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-16 02:51:46 +03:00
|
|
|
config = lib.mkIf cfg.enable {
|
2023-07-31 00:09:57 +03:00
|
|
|
programs.wezterm = {
|
|
|
|
enable = true;
|
|
|
|
colorSchemes = {
|
|
|
|
myCoolTheme = {
|
|
|
|
ansi = [
|
|
|
|
themeCfg.window.regular.color0
|
|
|
|
themeCfg.window.regular.color1
|
|
|
|
themeCfg.window.regular.color2
|
|
|
|
themeCfg.window.regular.color3
|
|
|
|
themeCfg.window.regular.color4
|
|
|
|
themeCfg.window.regular.color5
|
|
|
|
themeCfg.window.regular.color6
|
|
|
|
themeCfg.window.regular.color7
|
|
|
|
];
|
|
|
|
brights = [
|
|
|
|
themeCfg.window.bold.color8
|
|
|
|
themeCfg.window.bold.color9
|
|
|
|
themeCfg.window.bold.color10
|
|
|
|
themeCfg.window.bold.color11
|
|
|
|
themeCfg.window.bold.color12
|
|
|
|
themeCfg.window.bold.color13
|
|
|
|
themeCfg.window.bold.color14
|
|
|
|
themeCfg.window.bold.color15
|
|
|
|
];
|
|
|
|
indexed = {
|
|
|
|
"16" = themeCfg.window.extended.color16;
|
|
|
|
"17" = themeCfg.window.extended.color17;
|
|
|
|
"18" = themeCfg.window.extended.color18;
|
|
|
|
"19" = themeCfg.window.extended.color19;
|
|
|
|
};
|
|
|
|
background = themeCfg.window.background;
|
|
|
|
foreground = themeCfg.window.mainText;
|
|
|
|
cursor_bg = themeCfg.window.cursor;
|
|
|
|
cursor_border = themeCfg.window.cursor;
|
|
|
|
cursor_fg = themeCfg.window.cursorText;
|
|
|
|
selection_bg = themeCfg.window.selection;
|
|
|
|
selection_fg = themeCfg.window.selectionText;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
extraConfig = ''
|
|
|
|
return {
|
|
|
|
font = wezterm.font("monospace"),
|
|
|
|
font_size = ${toString cfg.fontSize},
|
2024-11-30 23:46:01 +03:00
|
|
|
front_end = "WebGpu",
|
2023-07-31 00:09:57 +03:00
|
|
|
color_scheme = "myCoolTheme",
|
|
|
|
hide_tab_bar_if_only_one_tab = true,
|
2024-04-23 11:51:15 +03:00
|
|
|
-- https://github.com/wez/wezterm/issues/4483
|
2024-05-19 15:12:06 +03:00
|
|
|
enable_wayland = false,
|
|
|
|
warn_about_missing_glyphs = false
|
2023-07-31 00:09:57 +03:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|