chore(wezterm): update

Changed files
+30 -9
wezterm
+30 -9
wezterm/wezterm.lua
··· 1 1 local wezterm = require 'wezterm' 2 2 3 + -- find from: https://github.com/thanhvule0310/dotfiles/blob/main/config/wezterm/wezterm.lua 3 4 local function get_process(tab) 4 5 local process_icons = { 5 6 ["fish"] = { ··· 38 39 } 39 40 40 41 local process_name = string.gsub(tab.active_pane.foreground_process_name, "(.*[/\\])(.*)", "%2") 42 + if process_name == '' then 43 + process_name = '?' 44 + end 41 45 42 46 return wezterm.format(process_icons[process_name] 43 47 or { ··· 78 82 end 79 83 ) 80 84 85 + local lineheight = 1.5 86 + 81 87 return { 82 88 font = wezterm.font_with_fallback { 83 89 'Fira Code', ··· 87 93 -- 'codicon', 88 94 'Symbols Nerd Font Mono', 89 95 }, 90 - -- TODO: Issue/PR for only one `italic = true` 91 96 font_rules = { 92 97 { 93 98 italic = true, 94 99 intensity = 'Normal', 95 100 font = wezterm.font { 96 - -- TODO: buy 'Operator Mono' font someday... 97 - -- other cursive fonts : 98 - -- Cascadia Mono, 99 - -- Victor Mono, 100 - -- Dank Mono 101 + -- other cursive fonts : Operator Mono, Cascadia Mono, Victor Mono, Dank Mono 101 102 family = 'Cascadia Code', 102 103 harfbuzz_features = { 'ss01=1' }, 103 104 weight = 'DemiLight', ··· 115 116 }, 116 117 }, 117 118 }, 118 - line_height = 1.2, 119 + line_height = lineheight, 119 120 allow_square_glyphs_to_overflow_width = "Always", 120 - hide_tab_bar_if_only_one_tab = false, 121 + hide_tab_bar_if_only_one_tab = true, 121 122 use_fancy_tab_bar = false, 122 123 tab_bar_at_bottom = true, 123 124 tab_max_width = 50, 124 125 adjust_window_size_when_changing_font_size = false, 126 + -- window_background_opacity = 0.95, 127 + -- window_decorations = "RESIZE", 125 128 window_padding = { 126 129 top = 0, 127 130 bottom = 0, ··· 130 133 }, 131 134 use_resize_increments = true, 132 135 font_size = 16.0, 136 + -- set underline at bottom position based on lineheight 137 + underline_position = ((lineheight - 1) * 1000 + 300) .. '%', 138 + underline_thickness = "1.5pt", 139 + cursor_thickness = "1pt", 133 140 color_scheme = 'Catppuccin Mocha', 134 141 -- disable_default_key_bindings = true, 135 - use_ime = false, -- this will fix <C-/>, <C-g> binding issue 142 + keys = { 143 + { key = 'Tab', mods = 'CTRL', action = wezterm.action.DisableDefaultAssignment }, 144 + { key = 'Tab', mods = 'CTRL|SHIFT', action = wezterm.action.DisableDefaultAssignment }, 145 + { key = 's', mods = 'CMD', action = wezterm.action.SendKey { key = 's', mods = 'ALT' } }, 146 + -- { key = '1', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 147 + -- { key = '2', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 148 + -- { key = '3', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 149 + -- { key = '4', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 150 + -- { key = '5', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 151 + -- { key = '6', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 152 + -- { key = '7', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 153 + -- { key = '8', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 154 + -- { key = '9', mods = 'CMD', action = wezterm.action.DisableDefaultAssignment }, 155 + }, 156 + use_ime = false, -- HACK: this will fix <C-/>, <C-g> binding issue 136 157 }