wezterm: fresh new bg and cleanup of config
471ca444c324eb54d618e3ac365435e705521703
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 7a3954e7a1bb
bugabingas dorkfiles
471ca444c324eb54d618e3ac365435e705521703
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+707 / −545 text lines
+5 / −0 text lines
+1 / −0 text lines
+5 / −4 text lines
"nvim-lint": { "branch": "master", "commit": "ba0ab2f813e77d015da1a1c9920328fd2bf295f2" }, "nvim-lint": { "branch": "master", "commit": "c823e2d0621b5c15aa6b46be4d69b1379bcb8fa6" }, "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, "nvim-web-devicons": { "branch": "master", "commit": "31bd21ac46b2b6039aa0b856ca02b018cf549ef7" }, "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "transparent.nvim": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" },+22 / −1 text lines
map.normal { description = 'Yanks the selected text (in normal mode or visual mode) to the system clipboard.', category = 'editing', keys = '<leader>y', command = '"+y',}map.normal { description = 'Pastes from the system clipboard (in normal mode or visual mode).', category = 'editing', keys = '<leader>p', command = '"+p',}map.normal { description = 'Yanks the entire line (when used in normal mode with motion).', category = 'editing', keys = '<leader>Y', command = '"+Y',}new file mode 100644+14 / −0 text lines
local map = require 'std.map'map.normal { description = 'Toggle background transparency.', category = 'ui', keys = '<leader>tb', command = '<cmd>TransparentToggle<cr>',}return { 'xiyaowong/transparent.nvim', cmd = { 'TransparentEnable', 'TransparentDisable', 'TransparentToggle', }, config = true,}+0 / −1 text lines
s = { name = '|s|essions', _ = 'which_key_ignore', },+2 / −0 text lines
+1 / −1 text lines
new file mode 100644+150 / −0 text lines
root = true[*]spell = false[*.lua]number = truerelativenumber = truediagnostic = true# see https://github.com/CppCXY/EmmyLuaCodeStyle# optional space/tabindent_style = space# if indent_style is space, this is validindent_size = 2# if indent_style is tab, this is validtab_width = 2# none/single/doublequote_style = singlecontinuation_indent = 2# this mean utf8 length , if this is 'unset' then the line width is no longer checked# this option decides when to chopdown the codemax_line_length = 120# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf# in neovim the value 'auto' is not a valid option, please use 'unset'end_of_line = lf# none/ comma / semicolon / only_kv_colontable_separator_style = comma#optional keep/never/always/smarttrailing_table_separator = always# keep/remove/remove_table_only/remove_string_onlycall_arg_parentheses = removedetect_end_of_line = false# this will check text end with new lineinsert_final_newline = true# [space]space_around_table_field_list = truespace_before_attribute = truespace_before_function_open_parenthesis = falsespace_before_function_call_open_parenthesis = falsespace_before_closure_open_parenthesis = true# optional always/only_string/only_table/none# or true/falsespace_before_function_call_single_arg = alwaysspace_before_open_square_bracket = falsespace_inside_function_call_parentheses = truespace_inside_function_param_list_parentheses = truespace_inside_square_brackets = false# like t[#t+1] = 1space_around_table_append_operator = falseignore_spaces_inside_function_call = falsespace_before_inline_comment = 1# [operator space]space_around_math_operator = truespace_after_comma = truespace_after_comma_in_for_statement = truespace_around_concat_operator = true# [align]align_call_args = truealign_function_params = truealign_continuous_assign_statement = truealign_continuous_rect_table_field = truealign_continuous_line_space = 2align_if_branch = true# option none / always / contain_curly/align_array_table = truealign_continuous_similar_call_args = truealign_continuous_inline_comment = true# option none / always / only_call_stmtalign_chain_expr = none# [indent]never_indent_before_if_condition = falsenever_indent_comment_on_if_branch = false# [line space]# The following configuration supports four expressions# keep# fixed(n)# min(n)# max(n)# for eg. min(2)line_space_after_if_statement = keepline_space_after_do_statement = keepline_space_after_while_statement = keepline_space_after_repeat_statement = keepline_space_after_for_statement = keepline_space_after_local_or_assign_statement = keepline_space_after_function_statement = fixed(2)line_space_after_expression_statement = keepline_space_after_comment = keep# [line break]break_all_list_when_line_exceed = falseauto_collapse_lines = falsebreak_before_braces = false# [preference]ignore_space_after_colon = falseremove_call_expression_list_finish_comma = falsedeleted file mode 100644+0 / −31 text lines
local wez = require 'wezterm'-- wezterm.gui is not available to the mux server, so take care to-- do something reasonable when this config is evaluated by the muxlocal get_appearance = function() if wez.gui then return wez.gui.get_appearance() end return 'Dark'endlocal scheme_for_appearance = function(appearance) if appearance:find('Dark',1, true) then return 'nugu-dark' else return 'nugu-light' endend-- TODO: what is that good for?-- wez.on('window-config-reloaded', function(window)-- local overrides = window:get_config_overrides() or {}-- local appearance = window:get_appearance()-- local scheme = scheme_for_appearance(appearance)-- if overrides.color_scheme ~= scheme then-- overrides.color_scheme = scheme-- window:set_config_overrides(overrides)-- end-- end)return scheme_for_appearance(get_appearance())new file mode 100644+9 / −0 text lines
new file mode 100644+8 / −0 text lines
new file mode 100644+38 / −0 text lines
local nerd_font = require 'bugabinga.nerd_font'return function ( cfg ) cfg.font = nerd_font.random(); cfg.background = { { source = { File = '/home/oli/Pictures/Bilder/2012/05/20/Waldshooting_vonni_tini_2012 (12).jpg', }, hsb = { hue = 1.0, saturation = 0.0, brightness = 0.004, }, attachment = { Parallax = 0.006, }, vertical_align = 'Middle', horizontal_align = 'Center', }, { source = { Gradient = { colors = { 'purple', '#131313', }, orientation = { Radial = { cx = 0.5, cy = 0.5, radius = 1.25, }, }, }, }, opacity = 0.1, width = '100%', height = '100%', }, }endnew file mode 100644+12 / −0 text lines
local wez = require 'wezterm'return function ( cfg ) local hostname = wez.hostname() local ok, host = pcall( require, 'bugabinga.hosts.' .. hostname ) if ok then host( cfg ) else local msg = 'unknown host ' .. hostname .. '. forgot to create new file in /bugabinga/hosts?' wez.log_warn( msg ) endendnew file mode 100644+5 / −0 text lines
+176 / −170 text lines
[resize_pane_mode] = { { key = 'h', action = wez.action.AdjustPaneSize { 'Left', 1 } }, { key = 'j', action = wez.action.AdjustPaneSize { 'Down', 1 } }, { key = 'k', action = wez.action.AdjustPaneSize { 'Up', 1 } }, { key = 'l', action = wez.action.AdjustPaneSize { 'Right', 1 } }, [resize_pane_mode] = { { key = 'h', action = wez.action.AdjustPaneSize { 'Left', 1, }, }, { key = 'j', action = wez.action.AdjustPaneSize { 'Down', 1, }, }, { key = 'k', action = wez.action.AdjustPaneSize { 'Up', 1, }, }, { key = 'l', action = wez.action.AdjustPaneSize { 'Right', 1, }, }, { key = 'Escape', action = 'PopKeyTable' }, }, [pane_mode] = { { key = 'h', action = wez.action.ActivatePaneDirection 'Left' }, { key = 'j', action = wez.action.ActivatePaneDirection 'Down' }, { key = 'k', action = wez.action.ActivatePaneDirection 'Up' }, { key = 'l', action = wez.action.ActivatePaneDirection 'Right' }, { key = 'Escape', action = 'PopKeyTable', }, }, [pane_mode] = { { key = 'h', action = wez.action.ActivatePaneDirection 'Left', }, { key = 'j', action = wez.action.ActivatePaneDirection 'Down', }, { key = 'k', action = wez.action.ActivatePaneDirection 'Up', }, { key = 'l', action = wez.action.ActivatePaneDirection 'Right', }, { key = '=', action = wez.action.ActivateKeyTable { name = resize_pane_mode, one_shot = false } }, { key = '=', action = wez.action.ActivateKeyTable { name = resize_pane_mode, one_shot = false, }, }, { key = 'q', action = wez.action.CloseCurrentPane { confirm = false } }, { key = 'q', action = wez.action.CloseCurrentPane { confirm = false, }, }, { key = 'Escape', action = 'PopKeyTable' }, }, [navigate_forward_mode] = { { key = 'b', -- b as in buffer in vim action = wez.action.ActivateTabRelative(1), }, { key = 'w', -- next workspace action = wez.action.SwitchWorkspaceRelative(1), }, }, [navigate_backward_mode] = { { key = 'b', action = wez.action.ActivateTabRelative(-1), }, { key = 'w', -- prev workspace action = wez.action.SwitchWorkspaceRelative(-1), }, } { key = 'Escape', action = 'PopKeyTable', }, }, [navigate_forward_mode] = { { key = 'b', -- b as in buffer in vim action = wez.action.ActivateTabRelative( 1 ), }, { key = 'w', -- next workspace action = wez.action.SwitchWorkspaceRelative( 1 ), }, }, [navigate_backward_mode] = { { key = 'b', action = wez.action.ActivateTabRelative( -1 ), }, { key = 'w', -- prev workspace action = wez.action.SwitchWorkspaceRelative( -1 ), }, }, { key = ']', mods = 'LEADER', action = wez.action.ActivateKeyTable { name = navigate_forward_mode }, }, { key = '[', mods = 'LEADER', action = wez.action.ActivateKeyTable { name = navigate_backward_mode }, }, { key = '0', mods = 'LEADER', action = wez.action.ActivateKeyTable { name = font_size_mode, one_shot = false }, }, { key = 'w', mods = 'LEADER', action = wez.action.ActivateKeyTable { name = pane_mode }, }, { key = 'a', mods = 'LEADER', action = wez.action.PaneSelect, }, { key = 'f', mods = 'LEADER', action = wez.action.TogglePaneZoomState, }, { key = 'F5', mods = 'LEADER', action = wez.action.ReloadConfiguration, }, { key = 'F11', mods = 'LEADER', action = wez.action.ToggleFullScreen, }, { key = 'F12', mods = 'LEADER', action = wez.action.ShowDebugOverlay, }, { key = 'u', mods = 'LEADER', action = wez.action.CharSelect { copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' }, }, { key = 'c', mods = 'CTRL|SHIFT', action = wez.action.CopyTo 'Clipboard', }, { key = 'v', mods = 'CTRL|SHIFT', action = wez.action.PasteFrom 'Clipboard', }, { key = 't', mods = 'LEADER', action = wez.action.SpawnTab 'CurrentPaneDomain', }, { key = 'p', mods = 'LEADER', action = wez.action.ActivateCommandPalette, }, { key = 'c', mods = 'LEADER', action = wez.action.SwitchToWorkspace { name = 'code' }, }, { key = 'k', mods = 'LEADER', action = wez.action.SwitchToWorkspace { name = 'dorkfiles editing' }, }, { key = 'd', mods = 'LEADER', action = wez.action.SwitchToWorkspace { name = 'default' }, }, { key = 'r', mods = 'LEADER', action = wez.action.ShowLauncherArgs { flags = 'FUZZY|WORKSPACES', }, }, { key = '/', mods = 'LEADER', action = wez.action.Search 'CurrentSelectionOrEmptyString', }, { key = 'Enter', mods = 'LEADER', action = wez.action.QuickSelect, }, { key = 'q', mods = 'LEADER', action = wez.action.QuitApplication, }, { key = ']', mods = 'LEADER', action = wez.action.ActivateKeyTable { name = navigate_forward_mode, }, }, { key = '[', mods = 'LEADER', action = wez.action.ActivateKeyTable { name = navigate_backward_mode, }, }, { key = '0', mods = 'LEADER', action = wez.action.ActivateKeyTable { name = font_size_mode, one_shot = false, }, }, { key = 'w', mods = 'LEADER', action = wez.action.ActivateKeyTable { name = pane_mode, }, }, { key = 'a', mods = 'LEADER', action = wez.action.PaneSelect, }, { key = 'f', mods = 'LEADER', action = wez.action.TogglePaneZoomState, }, { key = 'F5', mods = 'LEADER', action = wez.action.ReloadConfiguration, }, { key = 'F11', mods = 'LEADER', action = wez.action.ToggleFullScreen, }, { key = 'F12', mods = 'LEADER', action = wez.action.ShowDebugOverlay, }, { key = 'u', mods = 'LEADER', action = wez.action.CharSelect { copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection', }, }, { key = 'c', mods = 'CTRL|SHIFT', action = wez.action.CopyTo 'Clipboard', }, { key = 'v', mods = 'CTRL|SHIFT', action = wez.action.PasteFrom 'Clipboard', }, { key = 't', mods = 'LEADER', action = wez.action.SpawnTab 'CurrentPaneDomain', }, { key = 'p', mods = 'LEADER', action = wez.action.ActivateCommandPalette, }, { key = 'c', mods = 'LEADER', action = wez.action.SwitchToWorkspace { name = 'code', }, }, { key = 'k', mods = 'LEADER', action = wez.action.SwitchToWorkspace { name = 'dorkfiles editing', }, }, { key = 'd', mods = 'LEADER', action = wez.action.SwitchToWorkspace { name = 'default', }, }, { key = 'r', mods = 'LEADER', action = wez.action.ShowLauncherArgs { flags = 'FUZZY|WORKSPACES', }, }, { key = 'd', mods = 'LEADER', action = wez.action.ShowLauncherArgs { flags = 'FUZZY|LAUNCH_MENU_ITEMS', }, }, { key = '/', mods = 'LEADER', action = wez.action.Search 'CurrentSelectionOrEmptyString', }, { key = 'Enter', mods = 'LEADER', action = wez.action.QuickSelect, }, { key = 'q', mods = 'LEADER', action = wez.action.QuitApplication, },new file mode 100644+40 / −0 text lines
local wez = require 'wezterm'return function ( cfg ) cfg.launch_menu = { { label = 'E-Mail', args = { 'aerc', }, cwd = wez.home_dir, }, { label = 'Bottom', args = { 'btm', }, cwd = wez.home_dir, }, { label = 'Clock', args = { 'tclock', }, cwd = wez.home_dir, }, { label = 'Netscanner', args = { 'sudo', wez.home_dir .. '/.cargo/bin/netscanner', }, cwd = wez.home_dir, }, { label = 'Calc', args = { 'eva', }, cwd = wez.home_dir, }, { label = 'Units', args = { 'fend', }, cwd = wez.home_dir, }, { label = 'Files', args = { 'yazi', }, cwd = wez.home_dir, }, }end+24 / −25 text lines
return function( wez ) wez.on('user-var-changed', function(window, pane, name, value) print "zen" local overrides = window:get_config_overrides() or {} if name == "ZEN_MODE" then local incremental = value:find("+") local number_value = tonumber(value) if incremental ~= nil then while (number_value > 0) do window:perform_action(wez.action.IncreaseFontSize, pane) number_value = number_value - 1 end overrides.enable_tab_bar = false elseif number_value < 0 then window:perform_action(wez.action.ResetFontSize, pane) overrides.font_size = nil overrides.enable_tab_bar = true else overrides.font_size = number_value overrides.enable_tab_bar = false end end window:set_config_overrides(overrides) end)endlocal wez = require 'wezterm'wez.on( 'user-var-changed', function ( window, pane, name, value ) local overrides = window:get_config_overrides() or {} if name == 'ZEN_MODE' then local incremental = value:find '+' local number_value = tonumber( value ) if incremental ~= nil then while number_value > 0 do window:perform_action( wez.action.IncreaseFontSize, pane ) number_value = number_value - 1 end overrides.enable_tab_bar = false elseif number_value < 0 then window:perform_action( wez.action.ResetFontSize, pane ) overrides.font_size = nil overrides.enable_tab_bar = true else overrides.font_size = number_value overrides.enable_tab_bar = false end end window:set_config_overrides( overrides )end )new file mode 100644+18 / −0 text lines
local wez = require 'wezterm'return { random = function () local font_names = {} local nerdfonts = io.open( wez.config_dir .. '/bugabinga/nerdfonts', 'r' ) if nerdfonts then for font_name in nerdfonts:lines() do if not font_name:match '^#.*' then table.insert( font_names, font_name ) end end local random_font = font_names[math.random( #font_names )] return wez.font( random_font ) end return wez.font 'JetBrains Mono' end,}new file mode 100644+39 / −0 text lines
Bitstream Vera Sans Mono# TerminusAnonymous ProAurulent Sans Mono# BigBlueTerminalPlusCascadia CodeCousineD2CodingDejaVu Sans MonoDroid Sans MonoEnvy Code RFantasque Sans Mono# FiraCodeGeistMonoHackHaskligHermit# IBM 3270IBM Plex Mono# InconsolataIntel One MonoJetBrainsMonoLekton# Liberation MonoLilexMartianMonoMonaspace Argon VarMonaspace Krypton VarMonaspace Neon VarMonofurMonoidMononokiRec Mono CasualRec Mono LinearRobotoMonoShare Tech MonoSource Code ProVictorMonoiA Writer Mono Vnew file mode 100644+22 / −0 text lines
local wez = require 'wezterm'return function(cfg) cfg.default_cwd = wez.home_dir cfg.inactive_pane_hsb = { saturation = 0.42, brightness = 0.69, } cfg.default_cursor_style = 'SteadyBlock' cfg.check_for_updates = false cfg.audible_bell = 'Disabled' cfg.visual_bell = { fade_in_duration_ms = 69, fade_out_duration_ms = 69, target = 'CursorColor', } cfg.cursor_blink_rate = 0 cfg.front_end = 'WebGpu' cfg.max_fps = 144 cfg.unzoom_on_switch_pane = true cfg.scrollback_lines = 16777216endnew file mode 100644+3 / −0 text lines
+62 / −41 text lines
wez.on('update-status', function(window, pane) local key_table = window:active_key_table() local current_workspace = window:active_workspace() local zoomed_state = zoomed(pane) local leader = nil if window:leader_is_active() then leader = 'LEADER' end local fonts = {} local config = window:effective_config() local font_size = config.font_size for _, font in pairs(config.font.font) do table.insert(fonts, string.format('%s:%s', font.family, font_size)) end local font = wez.format { { Text = ' Font ' }, { Attribute = { Intensity = 'Bold' } }, { Text = table.concat(fonts, ', ') }, 'ResetAttributes' }wez.on( 'update-status', function ( window, pane ) local key_table = window:active_key_table() local current_workspace = window:active_workspace() local zoomed_state = zoomed( pane ) local leader = nil if window:leader_is_active() then leader = 'LEADER' end local fonts = {} local config = window:effective_config() local font_size = config.font_size for _, font in pairs( config.font.font ) do table.insert( fonts, string.format( '%s:%s', font.family, font_size ) ) end local font = wez.format { { Text = ' Font ', }, { Attribute = { Intensity = 'Bold', }, }, { Text = table.concat( fonts, ', ' ), }, 'ResetAttributes', } local status = { ' ' } if leader then table.insert(status, leader) end if key_table then table.insert(status, key_table) end if zoomed_state then table.insert(status, zoomed_state) end if current_workspace then table.insert(status, current_workspace) end if font then table.insert(status, font) end local status = { '', } if leader then table.insert( status, leader ) end if key_table then table.insert( status, key_table ) end if zoomed_state then table.insert( status, zoomed_state ) end if current_workspace then table.insert( status, current_workspace ) end if font then table.insert( status, font ) end window:set_right_status(table.concat(status, DELIMITER)) --TODO: shirley, something useful can be done here window:set_left_status(' ')end) window:set_right_status( table.concat( status, DELIMITER ) ) --TODO: shirley, something useful can be done here window:set_left_status ' π 'end )return function ( cfg ) cfg.enable_tab_bar = true -- if this is hidden, we cannot see the right status are cfg.hide_tab_bar_if_only_one_tab = false cfg.use_fancy_tab_bar = false cfg.tab_max_width = 42 cfg.tab_bar_at_bottom = trueendnew file mode 100644+24 / −0 text lines
local wez = require 'wezterm'local nugu = require 'bugabinga.nugu'-- wezterm.gui is not available to the mux server, so take care to-- do something reasonable when this config is evaluated by the muxlocal get_appearance = function () if wez.gui then return wez.gui.get_appearance() end return 'Dark'endlocal scheme_for_appearance = function ( appearance ) if appearance:find( 'Dark', 1, true ) then return 'nugu-dark' else return 'nugu-light' endendreturn function ( cfg ) cfg.color_scheme = scheme_for_appearance( get_appearance() ) cfg.color_schemes = nuguendnew file mode 100644+14 / −0 text lines
deleted file mode 100644+0 / −72 text lines
local wez = require 'wezterm'local mux = wez.muxlocal win32 = wez.target_triple:find'windows'local get_my_code_workspace = function() if win32 then return wez.home_dir .. '/Workspaces' else return wez.home_dir .. '/Workspace' endendlocal WORKSPACE = get_my_code_workspace()-- maximize all displayed windowslocal maximize_window = function() local workspace = mux.get_active_workspace() for _, window in ipairs(mux.all_windows()) do if window:get_workspace() == workspace then window:gui_window():maximize() end endendlocal setup_workspaces = function() local dork_ws = 'dorkfiles editing' local dork_cwd = WORKSPACE .. '/dotfiles' local dork_tab, dork_pane, dork_window = mux.spawn_window { cwd = dork_cwd, workspace = dork_ws } local dork_top_pane = dork_pane:split { cwd = dork_cwd, direction = 'Top', size = 0.69 } dork_top_pane:split { cwd = dork_cwd, direction = 'Left', size = 0.42 } dork_tab:set_title 'Dorkfiles Editing' local wezterm_config_tab = dork_window:spawn_tab { cwd = dork_cwd .. '/wezterm' } wezterm_config_tab:set_title 'Wezterm' wezterm_config_tab:active_pane():split { cwd = dork_cwd .. '/wezterm', direction = 'Left', size = 0.69 } local nvim_config_tab = dork_window:spawn_tab { cwd = dork_cwd .. '/neovim' } nvim_config_tab:set_title 'Neovim' nvim_config_tab:active_pane():split { cwd = dork_cwd .. '/neovim', direction = 'Left', size = 0.69 } local code_ws = 'code' local code_cwd = WORKSPACE local code_tab, code_pane, code_window = mux.spawn_window { cwd = code_cwd, workspace = code_ws } local code_top_pane = code_pane:split { cwd = code_cwd, direction = 'Top', size = 0.69 } code_pane:split { cwd = code_cwd, direction = 'Right', size = 0.42 } code_tab:set_title 'Code' code_top_pane:activate() local default_ws = 'default' local default_cwd = wez.home_dir local default_tab, default_pane, default_window = mux.spawn_window { cwd = default_cwd, workspace = default_ws } local default_top_pane = default_pane:split { cwd = default_cwd, direction = 'Top', size = 0.69 } default_pane:split { cwd = default_cwd, direction = 'Right', size = 0.42 } default_top_pane:split { cwd = default_cwd, direction = 'Right', size = 0.42 } default_tab:set_title 'Default' default_top_pane:activate() mux.set_active_workspace(default_ws)endwez.on('gui-attached', function() -- setup_workspaces() maximize_window()end)-- NOTE(oli): errors in here do not show up as configuration errors-- check the log file in the wezterm mux server runtime directory-- e.g. /run/user/1000/wezterm/log-- NOTE: mux seems buggy and slow. not sure why or how to really repro-- wez.on('mux-startup', function()-- setup_workspaces()-- end)deleted file mode 100644+0 / −39 text lines
Bitstream Vera Sans Mono# TerminusAnonymous ProAurulent Sans Mono# BigBlueTerminalPlusCascadia CodeCousineD2CodingDejaVu Sans MonoDroid Sans MonoEnvy Code RFantasque Sans Mono# FiraCodeGeistMonoHackHaskligHermit# IBM 3270IBM Plex Mono# InconsolataIntel One MonoJetBrainsMonoLekton# Liberation MonoLilexMartianMonoMonaspace Argon VarMonaspace Krypton VarMonaspace Neon VarMonofurMonoidMononokiRec Mono CasualRec Mono LinearRobotoMonoShare Tech MonoSource Code ProVictorMonoiA Writer Mono V+13 / −160 text lines
local nugu = require 'bugabinga.nugu'local win32 = wez.target_triple:find 'windows'local key_binds = require 'bugabinga.key_binds'local auto_dark_mode = require 'bugabinga.auto_dark_mode'local workspaces = require 'bugabinga.workspaces'require 'bugabinga.status'local zen_mode = require 'bugabinga.neovim_zen_mode'zen_mode(wez)local random_nerd_font = function() local font_names = {} local nerdfonts = io.open(wez.config_dir .. '/nerdfonts', 'r') if nerdfonts then for font_name in nerdfonts:lines() do if not font_name:match '^#.*' then table.insert(font_names, font_name) end end local random_font = font_names[math.random(#font_names)] font = wez.font(random_font) endendlocal hostname = wez.hostname()local enable_wayland = falselocal default_prog = { 'nu', '--login' }local window_decorations = 'TITLE|RESIZE'local font_size = 16.0local font = wez.font 'Cousine'if hostname == 'x230' then font = random_nerd_font(); enable_wayland = trueelseif hostname == 'NB-00718' then default_prog = { 'powershell' , '-NoLogo'}elseif hostname == 'fedora' then font = random_nerd_font(); enable_wayland = trueend-- Equivalent to POSIX basename(3)-- Given "/foo/bar" returns "bar"-- Given "c:\\foo\\bar" returns "bar"local function basename(s) return string.gsub(s, '(.*[/\\])(.*)', '%2')endlocal exec_domains = { -- Defines a domain called "systemd" that will run the requested -- command inside its own individual systemd scope. -- This defines a strong boundary for resource control and can -- help to avoid OOMs in one pane causing other panes to be -- killed. wez.exec_domain('systemd', function(cmd) -- The "cmd" parameter is a SpawnCommand object. -- You can log it to see what's inside: wez.log_info(cmd) -- Synthesize a human understandable scope name that is -- (reasonably) unique. WEZTERM_PANE is the pane id that -- will be used for the newly spawned pane. -- WEZTERM_UNIX_SOCKET is associated with the wezterm -- process id. local env = cmd.set_environment_variables local ident = 'wezterm-pane-' .. env.WEZTERM_PANE .. '-on-' .. basename(env.WEZTERM_UNIX_SOCKET) -- Generate a new argument array that will launch a -- program via systemd-run local wrapped = { '/usr/bin/systemd-run', '--user', '--scope', '--description=Shell started by wezterm', '--same-dir', '--collect', '--unit=' .. ident, } -- Append the requested command -- Note that cmd.args may be nil; that indicates that the -- default program should be used. Here we're using the -- shell defined by the SHELL environment variable. for _, arg in ipairs(cmd.args or { os.getenv 'SHELL' }) do table.insert(wrapped, arg) end -- replace the requested argument array with our new one cmd.args = wrapped -- and return the SpawnCommand that we want to execute return cmd end),}return { -- logs key presses -- debug_key_events = true, default_cwd = wez.home_dir, default_prog = default_prog, default_cursor_style = 'SteadyBlock', -- this effectivly maximizes wezterm initial_rows = 200, initial_cols = 200, exec_domains = exec_domains, -- unix_domains = { { name = 'mux' } }, -- default_gui_startup_args = { 'connect', 'mux' }, -- testing, if there is a feelable diff front_end = 'WebGpu', -- refresh rate of my displays. TODO: move this to host config max_fps = 144, font = font, font_size = font_size, -- freetype_load_target = 'Light', -- freetype_render_target = 'HorizontalLcd', -- underline_position = "-2pt", warn_about_missing_glyphs = false, color_scheme = auto_dark_mode, color_schemes = nugu, cursor_blink_rate = 0, -- https://github.com/wez/wezterm/issues/2635 -- force_reverse_video_cursor = true, -- cursor_thickness = '1cell', window_decorations = window_decorations, enable_wayland = enable_wayland, enable_tab_bar = true, -- if this is hidden, we cannot see the right status area hide_tab_bar_if_only_one_tab = false, use_fancy_tab_bar = false, check_for_updates = false, audible_bell = 'Disabled', visual_bell = { fade_in_duration_ms = 69, fade_out_duration_ms = 69, target = 'CursorColor', }, inactive_pane_hsb = { saturation = 0.42, brightness = 0.69, }, tab_max_width = 42, window_padding = { left = 2, right = 2, top = 2, bottom = 0, }, disable_default_key_bindings = true, leader = key_binds.leader, keys = key_binds.keys, key_tables = key_binds.key_tables,}require 'bugabinga.options' ( cfg )require 'bugabinga.window' ( cfg )require 'bugabinga.fonts' ( cfg )require 'bugabinga.startup' ( cfg )require 'bugabinga.status' ( cfg )require 'bugabinga.theme' ( cfg )require 'bugabinga.key_binds' ( cfg )require 'bugabinga.hosts' ( cfg )require 'bugabinga.launch' ( cfg )require 'bugabinga.neovim_zen_mode'