2024-03-06 23:20:45 -03:00
|
|
|
{ ... }:
|
2023-11-05 04:53:31 -03:00
|
|
|
|
|
|
|
{
|
|
|
|
programs.wezterm = {
|
|
|
|
enable = true;
|
2024-06-26 02:11:25 -03:00
|
|
|
extraConfig = # lua
|
|
|
|
''
|
|
|
|
local wezterm = require("wezterm")
|
|
|
|
|
2024-07-09 06:35:04 -03:00
|
|
|
-- Needed for folke's ZenMode in neovim
|
|
|
|
wezterm.on('user-var-changed', function(window, pane, name, value)
|
|
|
|
local overrides = window:get_config_overrides() or {}
|
|
|
|
if name == "ZEN_MODE" then
|
|
|
|
local incremental = value:find("+")
|
|
|
|
local number_value = tonumber(value)
|
|
|
|
if incremental ~= nil then
|
|
|
|
while (number_value > 0) do
|
|
|
|
window:perform_action(wezterm.action.IncreaseFontSize, pane)
|
|
|
|
number_value = number_value - 1
|
|
|
|
end
|
|
|
|
overrides.enable_tab_bar = false
|
|
|
|
elseif number_value < 0 then
|
|
|
|
window:perform_action(wezterm.action.ResetFontSize, pane)
|
|
|
|
overrides.font_size = nil
|
|
|
|
overrides.enable_tab_bar = true
|
|
|
|
else
|
|
|
|
overrides.font_size = number_value
|
|
|
|
overrides.enable_tab_bar = false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
window:set_config_overrides(overrides)
|
|
|
|
end)
|
|
|
|
|
2024-06-26 02:11:25 -03:00
|
|
|
return {
|
|
|
|
color_scheme = "Catppuccin Frappe",
|
2024-07-09 06:35:23 -03:00
|
|
|
-- Unfortunately broken on Hyprland, AGAIN
|
|
|
|
-- see https://github.com/wez/wezterm/issues/5604
|
|
|
|
enable_wayland = false,
|
2024-06-26 02:11:25 -03:00
|
|
|
font = wezterm.font("FantasqueSansM Nerd Font"),
|
|
|
|
font_size = 13,
|
|
|
|
hide_tab_bar_if_only_one_tab = true,
|
|
|
|
hide_mouse_cursor_when_typing = false,
|
|
|
|
window_background_opacity = 0.88,
|
|
|
|
window_padding = {
|
|
|
|
left = 18,
|
|
|
|
right = 18,
|
|
|
|
top = 18,
|
|
|
|
bottom = 18,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
'';
|
2023-11-05 04:53:31 -03:00
|
|
|
};
|
|
|
|
}
|