dotfiles/wezterm/wezterm.lua
2025-07-21 10:49:07 +03:00

89 lines
2.3 KiB
Lua

local wezterm = require("wezterm")
local config = wezterm.config_builder()
-- cosmetics
config.window_background_opacity = 0.8
config.font = wezterm.font("JetBrainsMono Nerd Font")
config.color_scheme = "Tokyo Night"
-- tabs
config.use_fancy_tab_bar = false
config.tab_bar_at_bottom = true
config.show_new_tab_button_in_tab_bar = false
config.hide_tab_bar_if_only_one_tab = true
config.mouse_wheel_scrolls_tabs = false
wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
return " " .. (tab.tab_index + 1) .. " " -- i dont think there is a padding setting?
end)
-- tab colors
config.colors = {
tab_bar = {
-- The color of the strip that goes along the top of the window
-- (does not apply when fancy tab bar is in use)
background = "00000000", -- transparent
-- The active tab is the one that has focus in the window
active_tab = {
-- The color of the background area for the tab
bg_color = "00000000", -- transparent
-- The color of the text for the tab
fg_color = "#7aa2f7",
-- Normal | Bold | Half
intensity = "Bold",
underline = "Single",
},
-- Inactive tabs are the tabs that do not have focus
inactive_tab = {
bg_color = "00000000", -- transparent
fg_color = "#545c7e",
-- The same options that were listed under the `active_tab` section above
-- can also be used for `inactive_tab`.
},
-- You can configure some alternate styling when the mouse pointer
-- moves over inactive tabs
inactive_tab_hover = {
bg_color = "00000000", -- transparent
fg_color = "#7aa2f7",
-- The same options that were listed under the `active_tab` section above
-- can also be used for `inactive_tab_hover`.
},
},
}
-- keybinds
local act = wezterm.action
config.keys = {
-- Create a new tab in the same domain as the current pane.
-- This is usually what you want.
{
key = "t",
mods = "CTRL",
action = act.SpawnTab("CurrentPaneDomain"),
},
-- Disable fullscreen keybinding (for kew)
{
key = "Enter",
mods = "ALT",
action = act.DisableDefaultAssignment,
},
}
for i = 1, 8 do
-- ALT + number to activate that tab
table.insert(config.keys, {
key = tostring(i),
mods = "ALT",
action = act.ActivateTab(i - 1),
})
end
-- Finally, return the configuration to wezterm:
return config