Files
NixOsConfig/modules/home/wezterm.nix
T
2026-10-12 18:15:38 +03:00

51 lines
1.6 KiB
Nix
Executable File

# WezTerm terminal (SUPER+Return in Hyprland). The fonts it asks for
# (JetBrainsMono Nerd Font, Noto Color Emoji) come from modules/nixos/desktop/fonts.nix.
{
config,
lib,
...
}:
let
cfg = config.my.home.wezterm;
in
{
options.my.home.wezterm.enable = lib.mkEnableOption "WezTerm terminal";
config = lib.mkIf cfg.enable {
programs.wezterm = {
enable = true;
extraConfig = ''
local act = wezterm.action
local config = wezterm.config_builder()
config.color_scheme = 'Catppuccin Mocha'
config.font = wezterm.font_with_fallback { 'Monaspace Krypton', 'Noto Color Emoji' }
config.font_size = 12.0
-- Wayland-native, no client-side titlebar (Hyprland draws the borders).
config.enable_wayland = true
config.window_decorations = 'NONE'
config.window_padding = { left = 8, right = 8, top = 8, bottom = 8 }
-- A tab bar only when there is more than one tab.
config.hide_tab_bar_if_only_one_tab = true
config.use_fancy_tab_bar = false
config.scrollback_lines = 20000
config.audible_bell = 'Disabled'
config.check_for_updates = false
-- Hyprland owns SUPER and ALT+Tab, so splits live on CTRL+SHIFT.
-- phys: keys are layout independent and work with the ru layout.
config.keys = {
{ key = 'phys:D', mods = 'CTRL|SHIFT', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' } },
{ key = 'phys:E', mods = 'CTRL|SHIFT', action = act.SplitVertical { domain = 'CurrentPaneDomain' } },
}
return config
'';
};
};
}