local wezterm = require("wezterm") local helpers = require("helpers") local theme = require("theme") local M = {} local function get_elements(for_window) return { { Background = { Color = theme.palette.bg } }, { Text = "h:" .. wezterm.hostname() .. " " }, { Text = "u:" .. helpers.get_outdated_packages() .. " " }, { Text = "b:" .. helpers.get_primary_battery_state() .. " " }, { Background = { Color = theme.palette.bg_secondary } }, { Text = " " .. helpers.get_zoomed_status(for_window) .. " " }, { Text = "s:" .. for_window:active_workspace() .. " " }, } end wezterm.on("update-right-status", function(window, _) window:set_right_status(wezterm.format(get_elements(window))) end) function M.apply_to_config(config) config.enable_tab_bar = true config.use_fancy_tab_bar = true config.tab_bar_at_bottom = false config.window_frame = { inactive_titlebar_bg = theme.palette.bg, active_titlebar_bg = theme.palette.bg, font = wezterm.font({ family = "Victor Mono", weight = "Bold" }), } config.colors = { tab_bar = { active_tab = { bg_color = theme.palette.magenta_subtle_bg, fg_color = theme.palette.fg, }, inactive_tab = { bg_color = theme.palette.bg, fg_color = theme.palette.grey, }, inactive_tab_hover = { fg_color = theme.palette.fg, bg_color = theme.palette.bg, }, new_tab = { bg_color = theme.palette.bg, fg_color = theme.palette.grey, }, new_tab_hover = { bg_color = theme.palette.bg, fg_color = theme.palette.fg, }, }, } end return M