2022-04-08 08:48:27 +02:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
programs.wezterm = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
|
|
return {
|
|
|
|
font = wezterm.font("JetBrains Mono"),
|
|
|
|
font_size = 16.0,
|
|
|
|
color_scheme = "Tomorrow Night",
|
|
|
|
hide_tab_bar_if_only_one_tab = true,
|
|
|
|
default_prog = { "zsh", "--login", "-c", "tmux attach -t dev || tmux new -s dev" },
|
|
|
|
keys = {
|
|
|
|
{key="n", mods="SHIFT|CTRL", action="ToggleFullScreen"},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'';
|
2022-08-11 11:21:24 +02:00
|
|
|
colorSchemes.test = {
|
|
|
|
ansi = [
|
|
|
|
"#222222"
|
|
|
|
"#D14949"
|
|
|
|
"#48874F"
|
|
|
|
"#AFA75A"
|
|
|
|
"#599797"
|
|
|
|
"#8F6089"
|
|
|
|
"#5C9FA8"
|
|
|
|
"#8C8C8C"
|
|
|
|
];
|
|
|
|
brights = [
|
|
|
|
"#444444"
|
|
|
|
"#FF6D6D"
|
|
|
|
"#89FF95"
|
|
|
|
"#FFF484"
|
|
|
|
"#97DDFF"
|
|
|
|
"#FDAAF2"
|
|
|
|
"#85F5DA"
|
|
|
|
"#E9E9E9"
|
|
|
|
];
|
|
|
|
background = "#1B1B1B";
|
|
|
|
cursor_bg = "#BEAF8A";
|
|
|
|
cursor_border = "#BEAF8A";
|
|
|
|
cursor_fg = "#1B1B1B";
|
|
|
|
foreground = "#BEAF8A";
|
|
|
|
selection_bg = "#444444";
|
|
|
|
selection_fg = "#E9E9E9";
|
|
|
|
};
|
2022-04-08 08:48:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
test.stubs.wezterm = { };
|
|
|
|
|
|
|
|
nmt.script = let
|
2022-08-11 11:21:24 +02:00
|
|
|
expectedConfig = builtins.toFile "wezterm.lua" ''
|
2022-04-08 08:48:27 +02:00
|
|
|
-- Generated by Home Manager.
|
|
|
|
-- See https://wezfurlong.org/wezterm/
|
|
|
|
|
2024-09-19 19:05:06 +02:00
|
|
|
local wezterm = require 'wezterm'
|
2022-04-08 08:48:27 +02:00
|
|
|
|
|
|
|
return {
|
|
|
|
font = wezterm.font("JetBrains Mono"),
|
|
|
|
font_size = 16.0,
|
|
|
|
color_scheme = "Tomorrow Night",
|
|
|
|
hide_tab_bar_if_only_one_tab = true,
|
|
|
|
default_prog = { "zsh", "--login", "-c", "tmux attach -t dev || tmux new -s dev" },
|
|
|
|
keys = {
|
|
|
|
{key="n", mods="SHIFT|CTRL", action="ToggleFullScreen"},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
'';
|
2022-08-11 11:21:24 +02:00
|
|
|
expectedColorScheme = builtins.toFile "test.toml" ''
|
|
|
|
[colors]
|
|
|
|
ansi = ["#222222", "#D14949", "#48874F", "#AFA75A", "#599797", "#8F6089", "#5C9FA8", "#8C8C8C"]
|
|
|
|
background = "#1B1B1B"
|
|
|
|
brights = ["#444444", "#FF6D6D", "#89FF95", "#FFF484", "#97DDFF", "#FDAAF2", "#85F5DA", "#E9E9E9"]
|
|
|
|
cursor_bg = "#BEAF8A"
|
|
|
|
cursor_border = "#BEAF8A"
|
|
|
|
cursor_fg = "#1B1B1B"
|
|
|
|
foreground = "#BEAF8A"
|
|
|
|
selection_bg = "#444444"
|
|
|
|
selection_fg = "#E9E9E9"
|
|
|
|
'';
|
2022-04-08 08:48:27 +02:00
|
|
|
in ''
|
|
|
|
assertFileExists home-files/.config/wezterm/wezterm.lua
|
2022-08-11 11:21:24 +02:00
|
|
|
assertFileContent home-files/.config/wezterm/wezterm.lua ${expectedConfig}
|
|
|
|
assertFileExists home-files/.config/wezterm/colors/test.toml
|
|
|
|
assertFileContent home-files/.config/wezterm/colors/test.toml ${expectedColorScheme}
|
2022-04-08 08:48:27 +02:00
|
|
|
'';
|
|
|
|
}
|