1
0
Fork 0

wezterm: better implemenation of set_by_os to avoid checking for os multiple times

This commit is contained in:
Von Random 2025-02-25 14:01:02 +02:00
parent 78342c07ad
commit 3168e01c95
2 changed files with 6 additions and 4 deletions
dot_config/wezterm

View file

@ -5,11 +5,12 @@ local function get_os()
end end
local function set_by_os(values) local function set_by_os(values)
local my_os = get_os() if values[MY_OS] then return values[MY_OS] end
if values[my_os] then return values[my_os] end
return values.others return values.others
end end
MY_OS = get_os()
return { return {
set_by_os = set_by_os set_by_os = set_by_os
} }

View file

@ -26,11 +26,12 @@ cfg.font_size = fn.set_by_os{
} }
-- visuals -- visuals
-- maybe enable these back one day
-- cfg.window_decorations = 'RESIZE'
-- cfg.hide_tab_bar_if_only_one_tab = false
cfg.native_macos_fullscreen_mode = false cfg.native_macos_fullscreen_mode = false
cfg.window_decorations = 'RESIZE'
cfg.xcursor_theme = 'Adwaita' cfg.xcursor_theme = 'Adwaita'
cfg.use_fancy_tab_bar = false cfg.use_fancy_tab_bar = false
cfg.hide_tab_bar_if_only_one_tab = false
cfg.show_new_tab_button_in_tab_bar = false cfg.show_new_tab_button_in_tab_bar = false
cfg.tab_max_width = 24 cfg.tab_max_width = 24
cfg.window_padding = { cfg.window_padding = {