Improve wezterm config

main
Julius Riegel 8 months ago
parent 616343cadf
commit dd71a7282c

@ -32,10 +32,15 @@ rainbow = "dim"
tab = "all"
nbsp = "all"
[keys.insert]
esc = ["collapse_selection", "normal_mode"]
[keys.normal]
esc = ["collapse_selection", "keep_primary_selection"]
C-j = "half_page_down"
C-k = "half_page_up"
[keys.select]
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
C-j = "half_page_down"
C-k = "half_page_up"

@ -1,6 +1,6 @@
# notify when the latest ci pipeline completes
export def notify [] {
while (info | get status) == "running" {
while (info | get status) in ["running", "queued"] {
sleep 1sec;
};
let name = ($env.PWD | path basename)
@ -21,7 +21,15 @@ export def info [] {
if (get-ci) == "gitlab" {
glab ci get -F json | from json
} else {
gh run list --json conclusion,name,startedAt,status | from json | first
(gh run list --json conclusion,name,startedAt,status | from json | first
| {
name: $in.name,
conclusion: $in.conclusion,
status: (match $in.status {
"in_progress" => {"running"},
_ => $in.status
}),
})
}
}

@ -1,6 +1,6 @@
local wezterm = require 'wezterm'
local act = wezterm.action
local config = {}
local config = wezterm.config_builder()
config.enable_scroll_bar = true
config.scrollback_lines = 12000
@ -20,36 +20,88 @@ config.window_background_gradient = {
'#1A002A',
},
}
config.inactive_pane_hsb = {
saturation = 0.9,
brightness = 0.65,
}
config.window_frame = {
active_titlebar_bg = '#1A002A',
inactive_titlebar_bg = '#1A002A',
active_titlebar_bg = '#090909',
-- inactive_titlebar_bg = '#1A002A',
}
config.colors = {
tab_bar = {
active_tab = {
bg_color = '#4383a7',
fg_color = '#FFFFFF',
},
inactive_tab = {
bg_color = '#46007c',
fg_color = '#FFFFFF',
},
inactive_tab_hover = {
bg_color = '#58008f',
fg_color = '#FFFFFF',
},
background = '#3A2A4D',
new_tab = {
bg_color = '#46007c',
fg_color = '#FFFFFF',
bg_color = '#3A2A4D',
fg_color = '#ffffff',
},
new_tab_hover = {
bg_color = '#57008f',
fg_color = '#FFFFFF',
},
}
bg_color = '#2B1C3D',
fg_color = '#ffffff',
italic = false,
}, },
}
config.window_padding = { left = 10, right = 10, top = 10, bottom = 10 }
config.use_fancy_tab_bar = false
config.tab_max_width = 32
local function tab_title(tab)
local title = tab.tab_title
-- if the tab title is explicitly set, take that
if title and #title > 0 then
return title
end
local panetitle = tab.active_pane.title
if panetitle and #panetitle > 0 then
return panetitle
end
-- Otherwise, use the default title.
return "Tab #" .. tab.tab_index + 1
end
wezterm.on("format-tab-title", function(tab, _, _, _, _, max_width)
local solid_left_arrow = ""
local solid_right_arrow = ""
local bg_color = "#3A2A4D"
local bg_active_color = "#2B1C3D"
local fg_color = "#FFFFFF"
local fg_active_color = "#FFFFFF"
-- Edge icon color
local edge_icon_bg = bg_color
local edge_icon_fg = bg_color
-- Inactive tab
local tab_bg_color = bg_active_color
local tab_fg_color = fg_color
if tab.is_active then
tab_bg_color = fg_active_color
tab_fg_color = bg_color
end
edge_icon_fg = tab_bg_color
local title = wezterm.truncate_right(tab_title(tab), max_width - 4)
title = " "..title.." "
return {
{ Background = { Color = edge_icon_bg } },
{ Foreground = { Color = edge_icon_fg } },
{ Text = solid_left_arrow },
{ Background = { Color = tab_bg_color } },
{ Foreground = { Color = tab_fg_color } },
{ Text = title },
{ Background = { Color = edge_icon_bg } },
{ Foreground = { Color = edge_icon_fg } },
{ Text = solid_right_arrow },
}
end)
-- keybinds, mostly inspired by konsole
config.keys = {
{

@ -55,6 +55,7 @@ config.modules = {
'pueue',
'onefetch',
'efm-langserver',
'gitlint',
},
gui = mod {
'kdePackages.breeze-icons',

Loading…
Cancel
Save