1
0
Fork 0

wezterm: rearrange config, tabs for dark mode

This commit is contained in:
Von Random 2023-10-13 13:18:23 +03:00
parent 2f31bf8500
commit a453b04a71
2 changed files with 57 additions and 26 deletions

View file

@ -1,13 +1,45 @@
local wt = require('wezterm')
local current = {}
-- fonts
local fonts = wt.config_builder()
fonts.font = wt.font('JetBrains Mono')
fonts.font_size = 11
fonts.harfbuzz_features = {'calt=0', 'clig=0', 'liga=0'}
-- theme
local tab_fg = '#ebdbb2'
local tab_bg = '#504945'
local tab_bg_active = '#282828'
local theme = wt.config_builder()
theme.color_scheme = 'GruvboxDark'
theme.colors = {
cursor_bg = '#d65d0e',
cursor_fg = '#ebdbb2',
tab_bar = {
background = tab_bg,
active_tab = {
fg_color = tab_fg,
bg_color = tab_bg_active
},
inactive_tab = {
fg_color = tab_fg,
bg_color = tab_bg
}
}
}
theme.colors.tab_bar.active_tab_hover = theme.colors.tab_bar.active_tab
theme.colors.tab_bar.inactive_tab_hover = theme.colors.tab_bar.inactive_tab
theme.window_frame = {
active_titlebar_bg = tab_bg,
inactive_titlebar_bg = tab_bg
}
local overrides = {
fonts = {
font = wt.font('JetBrains Mono'),
font_size = 11,
harfbuzz_features = {'calt=0', 'clig=0', 'liga=0'}
},
theme = {color_scheme = 'GruvboxDark'}
fonts = fonts,
theme = theme
}
local function toggle_overrides(window, overrides)

View file

@ -2,18 +2,6 @@ local wt = require('wezterm')
local kb = require('keybinds')
local fn = require('functions')
local tab_bar_fg = '#657b83'
local tab_bar_bg = '#eee8d5'
local tab_bar_bg_active = '#fdf6e3'
local tab_bar_defaults = {
bg_color = tab_bar_bg,
fg_color = tab_bar_fg
}
local tab_bar_active = {
bg_color = tab_bar_bg_active,
fg_color = tab_bar_fg
}
local cfg = wt.config_builder()
-- misc
cfg.leader = kb.leader
@ -32,6 +20,10 @@ cfg.font_size = fn.set_by_os{
}
-- visuals
local tab_fg = '#657b83'
local tab_bg = '#eee8d5'
local tab_bg_active = '#fdf6e3'
cfg.window_decorations = 'INTEGRATED_BUTTONS|RESIZE|MACOS_FORCE_ENABLE_SHADOW'
cfg.xcursor_theme = 'Adwaita'
cfg.use_fancy_tab_bar = true
@ -43,22 +35,29 @@ cfg.colors = {
cursor_bg = '#cb4b16',
cursor_fg = '#fdf6e3',
tab_bar = {
background = tab_bar_bg,
active_tab = tab_bar_active,
inactive_tab = tab_bar_defaults,
inactive_tab_hover = tab_bar_defaults
background = tab_bg,
active_tab = {
fg_color = tab_fg,
bg_color = tab_bg_active
},
inactive_tab = {
fg_color = tab_fg,
bg_color = tab_bg
}
}
}
cfg.colors.tab_bar.active_tab_hover = cfg.colors.tab_bar.active_tab
cfg.colors.tab_bar.inactive_tab_hover = cfg.colors.tab_bar.inactive_tab
cfg.window_frame = {
active_titlebar_bg = tab_bg,
inactive_titlebar_bg = tab_bg
}
cfg.window_padding = {
left = '5pt',
right = 0,
top = '2pt',
bottom = 0
}
cfg.window_frame = {
active_titlebar_bg = tab_bar_bg,
inactive_titlebar_bg = tab_bar_bg
}
-- callbacks
require('overrides')