From 19321169d936051e1c2a557e646cb2200aaf705a Mon Sep 17 00:00:00 2001 From: Anton Volnuhin Date: Mon, 25 Mar 2024 22:56:23 +0300 Subject: [PATCH] wezterm shortcut and a bit of a config --- dot_wezterm.lua | 52 ++++++++++++++++++++++++++++++-- private_dot_config/karabiner.edn | 5 ++- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/dot_wezterm.lua b/dot_wezterm.lua index dbefdf3..be85fda 100644 --- a/dot_wezterm.lua +++ b/dot_wezterm.lua @@ -3,6 +3,7 @@ local wezterm = require 'wezterm' -- This will hold the configuration. local config = wezterm.config_builder() +local act = wezterm.action -- This is where you actually apply your config choices config.ssh_domains = { @@ -16,13 +17,58 @@ config.ssh_domains = { username = 'anton', }, } +config.keys = { + { key = 'U', mods = 'CTRL|SHIFT', action = act.AttachDomain 'devhost' }, + -- Detaches the domain associated with the current pane + { + key = 'D', + mods = 'CTRL|SHIFT', + action = act.DetachDomain 'CurrentPaneDomain', + }, + -- Detaches the "devhost" domain + { + key = 'E', + mods = 'CTRL|SHIFT', + action = act.DetachDomain { DomainName = 'devhost' }, + }, +} + +config.window_frame = { + -- The font used in the tab bar. + -- Roboto Bold is the default; this font is bundled + -- with wezterm. + -- Whatever font is selected here, it will have the + -- main font setting appended to it to pick up any + -- fallback fonts you may have used there. + font = wezterm.font { family = 'Jetbrains Mono', weight = 700 }, + + -- The size of the font in the tab bar. + -- Default to 10.0 on Windows but 12.0 on other systems + font_size = 15.0, + + -- The overall background color of the tab bar when + -- the window is focused + active_titlebar_bg = '#333333', + + -- The overall background color of the tab bar when + -- the window is not focused + inactive_titlebar_bg = '#333333', +} + +config.colors = { + tab_bar = { + -- The color of the inactive tab bar edge/divider + inactive_tab_edge = '#575757', + }, +} -- For example, changing the color scheme: ==> A!=B -config.color_scheme = 'OceanicMaterial' -config.font = wezterm.font 'Menligaturized' +config.color_scheme = 'Galaxy' +config.font = wezterm.font('Jetbrains Mono', { weight = 600 }) +config.freetype_load_target = 'Light' config.font_size = 16 -config.line_height = 1.15 +config.line_height = 1.05 config.harfbuzz_features = { 'calt=1', 'clig=0', 'liga=0' } -- and finally, return the configuration to wezterm return config diff --git a/private_dot_config/karabiner.edn b/private_dot_config/karabiner.edn index 294fe2a..e5988f9 100644 --- a/private_dot_config/karabiner.edn +++ b/private_dot_config/karabiner.edn @@ -9,6 +9,7 @@ :applications {:keykey ["^com\\.chekazuja\\.keykey$"] :kitty ["^net\\.kovidgoyal\\.kitty$"] + :wezterm ["^com.github.wez.wezterm$"] :webapp ["^com\\.apple\\.Safari\\.WebApp\\..+$"] :perplexity ["^com\\.apple\\.Safari\\.WebApp\\.F9855FA5-EDE4-4A23-A3BD-BC8ACE1CD430$"] :gemini ["^com\\.apple\\.Safari\\.WebApp\\.1550A740-0D4C-4C62-BA9B-438AA340471C$"] @@ -36,7 +37,7 @@ {:des "pedals default" :rules [:pedals [:left_pedal :!Tleft_command] - [:middle_pedal :##left_command] + [:middle_pedal :!TSleft_option] [:right_pedal :ru nil {:afterdown :ru :afterup :en}] ]} @@ -90,6 +91,8 @@ :rules [:capskey [:t [[:open "/Applications/kitty.app"] {:input :en}] :!kitty] [:t [:!Ct {:input :en}] :kitty] + [:r [[:open "/Applications/WezTerm.app"] {:input :en}] :!wezterm] + [:r [:!Ct {:input :en}] :wezterm] [:a [[:open "/Applications/Arc.app"] {:input :en}]] [:g [:open "/Users/anton/Applications/Gemini.app"] :!gemini] [:g :!Ch :gemini]