diff options
| author | delta <darkussdelta@gmail.com> | 2023-03-04 22:04:55 +0100 |
|---|---|---|
| committer | delta <darkussdelta@gmail.com> | 2023-03-04 22:18:21 +0100 |
| commit | f0b32f45746c026d402651013b7e98315d6956a1 (patch) | |
| tree | f42609e98522da081cebdd21a674a702d1054bbc /.config/wezterm/appearance.lua | |
| parent | a0f8b5fa6acdd1c2477fb1881dd9067956bf0ae6 (diff) | |
restructure awesome config, add fresnel
Diffstat (limited to '.config/wezterm/appearance.lua')
| -rw-r--r-- | .config/wezterm/appearance.lua | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/.config/wezterm/appearance.lua b/.config/wezterm/appearance.lua new file mode 100644 index 0000000..2376174 --- /dev/null +++ b/.config/wezterm/appearance.lua @@ -0,0 +1,62 @@ +local wezterm = require "wezterm" + +local function basename(s) + return string.gsub(s, '(.*[/\\])(.*)', '%2') +end + +local function home_or_path(path) + local realpath = path:sub(14, -1) -- file://lambda + local home = os.getenv("HOME") + return realpath == home and "~" or realpath +end + +wezterm.on("format-tab-title", function(tab) + local tab_format = { + { Text = " " }, + { Text = tostring(tab.tab_index + 1) }, + { Text = " " }, + { Text = basename(home_or_path(tab.active_pane.current_working_dir)) }, + { Text = " " }, + "ResetAttributes", + } + + if tab.is_active then + table.insert(tab_format, 1, { Background = { Color = C.black } }) + end + + return wezterm.format(tab_format) +end) + +return { + -- tabs + show_new_tab_button_in_tab_bar = false, + use_fancy_tab_bar = false, + tab_bar_at_bottom = true, + hide_tab_bar_if_only_one_tab = true, + + -- font + font = wezterm.font { + family = "FiraCode Nerd Font Mono", + harfbuzz_features = { "ss02", "ss03", "ss04", "ss08" } + }, + font_size = 10, + adjust_window_size_when_changing_font_size = false, + + -- cursor + default_cursor_style = "BlinkingUnderline", + cursor_blink_rate = 500, + animation_fps = 1, + + -- window + window_padding = { + left = 10, + right = 10, + top = 10, + bottom = 10 + }, + + -- colors + colors = R "colors", + bold_brightens_ansi_colors = false, + +} |
