repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

wezterm: fresh new bg and cleanup of config

471ca444c324eb54d618e3ac365435e705521703

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (28)

+707 / −545 text lines

Diff layout

fedora.symlinks

Modified

+5 / −0 text lines

8282unison/unison@.service
8383~/.config/systemd/user/unison@.service
85pueue
86~/.config/pueue
88pueue/pueued.service
89~/.config/systemd/user/pueued.service

neovim/README.md

Modified

+1 / −0 text lines

3939# todo
41* make assignment to map.x fail, e.g. `map.normal = {}`...
4142* figure out desirable cmp key maps
4243* try loading lsp async for better startup perf
4344* navic highlights do not fit winbar

neovim/lazy-lock.json

Modified

+5 / −4 text lines

3030 "nvim-genghis": { "branch": "main", "commit": "ca258b1e466d131e17eacf0c632abe932bce20ab" },
3131 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
3232 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
33 "nvim-lint": { "branch": "master", "commit": "ba0ab2f813e77d015da1a1c9920328fd2bf295f2" },
33 "nvim-lint": { "branch": "master", "commit": "c823e2d0621b5c15aa6b46be4d69b1379bcb8fa6" },
3434 "nvim-navbuddy": { "branch": "master", "commit": "f22bac988f2dd073601d75ba39ea5636ab6e38cb" },
3535 "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
3636 "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
3737 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
38 "nvim-treesitter": { "branch": "master", "commit": "1fbc25fc111cf5c7e73819657c8968dc5fa302ad" },
39 "nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" },
38 "nvim-treesitter": { "branch": "master", "commit": "929ca9c76ee20bb27cffbde4ee90583b6c54d616" },
39 "nvim-treesitter-context": { "branch": "master", "commit": "3d5390c49e3f8fe457b376df2a49aa39d75b7911" },
4040 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
4141 "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" },
4242 "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
4343 "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" },
44 "nvim-web-devicons": { "branch": "master", "commit": "31bd21ac46b2b6039aa0b856ca02b018cf549ef7" },
44 "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" },
4545 "nvim-window": { "branch": "main", "commit": "81f29840ac3aaeea6fc2153edfabebd00d692476" },
4646 "oil.nvim": { "branch": "master", "commit": "1360be5fda9c67338331abfcd80de2afbb395bcd" },
4747 "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
5656 "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
5757 "text-case.nvim": { "branch": "main", "commit": "e898cfd46fa6cde0e83abb624a16e67d2ffc6457" },
5858 "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
59 "transparent.nvim": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" },
5960 "tree-sitter-nu": { "branch": "main", "commit": "983618e8635db65daf898460a59065a70f64145e" },
6061 "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
6162 "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },

neovim/lua/bugabinga/options/keymaps.lua

Modified

+22 / −1 text lines

3838 end,
41map.normal {
42 description = 'Yanks the selected text (in normal mode or visual mode) to the system clipboard.',
43 category = 'editing',
44 keys = '<leader>y',
45 command = '"+y',
46}
48map.normal {
49 description = 'Pastes from the system clipboard (in normal mode or visual mode).',
50 category = 'editing',
51 keys = '<leader>p',
52 command = '"+p',
53}
55map.normal {
56 description = 'Yanks the entire line (when used in normal mode with motion).',
57 category = 'editing',
58 keys = '<leader>Y',
59 command = '"+Y',
60}
4162-- disable command history keymap, because i fatfinger it too often
4263map {
4364 keys = 'q:',
133154 else
134155 vim.opt.background = 'dark'
135156 end
136---@diagnostic disable-next-line: undefined-field
157 ---@diagnostic disable-next-line: undefined-field
137158 vim.notify( 'Toggled background to ' .. vim.opt.background:get() .. '.' )
138159 end,

neovim/lua/bugabinga/plugins/transparent.lua

Added
new file mode 100644

+14 / −0 text lines

1local map = require 'std.map'
2
3map.normal {
4 description = 'Toggle background transparency.',
5 category = 'ui',
6 keys = '<leader>tb',
7 command = '<cmd>TransparentToggle<cr>',
8}
9
10return {
11 'xiyaowong/transparent.nvim',
12 cmd = { 'TransparentEnable', 'TransparentDisable', 'TransparentToggle', },
13 config = true,
14}

neovim/lua/bugabinga/plugins/whichkey.lua

Modified

+0 / −1 text lines

4848 g = { name = '|g|enerate', _ = 'which_key_ignore', },
4949 d = { name = '|d|ebug', _ = 'which_key_ignore', },
5050 v = { name = '|v|ersion control', _ = 'which_key_ignore', },
51 s = { name = '|s|essions', _ = 'which_key_ignore', },
5251 r = { name = '|r|efactor', _ = 'which_key_ignore', },
5352 t = { name = '|t|oggle', _ = 'which_key_ignore', },
5453 w = { name = 's|w|ap', _ = 'which_key_ignore', },

nushell/config.nu

Modified

+2 / −0 text lines

2525 isolation: true
2626 }
29use '/home/oli/.config/broot/launcher/nushell/br' *

pueue/pueued.service

Modified

+1 / −1 text lines

44[Service]
55Restart=no
6ExecStart=/home/okr/.cargo/bin/pueued -vvv
6ExecStart=%h/.cargo/bin/pueued -vvv
88[Install]
99WantedBy=default.target

wezterm/.editorconfig

Added
new file mode 100644

+150 / −0 text lines

1root = true
2
3[*]
4spell = false
5
6[*.lua]
7number = true
8relativenumber = true
9diagnostic = true
11# see https://github.com/CppCXY/EmmyLuaCodeStyle
12# optional space/tab
13indent_style = space
14# if indent_style is space, this is valid
15indent_size = 2
16# if indent_style is tab, this is valid
17tab_width = 2
18# none/single/double
19quote_style = single
21continuation_indent = 2
23# this mean utf8 length , if this is 'unset' then the line width is no longer checked
24# this option decides when to chopdown the code
25max_line_length = 120
27# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
28# in neovim the value 'auto' is not a valid option, please use 'unset'
29end_of_line = lf
31# none/ comma / semicolon / only_kv_colon
32table_separator_style = comma
34#optional keep/never/always/smart
35trailing_table_separator = always
37# keep/remove/remove_table_only/remove_string_only
38call_arg_parentheses = remove
40detect_end_of_line = false
42# this will check text end with new line
43insert_final_newline = true
45# [space]
46space_around_table_field_list = true
48space_before_attribute = true
50space_before_function_open_parenthesis = false
52space_before_function_call_open_parenthesis = false
54space_before_closure_open_parenthesis = true
56# optional always/only_string/only_table/none
57# or true/false
58space_before_function_call_single_arg = always
60space_before_open_square_bracket = false
62space_inside_function_call_parentheses = true
64space_inside_function_param_list_parentheses = true
66space_inside_square_brackets = false
68# like t[#t+1] = 1
69space_around_table_append_operator = false
71ignore_spaces_inside_function_call = false
73space_before_inline_comment = 1
75# [operator space]
76space_around_math_operator = true
78space_after_comma = true
80space_after_comma_in_for_statement = true
82space_around_concat_operator = true
84# [align]
86align_call_args = true
88align_function_params = true
90align_continuous_assign_statement = true
92align_continuous_rect_table_field = true
94align_continuous_line_space = 2
96align_if_branch = true
98# option none / always / contain_curly/
99align_array_table = true
101align_continuous_similar_call_args = true
103align_continuous_inline_comment = true
104# option none / always / only_call_stmt
105align_chain_expr = none
107# [indent]
109never_indent_before_if_condition = false
111never_indent_comment_on_if_branch = false
113# [line space]
115# The following configuration supports four expressions
116# keep
117# fixed(n)
118# min(n)
119# max(n)
120# for eg. min(2)
122line_space_after_if_statement = keep
124line_space_after_do_statement = keep
126line_space_after_while_statement = keep
128line_space_after_repeat_statement = keep
130line_space_after_for_statement = keep
132line_space_after_local_or_assign_statement = keep
134line_space_after_function_statement = fixed(2)
136line_space_after_expression_statement = keep
138line_space_after_comment = keep
140# [line break]
141break_all_list_when_line_exceed = false
143auto_collapse_lines = false
145break_before_braces = false
146# [preference]
147ignore_space_after_colon = false
149remove_call_expression_list_finish_comma = false

wezterm/bugabinga/auto_dark_mode.lua

Deleted
deleted file mode 100644

+0 / −31 text lines

1local wez = require 'wezterm'
2
3-- wezterm.gui is not available to the mux server, so take care to
4-- do something reasonable when this config is evaluated by the mux
5local get_appearance = function()
6 if wez.gui then
7 return wez.gui.get_appearance()
8 end
9 return 'Dark'
10end
12local scheme_for_appearance = function(appearance)
13 if appearance:find('Dark',1, true) then
14 return 'nugu-dark'
15 else
16 return 'nugu-light'
17 end
18end
20-- TODO: what is that good for?
21-- wez.on('window-config-reloaded', function(window)
22-- local overrides = window:get_config_overrides() or {}
23-- local appearance = window:get_appearance()
24-- local scheme = scheme_for_appearance(appearance)
25-- if overrides.color_scheme ~= scheme then
26-- overrides.color_scheme = scheme
27-- window:set_config_overrides(overrides)
28-- end
29-- end)
31return scheme_for_appearance(get_appearance())

wezterm/bugabinga/fonts.lua

Added
new file mode 100644

+9 / −0 text lines

1local wez = require 'wezterm'
2
3return function ( cfg )
4 local font_size = 16.0
5 local font = wez.font 'Cousine'
6 cfg.font = font
7 cfg.font_size = font_size
8 cfg.warn_about_missing_glyphs = false
9end

wezterm/bugabinga/hosts/NB-00718.lua

Added
new file mode 100644

+8 / −0 text lines

1return function ( cfg )
2 cfg.default_domain = { 'WSL:Fedora', }
3 cfg.default_mux_server_domain = { 'WSL:Fedora', }
4 cfg.default_prog = { 'powershell', '-NoLogo', }
5
6 cfg.window_background_opacity = 0
7 cfg.win32_system_backdrop = 'Tabbed'
8end

wezterm/bugabinga/hosts/fedora.lua

Added
new file mode 100644

+38 / −0 text lines

1local nerd_font = require 'bugabinga.nerd_font'
2
3return function ( cfg )
4 cfg.font = nerd_font.random();
5
6 cfg.background = {
7 {
8 source = {
9 File = '/home/oli/Pictures/Bilder/2012/05/20/Waldshooting_vonni_tini_2012 (12).jpg',
10 },
11 hsb = {
12 hue = 1.0,
13 saturation = 0.0,
14 brightness = 0.004,
15 },
16 attachment = { Parallax = 0.006, },
17 vertical_align = 'Middle',
18 horizontal_align = 'Center',
19 },
20 {
21 source = {
22 Gradient = {
23 colors = { 'purple', '#131313', },
24 orientation = {
25 Radial = {
26 cx = 0.5,
27 cy = 0.5,
28 radius = 1.25,
29 },
30 },
31 },
32 },
33 opacity = 0.1,
34 width = '100%',
35 height = '100%',
36 },
37 }
38end

wezterm/bugabinga/hosts/init.lua

Added
new file mode 100644

+12 / −0 text lines

1local wez = require 'wezterm'
2
3return function ( cfg )
4 local hostname = wez.hostname()
5 local ok, host = pcall( require, 'bugabinga.hosts.' .. hostname )
6 if ok then
7 host( cfg )
8 else
9 local msg = 'unknown host ' .. hostname .. '. forgot to create new file in /bugabinga/hosts?'
10 wez.log_warn( msg )
11 end
12end

wezterm/bugabinga/hosts/x230.lua

Added
new file mode 100644

+5 / −0 text lines

1local nerd_font = require 'bugabinga.nerd_font'
2
3return function(cfg)
4 cfg.font = nerd_font.random();
5end

wezterm/bugabinga/key_binds.lua

Modified

+176 / −170 text lines

11local wez = require 'wezterm'
2local leader = { key = 'VoidSymbol' }
2
3local leader = { key = 'VoidSymbol', }
34if wez.target_triple:find 'windows' then
4 leader = { key = 'raw:255' }
5 leader = { key = 'raw:255', }
56end
67local font_size_mode = ' Change Font Size (=-+)'
78local pane_mode = ' Pane (hjklqr)'
1011local navigate_backward_mode = ' Navigate backward (bw)'
1213local key_tables = {
13 [resize_pane_mode] = {
14 { key = 'h', action = wez.action.AdjustPaneSize { 'Left', 1 } },
15 { key = 'j', action = wez.action.AdjustPaneSize { 'Down', 1 } },
16 { key = 'k', action = wez.action.AdjustPaneSize { 'Up', 1 } },
17 { key = 'l', action = wez.action.AdjustPaneSize { 'Right', 1 } },
14 [resize_pane_mode] = {
15 { key = 'h', action = wez.action.AdjustPaneSize { 'Left', 1, }, },
16 { key = 'j', action = wez.action.AdjustPaneSize { 'Down', 1, }, },
17 { key = 'k', action = wez.action.AdjustPaneSize { 'Up', 1, }, },
18 { key = 'l', action = wez.action.AdjustPaneSize { 'Right', 1, }, },
19 -- Cancel the mode
20 { key = 'Escape', action = 'PopKeyTable' },
21 },
22 [font_size_mode] = {
23 { key = 'j', action = wez.action.DecreaseFontSize },
24 { key = 'k', action = wez.action.IncreaseFontSize },
25 { key = '=', action = wez.action.ResetFontSize },
20 -- Cancel the mode
21 { key = 'Escape', action = 'PopKeyTable', },
22 },
23 [font_size_mode] = {
24 { key = 'j', action = wez.action.DecreaseFontSize, },
25 { key = 'k', action = wez.action.IncreaseFontSize, },
26 { key = '=', action = wez.action.ResetFontSize, },
27 { key = 'Escape', action = 'PopKeyTable' },
28 },
29 [pane_mode] = {
30 { key = 'h', action = wez.action.ActivatePaneDirection 'Left' },
31 { key = 'j', action = wez.action.ActivatePaneDirection 'Down' },
32 { key = 'k', action = wez.action.ActivatePaneDirection 'Up' },
33 { key = 'l', action = wez.action.ActivatePaneDirection 'Right' },
28 { key = 'Escape', action = 'PopKeyTable', },
29 },
30 [pane_mode] = {
31 { key = 'h', action = wez.action.ActivatePaneDirection 'Left', },
32 { key = 'j', action = wez.action.ActivatePaneDirection 'Down', },
33 { key = 'k', action = wez.action.ActivatePaneDirection 'Up', },
34 { key = 'l', action = wez.action.ActivatePaneDirection 'Right', },
35 { key = 'v', action = wez.action.SplitHorizontal { domain = 'CurrentPaneDomain' }, },
36 { key = 's', action = wez.action.SplitVertical { domain = 'CurrentPaneDomain' }, },
36 { key = 'v', action = wez.action.SplitHorizontal { domain = 'CurrentPaneDomain', }, },
37 { key = 's', action = wez.action.SplitVertical { domain = 'CurrentPaneDomain', }, },
38 { key = '=', action = wez.action.ActivateKeyTable { name = resize_pane_mode, one_shot = false } },
39 { key = '=', action = wez.action.ActivateKeyTable { name = resize_pane_mode, one_shot = false, }, },
40 { key = 'q', action = wez.action.CloseCurrentPane { confirm = false } },
41 { key = 'q', action = wez.action.CloseCurrentPane { confirm = false, }, },
42 { key = 'Escape', action = 'PopKeyTable' },
43 },
44 [navigate_forward_mode] = {
45 {
46 key = 'b', -- b as in buffer in vim
47 action = wez.action.ActivateTabRelative(1),
48 },
49 {
50 key = 'w', -- next workspace
51 action = wez.action.SwitchWorkspaceRelative(1),
52 },
53 },
54 [navigate_backward_mode] = {
55 {
56 key = 'b',
57 action = wez.action.ActivateTabRelative(-1),
58 },
59 {
60 key = 'w', -- prev workspace
61 action = wez.action.SwitchWorkspaceRelative(-1),
62 },
63 }
43 { key = 'Escape', action = 'PopKeyTable', },
44 },
45 [navigate_forward_mode] = {
46 {
47 key = 'b', -- b as in buffer in vim
48 action = wez.action.ActivateTabRelative( 1 ),
49 },
50 {
51 key = 'w', -- next workspace
52 action = wez.action.SwitchWorkspaceRelative( 1 ),
53 },
54 },
55 [navigate_backward_mode] = {
56 {
57 key = 'b',
58 action = wez.action.ActivateTabRelative( -1 ),
59 },
60 {
61 key = 'w', -- prev workspace
62 action = wez.action.SwitchWorkspaceRelative( -1 ),
63 },
64 },
6667local keys = {
67 {
68 key = ']',
69 mods = 'LEADER',
70 action = wez.action.ActivateKeyTable { name = navigate_forward_mode },
71 },
72 {
73 key = '[',
74 mods = 'LEADER',
75 action = wez.action.ActivateKeyTable { name = navigate_backward_mode },
76 },
77 {
78 key = '0',
79 mods = 'LEADER',
80 action = wez.action.ActivateKeyTable { name = font_size_mode, one_shot = false },
81 },
82 {
83 key = 'w',
84 mods = 'LEADER',
85 action = wez.action.ActivateKeyTable { name = pane_mode },
86 },
87 {
88 key = 'a',
89 mods = 'LEADER',
90 action = wez.action.PaneSelect,
91 },
92 {
93 key = 'f',
94 mods = 'LEADER',
95 action = wez.action.TogglePaneZoomState,
96 },
97 {
98 key = 'F5',
99 mods = 'LEADER',
100 action = wez.action.ReloadConfiguration,
101 },
102 {
103 key = 'F11',
104 mods = 'LEADER',
105 action = wez.action.ToggleFullScreen,
106 },
107 {
108 key = 'F12',
109 mods = 'LEADER',
110 action = wez.action.ShowDebugOverlay,
111 },
112 {
113 key = 'u',
114 mods = 'LEADER',
115 action = wez.action.CharSelect {
116 copy_on_select = true,
117 copy_to = 'ClipboardAndPrimarySelection'
118 },
119 },
120 {
121 key = 'c',
122 mods = 'CTRL|SHIFT',
123 action = wez.action.CopyTo 'Clipboard',
124 },
125 {
126 key = 'v',
127 mods = 'CTRL|SHIFT',
128 action = wez.action.PasteFrom 'Clipboard',
129 },
130 {
131 key = 't',
132 mods = 'LEADER',
133 action = wez.action.SpawnTab 'CurrentPaneDomain',
134 },
135 {
136 key = 'p',
137 mods = 'LEADER',
138 action = wez.action.ActivateCommandPalette,
139 },
140 {
141 key = 'c',
142 mods = 'LEADER',
143 action = wez.action.SwitchToWorkspace { name = 'code' },
144 },
145 {
146 key = 'k',
147 mods = 'LEADER',
148 action = wez.action.SwitchToWorkspace { name = 'dorkfiles editing' },
149 },
150 {
151 key = 'd',
152 mods = 'LEADER',
153 action = wez.action.SwitchToWorkspace { name = 'default' },
154 },
155 {
156 key = 'r',
157 mods = 'LEADER',
158 action = wez.action.ShowLauncherArgs {
159 flags = 'FUZZY|WORKSPACES',
160 },
161 },
162 {
163 key = '/',
164 mods = 'LEADER',
165 action = wez.action.Search 'CurrentSelectionOrEmptyString',
166 },
167 {
168 key = 'Enter',
169 mods = 'LEADER',
170 action = wez.action.QuickSelect,
171 },
172 {
173 key = 'q',
174 mods = 'LEADER',
175 action = wez.action.QuitApplication,
176 },
68 {
69 key = ']',
70 mods = 'LEADER',
71 action = wez.action.ActivateKeyTable { name = navigate_forward_mode, },
72 },
73 {
74 key = '[',
75 mods = 'LEADER',
76 action = wez.action.ActivateKeyTable { name = navigate_backward_mode, },
77 },
78 {
79 key = '0',
80 mods = 'LEADER',
81 action = wez.action.ActivateKeyTable { name = font_size_mode, one_shot = false, },
82 },
83 {
84 key = 'w',
85 mods = 'LEADER',
86 action = wez.action.ActivateKeyTable { name = pane_mode, },
87 },
88 {
89 key = 'a',
90 mods = 'LEADER',
91 action = wez.action.PaneSelect,
92 },
93 {
94 key = 'f',
95 mods = 'LEADER',
96 action = wez.action.TogglePaneZoomState,
97 },
98 {
99 key = 'F5',
100 mods = 'LEADER',
101 action = wez.action.ReloadConfiguration,
102 },
103 {
104 key = 'F11',
105 mods = 'LEADER',
106 action = wez.action.ToggleFullScreen,
107 },
108 {
109 key = 'F12',
110 mods = 'LEADER',
111 action = wez.action.ShowDebugOverlay,
112 },
113 {
114 key = 'u',
115 mods = 'LEADER',
116 action = wez.action.CharSelect {
117 copy_on_select = true,
118 copy_to = 'ClipboardAndPrimarySelection',
119 },
120 },
121 {
122 key = 'c',
123 mods = 'CTRL|SHIFT',
124 action = wez.action.CopyTo 'Clipboard',
125 },
126 {
127 key = 'v',
128 mods = 'CTRL|SHIFT',
129 action = wez.action.PasteFrom 'Clipboard',
130 },
131 {
132 key = 't',
133 mods = 'LEADER',
134 action = wez.action.SpawnTab 'CurrentPaneDomain',
135 },
136 {
137 key = 'p',
138 mods = 'LEADER',
139 action = wez.action.ActivateCommandPalette,
140 },
141 {
142 key = 'c',
143 mods = 'LEADER',
144 action = wez.action.SwitchToWorkspace { name = 'code', },
145 },
146 {
147 key = 'k',
148 mods = 'LEADER',
149 action = wez.action.SwitchToWorkspace { name = 'dorkfiles editing', },
150 },
151 {
152 key = 'd',
153 mods = 'LEADER',
154 action = wez.action.SwitchToWorkspace { name = 'default', },
155 },
156 {
157 key = 'r',
158 mods = 'LEADER',
159 action = wez.action.ShowLauncherArgs {
160 flags = 'FUZZY|WORKSPACES',
161 },
162 },
163 {
164 key = 'd',
165 mods = 'LEADER',
166 action = wez.action.ShowLauncherArgs {
167 flags = 'FUZZY|LAUNCH_MENU_ITEMS',
168 },
169 }, {
170 key = '/',
171 mods = 'LEADER',
172 action = wez.action.Search 'CurrentSelectionOrEmptyString',
173 },
174 {
175 key = 'Enter',
176 mods = 'LEADER',
177 action = wez.action.QuickSelect,
178 },
179 {
180 key = 'q',
181 mods = 'LEADER',
182 action = wez.action.QuitApplication,
183 },
178185-- Navigate Tabs by LEADER+n
179186for i = 1, 8 do
180 -- CTRL+ALT + number to activate that tab
181 table.insert(keys, {
182 key = tostring(i),
183 mods = 'LEADER',
184 action = wez.action.ActivateTab(i - 1),
185 })
187 -- CTRL+ALT + number to activate that tab
188 table.insert( keys, {
189 key = tostring( i ),
190 mods = 'LEADER',
191 action = wez.action.ActivateTab( i - 1 ),
192 } )
186193end
190return {
191 leader = leader,
192 keys = keys,
193 key_tables = key_tables,
194}
195return function ( cfg )
196 cfg.disable_default_key_bindings = true
197 cfg.leader = leader
198 cfg.keys = keys
199 cfg.key_tables = key_tables
200end

wezterm/bugabinga/launch.lua

Added
new file mode 100644

+40 / −0 text lines

1local wez = require 'wezterm'
2
3return function ( cfg )
4 cfg.launch_menu = {
5 {
6 label = 'E-Mail',
7 args = { 'aerc', },
8 cwd = wez.home_dir,
9 },
10 {
11 label = 'Bottom',
12 args = { 'btm', },
13 cwd = wez.home_dir,
14 },
15 {
16 label = 'Clock',
17 args = { 'tclock', },
18 cwd = wez.home_dir,
19 },
20 {
21 label = 'Netscanner',
22 args = { 'sudo', wez.home_dir .. '/.cargo/bin/netscanner', },
23 cwd = wez.home_dir,
24 },
25 {
26 label = 'Calc',
27 args = { 'eva', },
28 cwd = wez.home_dir,
29 },
30 {
31 label = 'Units',
32 args = { 'fend', },
33 cwd = wez.home_dir,
34 },
35 {
36 label = 'Files',
37 args = { 'yazi', },
38 cwd = wez.home_dir,
39 }, }
40end

wezterm/bugabinga/neovim_zen_mode.lua

Modified

+24 / −25 text lines

1return function( wez )
2 wez.on('user-var-changed', function(window, pane, name, value)
3 print "zen"
4 local overrides = window:get_config_overrides() or {}
5 if name == "ZEN_MODE" then
6 local incremental = value:find("+")
7 local number_value = tonumber(value)
8 if incremental ~= nil then
9 while (number_value > 0) do
10 window:perform_action(wez.action.IncreaseFontSize, pane)
11 number_value = number_value - 1
12 end
13 overrides.enable_tab_bar = false
14 elseif number_value < 0 then
15 window:perform_action(wez.action.ResetFontSize, pane)
16 overrides.font_size = nil
17 overrides.enable_tab_bar = true
18 else
19 overrides.font_size = number_value
20 overrides.enable_tab_bar = false
21 end
22 end
23 window:set_config_overrides(overrides)
24 end)
25end
1local wez = require 'wezterm'
2
3wez.on( 'user-var-changed', function ( window, pane, name, value )
4 local overrides = window:get_config_overrides() or {}
5 if name == 'ZEN_MODE' then
6 local incremental = value:find '+'
7 local number_value = tonumber( value )
8 if incremental ~= nil then
9 while number_value > 0 do
10 window:perform_action( wez.action.IncreaseFontSize, pane )
11 number_value = number_value - 1
12 end
13 overrides.enable_tab_bar = false
14 elseif number_value < 0 then
15 window:perform_action( wez.action.ResetFontSize, pane )
16 overrides.font_size = nil
17 overrides.enable_tab_bar = true
18 else
19 overrides.font_size = number_value
20 overrides.enable_tab_bar = false
21 end
22 end
23 window:set_config_overrides( overrides )
24end )

wezterm/bugabinga/nerd_font.lua

Added
new file mode 100644

+18 / −0 text lines

1local wez = require 'wezterm'
2
3return {
4 random = function ()
5 local font_names = {}
6 local nerdfonts = io.open( wez.config_dir .. '/bugabinga/nerdfonts', 'r' )
7 if nerdfonts then
8 for font_name in nerdfonts:lines() do
9 if not font_name:match '^#.*' then
10 table.insert( font_names, font_name )
11 end
12 end
13 local random_font = font_names[math.random( #font_names )]
14 return wez.font( random_font )
15 end
16 return wez.font 'JetBrains Mono'
17 end,
18}

wezterm/bugabinga/nerdfonts

Added
new file mode 100644

+39 / −0 text lines

1Bitstream Vera Sans Mono
2# Terminus
3Anonymous Pro
4Aurulent Sans Mono
5# BigBlueTerminalPlus
6Cascadia Code
7Cousine
8D2Coding
9DejaVu Sans Mono
10Droid Sans Mono
11Envy Code R
12Fantasque Sans Mono
13# FiraCode
14GeistMono
15Hack
16Hasklig
17Hermit
18# IBM 3270
19IBM Plex Mono
20# Inconsolata
21Intel One Mono
22JetBrainsMono
23Lekton
24# Liberation Mono
25Lilex
26MartianMono
27Monaspace Argon Var
28Monaspace Krypton Var
29Monaspace Neon Var
30Monofur
31Monoid
32Mononoki
33Rec Mono Casual
34Rec Mono Linear
35RobotoMono
36Share Tech Mono
37Source Code Pro
38VictorMono
39iA Writer Mono V

wezterm/bugabinga/options.lua

Added
new file mode 100644

+22 / −0 text lines

1local wez = require 'wezterm'
2
3return function(cfg)
4 cfg.default_cwd = wez.home_dir
5 cfg.inactive_pane_hsb = {
6 saturation = 0.42,
7 brightness = 0.69,
8 }
9 cfg.default_cursor_style = 'SteadyBlock'
10 cfg.check_for_updates = false
11 cfg.audible_bell = 'Disabled'
12 cfg.visual_bell = {
13 fade_in_duration_ms = 69,
14 fade_out_duration_ms = 69,
15 target = 'CursorColor',
16 }
17 cfg.cursor_blink_rate = 0
18 cfg.front_end = 'WebGpu'
19 cfg.max_fps = 144
20 cfg.unzoom_on_switch_pane = true
21 cfg.scrollback_lines = 16777216
22end

wezterm/bugabinga/startup.lua

Added
new file mode 100644

+3 / −0 text lines

1return function ( cfg )
2 cfg.default_prog = { 'nu', '--login', }
3end

wezterm/bugabinga/status.lua

Modified

+62 / −41 text lines

33local DELIMITER = ' · '
5local zoomed = function(pane)
6 local tab = pane:tab()
7 local any_is_zoomed = false
8 if tab then
9 for _, info in ipairs(tab:panes_with_info()) do
10 if info.is_zoomed then
11 any_is_zoomed = true
12 end
13 end
14 end
15 return any_is_zoomed and '🔎 Zoomed Pane' or nil
5local zoomed = function ( pane )
6 local tab = pane:tab()
7 local any_is_zoomed = false
8 if tab then
9 for _, info in ipairs( tab:panes_with_info() ) do
10 if info.is_zoomed then
11 any_is_zoomed = true
12 end
13 end
14 end
15 return any_is_zoomed and '🔎 Zoomed Pane' or nil
1616end
1818-- TODO: docs have crazy example of styling the status bar, check them out
2020-- Show which key table is active in the status area
21wez.on('update-status', function(window, pane)
22 local key_table = window:active_key_table()
23 local current_workspace = window:active_workspace()
24 local zoomed_state = zoomed(pane)
25 local leader = nil
26 if window:leader_is_active() then
27 leader = 'LEADER'
28 end
29 local fonts = {}
30 local config = window:effective_config()
31 local font_size = config.font_size
32 for _, font in pairs(config.font.font) do
33 table.insert(fonts, string.format('%s:%s', font.family, font_size))
34 end
35 local font = wez.format {
36 { Text = ' Font ' },
37 { Attribute = { Intensity = 'Bold' } },
38 { Text = table.concat(fonts, ', ') },
39 'ResetAttributes'
40 }
21wez.on( 'update-status', function ( window, pane )
22 local key_table = window:active_key_table()
23 local current_workspace = window:active_workspace()
24 local zoomed_state = zoomed( pane )
25 local leader = nil
26 if window:leader_is_active() then
27 leader = 'LEADER'
28 end
29 local fonts = {}
30 local config = window:effective_config()
31 local font_size = config.font_size
32 for _, font in pairs( config.font.font ) do
33 table.insert( fonts, string.format( '%s:%s', font.family, font_size ) )
34 end
35 local font = wez.format {
36 { Text = ' Font ', },
37 { Attribute = { Intensity = 'Bold', }, },
38 { Text = table.concat( fonts, ', ' ), },
39 'ResetAttributes',
40 }
42 local status = { ' ' }
43 if leader then table.insert(status, leader) end
44 if key_table then table.insert(status, key_table) end
45 if zoomed_state then table.insert(status, zoomed_state) end
46 if current_workspace then table.insert(status, current_workspace) end
47 if font then table.insert(status, font) end
42 local status = { '', }
43 if leader then
44 table.insert( status, leader )
45 end
46 if key_table then
47 table.insert( status, key_table )
48 end
49 if zoomed_state then
50 table.insert( status, zoomed_state )
51 end
52 if current_workspace then
53 table.insert( status, current_workspace )
54 end
55 if font then
56 table.insert( status, font )
57 end
49 window:set_right_status(table.concat(status, DELIMITER))
50 --TODO: shirley, something useful can be done here
51 window:set_left_status('  ')
52end)
59 window:set_right_status( table.concat( status, DELIMITER ) )
60 --TODO: shirley, something useful can be done here
61 window:set_left_status ' π '
62end )
64return function ( cfg )
65 cfg.enable_tab_bar = true
66 -- if this is hidden, we cannot see the right status are
67 cfg.hide_tab_bar_if_only_one_tab = false
68 cfg.use_fancy_tab_bar = false
69 cfg.tab_max_width = 42
70 cfg.tab_bar_at_bottom = true
72
73end

wezterm/bugabinga/theme.lua

Added
new file mode 100644

+24 / −0 text lines

1local wez = require 'wezterm'
2local nugu = require 'bugabinga.nugu'
3
4-- wezterm.gui is not available to the mux server, so take care to
5-- do something reasonable when this config is evaluated by the mux
6local get_appearance = function ()
7 if wez.gui then
8 return wez.gui.get_appearance()
9 end
10 return 'Dark'
11end
13local scheme_for_appearance = function ( appearance )
14 if appearance:find( 'Dark', 1, true ) then
15 return 'nugu-dark'
16 else
17 return 'nugu-light'
18 end
19end
21return function ( cfg )
22 cfg.color_scheme = scheme_for_appearance( get_appearance() )
23 cfg.color_schemes = nugu
24end

wezterm/bugabinga/window.lua

Added
new file mode 100644

+14 / −0 text lines

1return function ( cfg )
2 -- this effectivly maximizes wezterm
3 cfg.initial_rows = 200
4 cfg.initial_cols = 200
5
6 cfg.window_decorations = 'TITLE|RESIZE'
7 cfg.enable_wayland = true
8 cfg.window_padding = {
9 left = 2,
10 right = 2,
11 top = 2,
12 bottom = 0,
13 }
14end

wezterm/bugabinga/workspaces.lua

Deleted
deleted file mode 100644

+0 / −72 text lines

1local wez = require 'wezterm'
2local mux = wez.mux
3local win32 = wez.target_triple:find'windows'
4
5local get_my_code_workspace = function()
6 if win32 then
7 return wez.home_dir .. '/Workspaces'
8 else
9 return wez.home_dir .. '/Workspace'
10 end
11end
13local WORKSPACE = get_my_code_workspace()
15-- maximize all displayed windows
16local maximize_window = function()
17 local workspace = mux.get_active_workspace()
18 for _, window in ipairs(mux.all_windows()) do
19 if window:get_workspace() == workspace then
20 window:gui_window():maximize()
21 end
22 end
23end
25local setup_workspaces = function()
26 local dork_ws = 'dorkfiles editing'
27 local dork_cwd = WORKSPACE .. '/dotfiles'
28 local dork_tab, dork_pane, dork_window = mux.spawn_window { cwd = dork_cwd, workspace = dork_ws }
29 local dork_top_pane = dork_pane:split { cwd = dork_cwd, direction = 'Top', size = 0.69 }
30 dork_top_pane:split { cwd = dork_cwd, direction = 'Left', size = 0.42 }
31 dork_tab:set_title 'Dorkfiles Editing'
33 local wezterm_config_tab = dork_window:spawn_tab { cwd = dork_cwd .. '/wezterm' }
34 wezterm_config_tab:set_title 'Wezterm'
35 wezterm_config_tab:active_pane():split { cwd = dork_cwd .. '/wezterm', direction = 'Left', size = 0.69 }
37 local nvim_config_tab = dork_window:spawn_tab { cwd = dork_cwd .. '/neovim' }
38 nvim_config_tab:set_title 'Neovim'
39 nvim_config_tab:active_pane():split { cwd = dork_cwd .. '/neovim', direction = 'Left', size = 0.69 }
41 local code_ws = 'code'
42 local code_cwd = WORKSPACE
43 local code_tab, code_pane, code_window = mux.spawn_window { cwd = code_cwd, workspace = code_ws }
44 local code_top_pane = code_pane:split { cwd = code_cwd, direction = 'Top', size = 0.69 }
45 code_pane:split { cwd = code_cwd, direction = 'Right', size = 0.42 }
46 code_tab:set_title 'Code'
47 code_top_pane:activate()
49 local default_ws = 'default'
50 local default_cwd = wez.home_dir
51 local default_tab, default_pane, default_window = mux.spawn_window { cwd = default_cwd, workspace = default_ws }
52 local default_top_pane = default_pane:split { cwd = default_cwd, direction = 'Top', size = 0.69 }
53 default_pane:split { cwd = default_cwd, direction = 'Right', size = 0.42 }
54 default_top_pane:split { cwd = default_cwd, direction = 'Right', size = 0.42 }
55 default_tab:set_title 'Default'
56 default_top_pane:activate()
58 mux.set_active_workspace(default_ws)
59end
61wez.on('gui-attached', function()
62 -- setup_workspaces()
63 maximize_window()
64end)
66-- NOTE(oli): errors in here do not show up as configuration errors
67-- check the log file in the wezterm mux server runtime directory
68-- e.g. /run/user/1000/wezterm/log
69-- NOTE: mux seems buggy and slow. not sure why or how to really repro
70-- wez.on('mux-startup', function()
71-- setup_workspaces()
72-- end)

wezterm/nerdfonts

Deleted
deleted file mode 100644

+0 / −39 text lines

1Bitstream Vera Sans Mono
2# Terminus
3Anonymous Pro
4Aurulent Sans Mono
5# BigBlueTerminalPlus
6Cascadia Code
7Cousine
8D2Coding
9DejaVu Sans Mono
10Droid Sans Mono
11Envy Code R
12Fantasque Sans Mono
13# FiraCode
14GeistMono
15Hack
16Hasklig
17Hermit
18# IBM 3270
19IBM Plex Mono
20# Inconsolata
21Intel One Mono
22JetBrainsMono
23Lekton
24# Liberation Mono
25Lilex
26MartianMono
27Monaspace Argon Var
28Monaspace Krypton Var
29Monaspace Neon Var
30Monofur
31Monoid
32Mononoki
33Rec Mono Casual
34Rec Mono Linear
35RobotoMono
36Share Tech Mono
37Source Code Pro
38VictorMono
39iA Writer Mono V

wezterm/wezterm.lua

Modified

+13 / −160 text lines

11local wez = require 'wezterm'
22local cfg = wez.config_builder()
3local nugu = require 'bugabinga.nugu'
5local win32 = wez.target_triple:find 'windows'
6local key_binds = require 'bugabinga.key_binds'
7local auto_dark_mode = require 'bugabinga.auto_dark_mode'
8local workspaces = require 'bugabinga.workspaces'
9require 'bugabinga.status'
10local zen_mode = require 'bugabinga.neovim_zen_mode'
11zen_mode(wez)
13local random_nerd_font = function()
14 local font_names = {}
15 local nerdfonts = io.open(wez.config_dir .. '/nerdfonts', 'r')
16 if nerdfonts then
17 for font_name in nerdfonts:lines() do
18 if not font_name:match '^#.*' then
19 table.insert(font_names, font_name)
20 end
21 end
22 local random_font = font_names[math.random(#font_names)]
23 font = wez.font(random_font)
24 end
25end
27local hostname = wez.hostname()
28local enable_wayland = false
29local default_prog = { 'nu', '--login' }
30local window_decorations = 'TITLE|RESIZE'
31local font_size = 16.0
32local font = wez.font 'Cousine'
33if hostname == 'x230' then
34 font = random_nerd_font();
35 enable_wayland = true
36elseif hostname == 'NB-00718' then
37 default_prog = { 'powershell' , '-NoLogo'}
38elseif hostname == 'fedora' then
39 font = random_nerd_font();
40 enable_wayland = true
41end
43-- Equivalent to POSIX basename(3)
44-- Given "/foo/bar" returns "bar"
45-- Given "c:\\foo\\bar" returns "bar"
46local function basename(s)
47 return string.gsub(s, '(.*[/\\])(.*)', '%2')
48end
50local exec_domains = {
51 -- Defines a domain called "systemd" that will run the requested
52 -- command inside its own individual systemd scope.
53 -- This defines a strong boundary for resource control and can
54 -- help to avoid OOMs in one pane causing other panes to be
55 -- killed.
56 wez.exec_domain('systemd', function(cmd)
57 -- The "cmd" parameter is a SpawnCommand object.
58 -- You can log it to see what's inside:
59 wez.log_info(cmd)
61 -- Synthesize a human understandable scope name that is
62 -- (reasonably) unique. WEZTERM_PANE is the pane id that
63 -- will be used for the newly spawned pane.
64 -- WEZTERM_UNIX_SOCKET is associated with the wezterm
65 -- process id.
66 local env = cmd.set_environment_variables
67 local ident = 'wezterm-pane-'
68 .. env.WEZTERM_PANE
69 .. '-on-'
70 .. basename(env.WEZTERM_UNIX_SOCKET)
72 -- Generate a new argument array that will launch a
73 -- program via systemd-run
74 local wrapped = {
75 '/usr/bin/systemd-run',
76 '--user',
77 '--scope',
78 '--description=Shell started by wezterm',
79 '--same-dir',
80 '--collect',
81 '--unit=' .. ident,
82 }
84 -- Append the requested command
85 -- Note that cmd.args may be nil; that indicates that the
86 -- default program should be used. Here we're using the
87 -- shell defined by the SHELL environment variable.
88 for _, arg in ipairs(cmd.args or { os.getenv 'SHELL' }) do
89 table.insert(wrapped, arg)
90 end
92 -- replace the requested argument array with our new one
93 cmd.args = wrapped
95 -- and return the SpawnCommand that we want to execute
96 return cmd
97 end),
98}
100return {
101 -- logs key presses
102 -- debug_key_events = true,
104 default_cwd = wez.home_dir,
105 default_prog = default_prog,
106 default_cursor_style = 'SteadyBlock',
108 -- this effectivly maximizes wezterm
109 initial_rows = 200,
110 initial_cols = 200,
112 exec_domains = exec_domains,
113 -- unix_domains = { { name = 'mux' } },
114 -- default_gui_startup_args = { 'connect', 'mux' },
116 -- testing, if there is a feelable diff
117 front_end = 'WebGpu',
118 -- refresh rate of my displays. TODO: move this to host config
119 max_fps = 144,
121 font = font,
122 font_size = font_size,
123 -- freetype_load_target = 'Light',
124 -- freetype_render_target = 'HorizontalLcd',
125 -- underline_position = "-2pt",
126 warn_about_missing_glyphs = false,
128 color_scheme = auto_dark_mode,
129 color_schemes = nugu,
130 cursor_blink_rate = 0,
131 -- https://github.com/wez/wezterm/issues/2635
132 -- force_reverse_video_cursor = true,
133 -- cursor_thickness = '1cell',
134 window_decorations = window_decorations,
135 enable_wayland = enable_wayland,
136 enable_tab_bar = true,
137 -- if this is hidden, we cannot see the right status area
138 hide_tab_bar_if_only_one_tab = false,
139 use_fancy_tab_bar = false,
140 check_for_updates = false,
141 audible_bell = 'Disabled',
142 visual_bell = {
143 fade_in_duration_ms = 69,
144 fade_out_duration_ms = 69,
145 target = 'CursorColor',
146 },
147 inactive_pane_hsb = {
148 saturation = 0.42,
149 brightness = 0.69,
150 },
151 tab_max_width = 42,
152 window_padding = {
153 left = 2,
154 right = 2,
155 top = 2,
156 bottom = 0,
157 },
159 disable_default_key_bindings = true,
160 leader = key_binds.leader,
161 keys = key_binds.keys,
162 key_tables = key_binds.key_tables,
163}
4require 'bugabinga.options' ( cfg )
5require 'bugabinga.window' ( cfg )
6require 'bugabinga.fonts' ( cfg )
7require 'bugabinga.startup' ( cfg )
8require 'bugabinga.status' ( cfg )
9require 'bugabinga.theme' ( cfg )
10require 'bugabinga.key_binds' ( cfg )
11require 'bugabinga.hosts' ( cfg )
12require 'bugabinga.launch' ( cfg )
13require 'bugabinga.neovim_zen_mode'
15-- logs key presses
16-- cfg.debug_key_events = true,
17return cfg