splits out configuration into central modules
This commit is contained in:
parent
58ffb417dd
commit
b44654b9a2
63 changed files with 20 additions and 20 deletions
|
|
@ -1,40 +0,0 @@
|
|||
local wezterm = require("wezterm")
|
||||
local theme = wezterm.plugin.require("https://github.com/neapsix/wezterm").main
|
||||
local helpers = require("helpers")
|
||||
|
||||
local M = {}
|
||||
|
||||
local function get_elements(for_window)
|
||||
return {
|
||||
{ Background = { Color = theme.colors().tab_bar.background } },
|
||||
{ Foreground = { Color = theme.colors().tab_bar.inactive_tab.fg_color } },
|
||||
{ Text = "h:" .. wezterm.hostname() .. " " },
|
||||
{ Text = "upgrades:" .. helpers.get_outdated_packages() .. " " },
|
||||
{ Text = "bat:" .. helpers.get_primary_battery_state() .. " " },
|
||||
{ Background = { Color = theme.colors().tab_bar.active_tab.bg_color } },
|
||||
{ Foreground = { Color = theme.colors().tab_bar.active_tab.fg_color } },
|
||||
{ Text = " session >> " .. 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.colors().tab_bar.background,
|
||||
active_titlebar_bg = theme.colors().tab_bar.background,
|
||||
font = wezterm.font({ family = "Victor Mono", weight = "Bold" }),
|
||||
}
|
||||
|
||||
config.colors = {
|
||||
tab_bar = theme.colors().tab_bar,
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue