From 132dbd67012532c9f920271894323328218001fc Mon Sep 17 00:00:00 2001 From: Felix Suchert Date: Thu, 24 Oct 2024 18:06:14 -0400 Subject: [PATCH] actually track wezterm config --- tycho/wezterm/wezterm.lua | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tycho/wezterm/wezterm.lua diff --git a/tycho/wezterm/wezterm.lua b/tycho/wezterm/wezterm.lua new file mode 100644 index 0000000..14c803d --- /dev/null +++ b/tycho/wezterm/wezterm.lua @@ -0,0 +1,58 @@ +-- Import the wezterm module +local wezterm = require 'wezterm' +-- Creates a config object which we will be adding our config to +local config = wezterm.config_builder() + +-- Find them here: https://wezfurlong.org/wezterm/colorschemes/index.html +-- config.color_scheme = 'Ayu Dark (Gogh)' +config.color_scheme = 'GruvboxDarkHard' + +-- Choose your favourite font, make sure it's installed on your machine +config.font = wezterm.font({ family = 'Iosevka Medium' }) +-- And a font size that won't have you squinting +config.font_size = 12 + +-- Slightly transparent and blurred background +config.window_background_opacity = 0.9 +config.macos_window_background_blur = 30 +-- Removes the title bar, leaving only the tab bar. Keeps +-- the ability to resize by dragging the window's edges. +-- On macOS, 'RESIZE|INTEGRATED_BUTTONS' also looks nice if +-- you want to keep the window controls visible and integrate +-- them into the tab bar. +config.window_decorations = 'RESIZE|INTEGRATED_BUTTONS' +-- Sets the font for the window frame (tab bar) +config.window_frame = { + -- Berkeley Mono for me again, though an idea could be to try a + -- serif font here instead of monospace for a nicer look? + font = wezterm.font({ family = 'Iosevka Medium', weight = 'Bold' }), + font_size = 12, +} + +wezterm.on('update-status', function(window) + -- Grab the utf8 character for the "powerline" left facing + -- solid arrow. + local SOLID_LEFT_ARROW = utf8.char(0xe0b2) + + -- Grab the current window's configuration, and from it the + -- palette (this is the combination of your chosen colour scheme + -- including any overrides). + local color_scheme = window:effective_config().resolved_palette + local bg = color_scheme.background + local fg = color_scheme.foreground + + window:set_right_status(wezterm.format({ + -- First, we draw the arrow... + { Background = { Color = 'none' } }, + { Foreground = { Color = bg } }, + { Text = SOLID_LEFT_ARROW }, + -- Then we draw our text + { Background = { Color = bg } }, + { Foreground = { Color = fg } }, + { Text = ' ' .. wezterm.hostname() .. ' ' }, + })) +end) + +-- Returns our config to be evaluated. We must always do this at the bottom of this file +return config +