repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk

0bacce5c4200feecaf509c4655c7ce39c0bf4473

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (33)

+1009 / −419 text lines · all files grouped into 32 bars · 1 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately

Diff layout

fedora.symlinks

Modified

+3 / −0 text lines

4646wezterm
4747~/.config/wezterm
49wezterm/wezterm.service
50~/.config/systemd/user/wezterm.service
4952ssh/config
5053~/.ssh/config

neovim/README.md

Modified

+1 / −0 text lines

4141* indent line bg overwrites visual selection bg
4242* fix bg highlight of treesitter-context
43* stabilize plugins that are only dependencies. move to own file?
4344* fix markdown rendering in doc popup
4445* make highlights more visible when expanding snippets
4546* kill mason again and get lsps via packages.nu

neovim/lazy-lock.json

Modified

+25 / −3 text lines

11{
22 "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
3 "CopilotChat.nvim": { "branch": "canary", "commit": "9333944fde3c65868818e245c73aa29eef826e9b" },
34 "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
45 "better-escape.nvim": { "branch": "master", "commit": "f45b52f8f87792e8659526f23261ffe278a54be5" },
6 "cmd-parser.nvim": { "branch": "master", "commit": "6363b8bddef968c3ec51a38172af44f675f01ef3" },
57 "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
8 "cmp-dotenv": { "branch": "main", "commit": "4dd53aab60982f1f75848aec5e6214986263325e" },
69 "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
710 "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
811 "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
912 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
1013 "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
11 "colorizer.nvim": { "branch": "master", "commit": "c1602ff3f11566bb7f16f90985b0c59d3d7db0ef" },
1214 "conform.nvim": { "branch": "master", "commit": "50649648851cd0e126dfedd0f3c33b900a6f1ef8" },
15 "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
16 "copilot.lua": { "branch": "master", "commit": "1a237cf50372830a61d92b0adf00d3b23882e0e1" },
1317 "decisive.nvim": { "branch": "main", "commit": "a7251adebccbc9c899cff39a524b20d06e2b78b5" },
1418 "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
1519 "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
20 "eagle.nvim": { "branch": "main", "commit": "f590404f510be11ef2cf7c68e135441bfa48c9a8" },
1621 "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" },
1722 "heirline.nvim": { "branch": "master", "commit": "7a79753c1a42c3f52e89a6c42429e7f871e560cd" },
1823 "in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" },
1924 "indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" },
25 "iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
2026 "ivy.nvim": { "branch": "0.x", "commit": "cfa7e29ae4d955508d4f7f2ef08cc0c51ee745ed" },
27 "layers.nvim": { "branch": "main", "commit": "67666f59a2dbe36a469766be6a4c484ae98c4895" },
2128 "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
29 "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
2230 "lspkind.nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" },
2331 "markdown-table-mode.nvim": { "branch": "main", "commit": "f830cd15a97deb3acc53d9f6607bc609f7f32e49" },
2432 "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
2533 "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },
2634 "mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" },
2735 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
36 "neodim": { "branch": "master", "commit": "d87470828690342d0139efc2fd56ea0b29e9ecb3" },
37 "no-neck-pain.nvim": { "branch": "main", "commit": "c0d8061f18bccceff0991e096c8f864a720e1ebf" },
2838 "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
2939 "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
3040 "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
41 "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
42 "nvim-docs-view": { "branch": "master", "commit": "365593534e0acd762bfddce6e8313315ffa4fa36" },
43 "nvim-dr-lsp": { "branch": "main", "commit": "bbed27eb6eba20242d59fc6ac11852730c9af632" },
3144 "nvim-genghis": { "branch": "main", "commit": "ca258b1e466d131e17eacf0c632abe932bce20ab" },
3245 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
46 "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
3347 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
3448 "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" },
3549 "nvim-lsp-endhints": { "branch": "main", "commit": "391ef40521b631a8a2fb7aef78db6967ead6b39d" },
50 "nvim-luapad": { "branch": "master", "commit": "176686eb616a5ada5dfc748f2b5109194bbe8a71" },
3651 "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
52 "nvim-rulebook": { "branch": "main", "commit": "bc5e3874a9870709ec91152f9efce6dad49ca862" },
3753 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
38 "nvim-treesitter": { "branch": "master", "commit": "f027762845fa35ff27fe0487c86537a74a480a0c" },
54 "nvim-treesitter": { "branch": "master", "commit": "707313b80a2f1e65fa06dba2052cc49ce6762a60" },
3955 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
4056 "nvim-treesitter-textobjects": { "branch": "master", "commit": "4a2d05ec24eaa6b655c7d19092a3b6c0219d46b9" },
4157 "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
42 "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" },
58 "nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" },
4359 "oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" },
4460 "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
4561 "precognition.nvim": { "branch": "main", "commit": "8a81c310b4e76b4884fc5350a5741cf683c645c7" },
62 "range-highlight.nvim": { "branch": "master", "commit": "8b5e8ccb3460b2c3675f4639b9f54e64eaab36d9" },
63 "refjump.nvim": { "branch": "main", "commit": "a78b585cff29505f7558f3a596bca567474cd663" },
4664 "scratch.nvim": { "branch": "main", "commit": "3e3d2ad0d7f565bc794d9d3ad40e92509802ecad" },
4765 "specs.nvim": { "branch": "main", "commit": "8a108c8b37dec1b184a1d3d76c6cf867bfbe9636" },
4866 "spellwarn.nvim": { "branch": "main", "commit": "2f4dbc58bb90bc63b295461216b91ccf4e7f782d" },
4967 "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" },
68 "surround-ui.nvim": { "branch": "main", "commit": "40abcba017a943d6d3dd304e523f34a43d80405b" },
69 "symbol-usage.nvim": { "branch": "main", "commit": "0f9b3da014b7e41559b643e7461fcabb2a7dc83a" },
5070 "telescope-frecency.nvim": { "branch": "master", "commit": "f67baca08423a6fd00167801a54db38e0b878063" },
5171 "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
5272 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
73 "telescope-undo.nvim": { "branch": "main", "commit": "51be9ae7c42fc27c0b05505e3a0162e0f05fbb6a" },
5374 "telescope-zoxide": { "branch": "main", "commit": "54bfe630bad08dc9891ec78c7cf8db38dd725c97" },
5475 "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
5576 "text-case.nvim": { "branch": "main", "commit": "13daf28a829e6d0646904c94214cb289bb0c6f34" },
6182 "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
6283 "vim-vscode-snippets": { "branch": "master", "commit": "c34e9edee6a00cf3d0b8edb515e08e3df450bcfa" },
6384 "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
85 "wezterm-types": { "branch": "main", "commit": "1518752906ba3fac0060d9efab6e4d3ec15d4b5a" },
6486 "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" },
6587 "zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" }

neovim/lua/bugabinga/lsp/init.lua

Modified

+1 / −1 text lines

299299 buffer = bufnr,
300300 keys = '<leader>ti',
301301 command = function ()
302 vim.lsp.inlay_hint.enable( vim.lsp.inlay_hint.is_enabled() )
302 vim.lsp.inlay_hint.enable( not vim.lsp.inlay_hint.is_enabled() )
303303 end,
304304 } )
305305 end

neovim/lua/bugabinga/nugu/init.lua

Modified

+1 / −0 text lines

181181_.VisualNOS { bg = ui_unfocus }
182182_.WarningMsg { fg = warning, bold = true }
183183_.WildMenu = _.Debug
184_.TextYankPost { fg = content_backdrop, bg = ui_important_local }
185186_.String { fg = content_important_local, italic = true }
186187_.Constant = _.String

neovim/lua/bugabinga/nugu/palette.lua

Modified

+20 / −20 text lines

88end
1010return {
11 debug = choose { light = '#3dd45d', dark = '#3dd45d', },
12 error = choose { light = '#740523', dark = '#f27a9a', },
13 info = choose { light = '#4187a7', dark = '#e7f0f3', },
14 warning = choose { light = '#a7802d', dark = '#f1e8d6', },
11 debug = choose { light = '#3dd45d', dark = '#3dd45d' },
12 error = choose { light = '#740523', dark = '#f27a9a' },
13 info = choose { light = '#4187a7', dark = '#e7f0f3' },
14 warning = choose { light = '#a7802d', dark = '#f1e8d6' },
16 content_normal = choose { light = '#494949', dark = '#cfcfcf', },
17 content_backdrop = choose { light = '#e3e3e3', dark = '#131313', },
18 content_accent = choose { light = '#800080', dark = '#800080', },
19 content_minor = choose { light = '#878787', dark = '#727272', },
20 content_focus = choose { light = '#646464', dark = '#a5bdb6', },
21 content_unfocus = choose { light = '#c9c9c9', dark = '#3f4543', },
22 content_important_global = choose { light = '#48256e', dark = '#8e58cc', },
23 content_important_local = choose { light = '#643398', dark = '#7a3bc3', },
16 content_normal = choose { light = '#494949', dark = '#cfcfcf' },
17 content_backdrop = choose { light = '#e3e3e3', dark = '#131313' },
18 content_accent = choose { light = '#800080', dark = '#800080' },
19 content_minor = choose { light = '#878787', dark = '#727272' },
20 content_focus = choose { light = '#646464', dark = '#a5bdb6' },
21 content_unfocus = choose { light = '#c9c9c9', dark = '#3f4543' },
22 content_important_global = choose { light = '#48256e', dark = '#8e58cc' },
23 content_important_local = choose { light = '#643398', dark = '#7a3bc3' },
25 ui_normal = choose { light = '#929292', dark = '#e2e2e2', },
26 ui_backdrop = choose { light = '#f9f9f9', dark = '#000000', },
27 ui_accent = choose { light = '#d43dd4', dark = '#7a067a', },
28 ui_minor = choose { light = '#d0d0d0', dark = '#424242', },
29 ui_focus = choose { light = '#646464', dark = '#788984', },
30 ui_unfocus = choose { light = '#c9c9c9', dark = '#121212', },
31 ui_important_global = choose { light = '#9170b5', dark = '#5f368d', },
32 ui_important_local = choose { light = '#ae95c8', dark = '#4c2b72', },
25 ui_normal = choose { light = '#929292', dark = '#e2e2e2' },
26 ui_backdrop = choose { light = '#f9f9f9', dark = '#000000' },
27 ui_accent = choose { light = '#d43dd4', dark = '#7a067a' },
28 ui_minor = choose { light = '#d0d0d0', dark = '#424242' },
29 ui_focus = choose { light = '#646464', dark = '#788984' },
30 ui_unfocus = choose { light = '#c9c9c9', dark = '#121212' },
31 ui_important_global = choose { light = '#9170b5', dark = '#5f368d' },
32 ui_important_local = choose { light = '#ae95c8', dark = '#4c2b72' },

neovim/lua/bugabinga/options/keymaps.lua

Modified

+0 / −21 text lines

1010vim.g.mapleader = ' '
1111vim.g.maplocalleader = ' '
13map.normal.visual {
14 description = 'Yanks the selected text (in normal mode or visual mode) to the system clipboard.',
15 category = 'editing',
16 keys = '<leader>y',
17 command = '"+y',
18}
20map.normal {
21 description = 'Pastes from the system clipboard (in normal mode or visual mode).',
22 category = 'editing',
23 keys = '<leader>p',
24 command = '"+p',
25}
27map.normal.visual {
28 description = 'Yanks the entire line (when used in normal mode with motion).',
29 category = 'editing',
30 keys = '<leader>Y',
31 command = '"+Y',
32}
3413-- disable command history keymap, because i fatfinger it too often
3514map {
3615 keys = 'q:',

neovim/lua/bugabinga/options/ui.lua

Modified

+6 / −1 text lines

77 description = 'briefly highlight yanked text',
88 events = 'TextYankPost',
99 pattern = '*',
10 command = function () vim.highlight.on_yank() end,
10 command = function ()
11 vim.highlight.on_yank {
12 higroup = 'TextYankPost',
13 timeout = 333,
14 }
15 end,
1318auto 'disable_columns_in_special_buffers' {

neovim/lua/bugabinga/plugins/cmp.lua

Modified

+55 / −43 text lines

1212 'hrsh7th/cmp-path',
1313 'hrsh7th/cmp-nvim-lua',
1414 'hrsh7th/cmp-nvim-lsp-signature-help',
15 'SergioRibera/cmp-dotenv',
1516 'saadparwaiz1/cmp_luasnip',
1617 'onsails/lspkind.nvim',
1718 'L3MON4D3/LuaSnip',
4950 ['<C-x>'] = cmp.mapping.complete(),
5051 }
52 local formatting = {}
53 local ok, lspkind = pcall( require, 'lspkind' )
54 if ok then
55 formatting.format = lspkind.cmp_format {
56 mode = 'symbol',
57 symbol_map = {
58 Copilot = icon.copilot,
59 Class = icon.class,
60 Color = icon.color,
61 Constant = icon.constant,
62 Constructor = icon.constructor,
63 Enum = icon.enum,
64 EnumMember = icon.enum_member,
65 Event = icon.event,
66 Field = icon.field,
67 File = icon.file,
68 Folder = icon.folder,
69 Function = icon['function'],
70 Interface = icon.interface,
71 Keyword = icon.keyword,
72 Method = icon.method,
73 Module = icon.module,
74 Operator = icon.operator,
75 Property = icon.property,
76 Reference = icon.reference,
77 Snippet = icon.snippet,
78 Struct = icon.struct,
79 Text = icon.text,
80 TypeParameter = icon.type_parameter,
81 Unit = icon.unit,
82 Value = icon.value,
83 Variable = icon.variable,
84 },
85 menu = {
86 buffer = '[buf]',
87 nvim_lsp = '[LSP]',
88 nvim_lua = '[nvim]',
89 path = '[path]',
90 luasnip = '[snip]',
91 },
92 }
93 end
53 local lspkind = prequire 'lspkind'
54 local colors = prequire 'nvim-highlight-colors'
55 local lspkind_params = {
56 mode = 'symbol',
57 symbol_map = {
58 Copilot = icon.copilot,
59 Class = icon.class,
60 Color = icon.color,
61 Constant = icon.constant,
62 Constructor = icon.constructor,
63 Enum = icon.enum,
64 EnumMember = icon.enum_member,
65 Event = icon.event,
66 Field = icon.field,
67 File = icon.file,
68 Folder = icon.folder,
69 Function = icon['function'],
70 Interface = icon.interface,
71 Keyword = icon.keyword,
72 Method = icon.method,
73 Module = icon.module,
74 Operator = icon.operator,
75 Property = icon.property,
76 Reference = icon.reference,
77 Snippet = icon.snippet,
78 Struct = icon.struct,
79 Text = icon.text,
80 TypeParameter = icon.type_parameter,
81 Unit = icon.unit,
82 Value = icon.value,
83 Variable = icon.variable,
84 },
85 menu = {
86 buffer = '[buf]',
87 nvim_lsp = '[LSP]',
88 nvim_lua = '[nvim]',
89 path = '[path]',
90 luasnip = '[snip]',
91 copilot = '[cop]',
92 },
93 }
94 local formatting = {
95 format = function ( entry, item )
96 local color_item = colors.format( entry, { kind = item.kind } )
97 item = lspkind.cmp_format( lspkind_params )( entry, item )
98 if color_item.abbr_hl_group then
99 item.kind_hl_group = color_item.abbr_hl_group
100 item.kind = color_item.abbr
101 end
102 return item
103 end,
104 }
95106 local sources = {
107 { name = 'copilot' }, -- FIXME: depends on incubating plugin!
96108 { name = 'nvim_lua' },
97109 { name = 'nvim_lsp_signature_help' },
98110 { name = 'nvim_lsp' },
111 { name = 'dotenv' },
99112 { name = 'path' },
100 { name = 'luasnip' },
101113 {
102114 name = 'buffer',
103115 keyword_length = 4,

neovim/lua/bugabinga/plugins/colorizer.lua

Modified

+7 / −30 text lines

11return {
22 {
3 'litoj/colorizer.nvim',
4 commit = 'c1602ff3f11566bb7f16f90985b0c59d3d7db0ef',
5 event = 'VeryLazy',
3 'brenoprata10/nvim-highlight-colors',
4 commit = 'a411550ef85cae467b889ba7d1a96bd78332d90e',
5 lazy = false,
6 init = function ()
7 vim.opt.termguicolors = true
8 end,
69 opts = {
7 filetypes = { '*' },
8 user_default_options = {
9 RGB = true, -- #RGB hex codes
10 RRGGBB = true, -- #RRGGBB hex codes
11 RRGGBBAA = true, -- #RRGGBBAA hex codes
12 AARRGGBB = true, -- 0xAARRGGBB hex codes
13 rgb_fn = true, -- CSS rgb() and rgba() functions
14 hsl_fn = true, -- CSS hsl() and hsla() functions
15 css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
16 css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
17 -- Available modes for `mode`: foreground, background, virtualtext
18 mode = 'virtualtext', -- Set the display mode.
19 -- names = function () return require 'bugabinga.nugu.palette' end,
20 -- parsers can contain values used in |user_default_options|
21 sass = { enable = false, parsers = { 'css' } }, -- Enable sass colors
22 virtualtext = '██',
23 -- update color values even if buffer is not focused
24 -- example use: cmp_menu, cmp_docs
25 always_update = false,
26 },
27 -- all the sub-options of filetypes apply to buftypes
28 buftypes = {
29 '*',
30 '!prompt',
31 '!popup',
32 '!nofile',
33 },
10 render = 'virtual',
3411 },
3512 },

neovim/lua/bugabinga/plugins/heirline.lua

Modified

+12 / −2 text lines

233233 end,
234234 }
236 -- FIXME: still incubating
237 local lsp_dr_count = {
238 condition = conditions.lsp_attached,
239 update = { 'CursorMoved' },
240 provider = function ()
241 local lsp_count = prequire 'dr-lsp'.lspCount()
242 return lsp_count and lsp_count:gsub( 'LSP', '' )
243 end,
244 }
236246 local lsp_active = {
237247 condition = conditions.lsp_attached,
238 -- FIXME: updates from parent components do not seem to update children,
239 -- if those have their own updates?
240248 update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave' },
242250 provider = function ()
474482 space,
475483 escape_status,
476484 space,
485 lsp_dr_count,
486 space,
477487 lsp_active,
478488 space,
479489 file_encoding,

neovim/lua/bugabinga/plugins/in-and-out.lua

Added
new file mode 100644

+14 / −0 text lines

1local map = require 'std.map'
2
3map.insert {
4 description = 'Moves in or out of balanced tokens',
5 category = 'editing',
6 keys = '<c-space>',
7 command = function () require 'in-and-out'.in_and_out() end,
8}
9
10return {
11 'ysmb-wtsg/in-and-out.nvim',
12 commit = 'ab24cafadc3418dffb0c7e9b0621cff60b9ac551',
13 event = 'VeryLazy',
14}

neovim/lua/bugabinga/plugins/incubator.lua

Added
new file mode 100644

+384 / −0 text lines

1-- this file lists plugins in their "incubation" phase.
2-- that means i am testing those out of curiosity, but am not sure yet i wish
3-- to use and depend on them.
4
5-- global toggle for all incubating plugins. set to false to quickly, but
6-- temporarily, get rid of all incubating plugins.
7local FUCK_STABILITY = true
8
9local ignored = require 'std.ignored'
10local icon = require 'std.icon'
12return {
13 -------------------------------------------------------------------------------
14 {
15 'gregorias/toggle.nvim',
16 lazy = false,
17 version = '2.0',
18 config = true,
19 enable = FUCK_STABILITY,
20 },
21 -------------------------------------------------------------------------------
22 {
23 'zbirenbaum/copilot-cmp',
24 event = 'InsertEnter',
25 config = function () require 'copilot_cmp'.setup() end,
26 dependencies = {
27 'zbirenbaum/copilot.lua',
28 cmd = 'Copilot',
29 config = function ()
30 require 'copilot'.setup {
31 suggestion = { enabled = false },
32 panel = { enabled = false },
33 }
34 end,
35 },
36 enable = FUCK_STABILITY,
37 },
38 -------------------------------------------------------------------------------
39 {
40 -- FIXME: if view stays open, when saving session, reloading the session results in borked view.
41 'amrbashir/nvim-docs-view',
42 keys = {
43 {
44 '<leader>tk',
45 '<cmd>DocsViewToggle<cr>',
46 mode = { 'n' },
47 desc = 'Toggle stable documentation panel.',
48 },
49 },
50 cmd = 'DocsViewToggle',
51 opts = {
52 position = 'right',
53 width = 69,
54 },
55 enable = FUCK_STABILITY,
56 },
57 -------------------------------------------------------------------------------
58 {
59 -- TODO: look into demicolon.nvim for ,; repition
60 'mawkler/refjump.nvim',
61 dependencies = {
63 },
64 keys = { ']r', '[r' },
65 opts = {},
66 enable = FUCK_STABILITY,
67 },
68 -------------------------------------------------------------------------------
69 {
70 'CopilotC-Nvim/CopilotChat.nvim',
71 branch = 'canary',
72 cmd = 'CopilotChat',
73 dependencies = {
74 { 'zbirenbaum/copilot.lua' }, -- or github/copilot.vim
75 { 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper
76 },
77 build = 'make tiktoken', -- Only on MacOS or Linux
78 opts = {
79 debug = true, -- Enable debugging
80 },
81 enable = FUCK_STABILITY,
82 },
83 -------------------------------------------------------------------------------
84 {
85 'chrisgrieser/nvim-rulebook',
86 keys = {
87 { '<leader>ri', function () require 'rulebook'.ignoreRule() end },
88 { '<leader>rl', function () require 'rulebook'.lookupRule() end },
89 { '<leader>ry', function () require 'rulebook'.yankDiagnosticCode() end },
90 { '<leader>sf', function () require 'rulebook'.suppressFormatter() end, mode = { 'n', 'x' } },
91 },
92 enable = FUCK_STABILITY,
93 },
94 -------------------------------------------------------------------------------
95 {
96 'chrisgrieser/nvim-dr-lsp',
97 event = 'LspAttach',
98 opts = {},
99 enable = FUCK_STABILITY,
100 },
101 -------------------------------------------------------------------------------
102 {
103 'Wansmer/symbol-usage.nvim',
104 event = 'LspAttach',
105 opts = {},
106 enable = FUCK_STABILITY,
107 },
108 -------------------------------------------------------------------------------
109 {
110 -- FIXME: no worky in wezterm ?
111 -- mouse idle seems to send no event.
112 'soulis-1256/eagle.nvim',
113 lazy = false,
114 init = function ()
115 vim.o.mousemoveevent = true
116 end,
117 enable = FUCK_STABILITY,
118 },
119 -------------------------------------------------------------------------------
120 {
121 'quentingruber/timespent.nvim',
122 keys = {
123 {
124 '<leader>tS',
125 '<cmd>:ShowTimeSpent<cr>',
126 mode = { 'n' },
127 desc = 'Show time spent',
128 },
129 },
130 enable = FUCK_STABILITY,
131 },
132 -------------------------------------------------------------------------------
133 {
134 'nvim-telescope/telescope-frecency.nvim',
135 config = function ()
136 require 'telescope'.load_extension 'frecency'
137 end,
138 keys = {
139 {
140 '<c-p><c-f>',
141 '<cmd>Telescope frecency<cr>',
142 mode = { 'n' },
143 desc = 'telescope: Show recently and frequently used files.',
144 },
145 },
146 enable = FUCK_STABILITY,
147 },
149 {
150 'cenk1cenk2/scratch.nvim',
151 enable = FUCK_STABILITY,
152 },
153 -------------------------------------------------------------------------------
154 {
155 'AdeAttwood/ivy.nvim',
156 lazy = false,
157 build = 'cargo build --release',
158 opts = {},
159 enable = FUCK_STABILITY,
160 },
161 -------------------------------------------------------------------------------
162 {
163 'roobert/surround-ui.nvim',
164 lazy = false,
165 dependencies = {
166 'kylechui/nvim-surround',
167 'folke/which-key.nvim',
168 },
169 opts = {
170 root_key = 'ms',
171 },
172 enable = FUCK_STABILITY,
173 },
174 -------------------------------------------------------------------------------
175 {
176 'rachartier/tiny-inline-diagnostic.nvim',
177 event = 'LspAttach',
178 config = function ()
179 require 'tiny-inline-diagnostic'.setup()
180 end,
181 enable = FUCK_STABILITY,
182 },
183 -------------------------------------------------------------------------------
184 {
185 'winston0410/range-highlight.nvim',
186 lazy = false,
187 dependencies = { 'winston0410/cmd-parser.nvim' },
188 opts = { highlight = 'Visual' },
189 enable = FUCK_STABILITY,
190 },
191 -------------------------------------------------------------------------------
192 {
193 'chrisgrieser/nvim-lsp-endhints',
194 event = 'LspAttach',
195 opts = {
196 icons = {
197 type = icon.type .. ' ',
198 parameter = icon.paramter,
199 offspec = '', -- hint kind not defined in official LSP spec
200 unknown = icon.hint, -- hint kind
201 },
202 label = {
203 padding = 2,
204 },
205 },
206 enable = FUCK_STABILITY,
207 },
208 -------------------------------------------------------------------------------
209 {
210 -- FIXME: does not seem to worky? at least for lua.
211 'zbirenbaum/neodim',
212 event = 'LspAttach',
213 opts = {},
214 enable = FUCK_STABILITY,
215 },
216 -------------------------------------------------------------------------------
217 {
218 'rafcamlet/nvim-luapad',
219 cmd = { 'Luapad', 'LuaRun' },
220 opts = {},
221 enable = FUCK_STABILITY,
223 },
224 -------------------------------------------------------------------------------
225 {
226 'ravibrock/spellwarn.nvim',
227 event = 'VeryLazy',
228 config = true,
229 enable = FUCK_STABILITY,
230 },
231 -------------------------------------------------------------------------------
232 {
233 'emmanueltouzery/decisive.nvim',
234 config = function ()
235 require 'decisive'.setup {}
236 end,
237 lazy = true,
238 ft = { 'csv' },
239 keys = {
240 { '<leader>cca', ":lua require('decisive').align_csv({})<cr>", { silent = true }, desc = 'Align CSV', mode = 'n' },
241 { '<leader>ccA', ":lua require('decisive').align_csv_clear({})<cr>", { silent = true }, desc = 'Align CSV clear', mode = 'n' },
242 { '[c', ":lua require('decisive').align_csv_prev_col()<cr>", { silent = true }, desc = 'Align CSV prev col', mode = 'n' },
243 { ']c', ":lua require('decisive').align_csv_next_col()<cr>", { silent = true }, desc = 'Align CSV next col', mode = 'n' },
244 },
245 enable = FUCK_STABILITY,
246 },
247 -------------------------------------------------------------------------------
248 {
249 'tris203/precognition.nvim',
250 event = 'VeryLazy',
251 opts = {
252 startVisible = true,
253 showBlankVirtLine = true,
254 highlightColor = { link = 'LineNr' },
255 -- hints = {
256 -- Caret = { text = "^", prio = 2 },
257 -- Dollar = { text = "$", prio = 1 },
258 -- MatchingPair = { text = "%", prio = 5 },
259 -- Zero = { text = "0", prio = 1 },
260 -- w = { text = "w", prio = 10 },
261 -- b = { text = "b", prio = 9 },
262 -- e = { text = "e", prio = 8 },
263 -- W = { text = "W", prio = 7 },
264 -- B = { text = "B", prio = 6 },
265 -- E = { text = "E", prio = 5 },
266 -- },
267 -- gutterHints = {
268 -- G = { text = "G", prio = 10 },
269 -- gg = { text = "gg", prio = 9 },
270 -- PrevParagraph = { text = "{", prio = 8 },
271 -- NextParagraph = { text = "}", prio = 8 },
272 -- },
273 disabled_fts = ignored.filetypes,
274 },
275 enable = FUCK_STABILITY,
276 },
277 -------------------------------------------------------------------------------
278 {
279 'folke/lazydev.nvim',
280 dependencies = { 'justinsgithub/wezterm-types' },
281 ft = 'lua', -- only load on lua files
282 opts = {
283 library = {
284 -- Or relative, which means they will be resolved from the plugin dir.
285 'lazy.nvim',
286 -- It can also be a table with trigger words / mods
287 -- Only load luvit types when the `vim.uv` word is found
288 { path = 'luvit-meta/library', words = { 'vim%.uv' } },
289 -- Load the wezterm types when the `wezterm` module is required
290 -- Needs `justinsgithub/wezterm-types` to be installed
291 { path = 'wezterm-types', mods = { 'wezterm' } },
292 },
293 },
294 enable = FUCK_STABILITY,
295 },
296 {
297 'shortcuts/no-neck-pain.nvim',
298 lazy = false,
299 enable = FUCK_STABILITY,
300 },
301 -------------------------------------------------------------------------------
302 {
303 -- TODO: bind IMove* to alt+h and alt+l with fallback to gomove
304 -- NOTE: if this one does not work out, check https://github.com/Wansmer/sibling-swap.nvim
305 'mizlan/iswap.nvim',
306 event = 'VeryLazy',
307 enable = FUCK_STABILITY,
308 },
309 -------------------------------------------------------------------------------
310 {
311 'mfussenegger/nvim-dap',
312 dependencies = {
313 {
314 'debugloop/layers.nvim',
315 opts = {},
316 },
317 },
318 keys = {
319 {
320 '<leader>d',
321 function ()
322 local dap = require 'dap'
323 if dap.session() ~= nil then
324 DEBUG_MODE:activate()
325 return
326 end
327 dap.continue()
328 end,
329 desc = 'launch debugger',
330 },
331 opts = {},
332 config = function ( _, opts )
333 local dap = require 'dap'
334 -- do the setup you'd do anyway for your language of choice
335 dap.adapters = opts.adapters
336 dap.configurations = opts.configurations
337 -- this is where the example starts
338 DEBUG_MODE = Layers.mode.new() -- global, accessible from anywhere
339 DEBUG_MODE:auto_show_help()
340 -- this actually relates to the next example, but it is most convenient to add here
341 DEBUG_MODE:add_hook( function ( _ )
342 vim.cmd 'redrawstatus' -- update status line when toggled
343 end )
344 -- nvim-dap hooks
345 dap.listeners.after.event_initialized['debug_mode'] = function ()
346 DEBUG_MODE:activate()
347 end
348 dap.listeners.before.event_terminated['debug_mode'] = function ()
349 DEBUG_MODE:deactivate()
350 end
351 dap.listeners.before.event_exited['debug_mode'] = function ()
352 DEBUG_MODE:deactivate()
353 end
354 -- map our custom mode keymaps
355 DEBUG_MODE:keymaps {
356 n = {
357 {
358 's',
359 function ()
360 dap.step_over()
361 end,
362 { desc = 'step forward' },
363 },
364 {
365 'c',
366 function ()
367 dap.continue()
368 end,
369 { desc = 'continue' },
370 },
371 { -- this acts as a way to leave debug mode without quitting the debugger
372 '<esc>',
373 function ()
374 DEBUG_MODE:deactivate()
375 end,
376 { desc = 'exit' },
377 },
378 },
379 }
380 end,
381 },
382 enable = FUCK_STABILITY,
383 },
384}

neovim/lua/bugabinga/plugins/markdown-table-mode.lua

Added
new file mode 100644

+6 / −0 text lines

1return {
2 'Kicamon/markdown-table-mode.nvim',
3 commit = 'f830cd15a97deb3acc53d9f6607bc609f7f32e49',
4 ft = 'markdown',
5 opts = {},
6}

neovim/lua/bugabinga/plugins/telescope.lua

Modified

+18 / −9 text lines

6464 command = function () require 'telescope.builtin'.live_grep() end,
67map.normal {
68 description = 'Open undo hisory...',
69 category = 'undo',
70 keys = '<c-p><c-u>',
71 command = function () require 'telescope'.extensions.undo.undo() end,
72}
6774map.normal {
6875 description = 'Open search for current buffer content...',
6976 category = 'search',
97104 build =
98105 function ( plugin_spec )
99106 local result
100 result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release', },
101 { text = true, cwd = plugin_spec.dir, } ):wait()
107 result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release' },
108 { text = true, cwd = plugin_spec.dir } ):wait()
102109 if result.code ~= 0 then error( result.stderr ) end
103 result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release', },
104 { text = true, cwd = plugin_spec.dir, } ):wait()
110 result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release' },
111 { text = true, cwd = plugin_spec.dir } ):wait()
105112 if result.code ~= 0 then error( result.stderr ) end
106 result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build', },
107 { text = true, cwd = plugin_spec.dir, } ):wait()
113 result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build' },
114 { text = true, cwd = plugin_spec.dir } ):wait()
108115 if result.code ~= 0 then error( result.stderr ) end
109116 end,
110117 },
113120 'nvim-telescope/telescope-symbols.nvim',
114121 'jvgrootveld/telescope-zoxide',
115122 'AckslD/nvim-neoclip.lua',
123 'debugloop/telescope-undo.nvim',
116124 },
117125 config = function ()
118126 local telescope = require 'telescope'
119127 local actions = require 'telescope.actions'
120128 local themes = require 'telescope.themes'
122 local ivy = themes.get_ivy { layout_config = { preview_width = 0.23, }, }
130 local ivy = themes.get_ivy { layout_config = { preview_width = 0.23 } }
124132 telescope.setup {
125133 defaults = {
145153 ['<c-s>'] = actions.file_split,
146154 ['g?'] = actions.which_key,
147155 },
148 n = { q = actions.close, },
156 n = { q = actions.close },
149157 },
150158 },
151159 pickers = {
160168 help_tags = ivy,
161169 },
162170 extensions = {
163 zoxide = { prompt_title = 'Navigate deez nuts!', },
171 zoxide = { prompt_title = 'Navigate deez nuts!' },
164172 },
165173 }
169177 telescope.load_extension 'fzf'
170178 telescope.load_extension 'zoxide'
171179 telescope.load_extension 'neoclip'
180 telescope.load_extension 'undo'
172181 end,

neovim/lua/bugabinga/save_actions.lua

Modified

+2 / −1 text lines

1313 action = { action, 'string' },
1414 }
1515 local parsed_command = vim.api.nvim_parse_cmd( action, {} )
16 ---@diagnostic disable-next-line: param-type-mismatch
1617 vim.api.nvim_cmd( parsed_command, { output = true } )
1718 end
1819 )
2425user_command.SaveActions 'Execute all declared save actions' ( apply_save_actions )
26map.normal.visual {
27map.normal.insert.visual {
2728 description = 'Save all buffers and apply save actions',
2829 category = 'actions',
2930 keys = '<c-s>',

neovim/lua/patches/init.lua

Added
new file mode 100644

+1 / −0 text lines

1require 'patches.snippet'

neovim/lua/patches/snippet.lua

Added
new file mode 100644

+20 / −0 text lines

1--- source https://boltlessengineer.github.io/posts/neovim-config-without-plugins/
2---
3---@param trigger string trigger string for snippet
4---@param body string snippet text that will be expanded
5---@param opts? vim.keymap.set.Opts
6---
7---Refer to <https://microsoft.github.io/language-server-protocol/specification/#snippet_syntax>
8---for the specification of valid body.
9function vim.snippet.add( trigger, body, opts )
10 vim.keymap.set( 'ia', trigger, function ()
11 -- If abbrev is expanded with keys like "(", ")", "<cr>", "<space>",
12 -- don't expand the snippet. Only accept "<c-]>" as trigger key.
13 local c = vim.fn.nr2char( vim.fn.getchar( 0 ) )
14 if c ~= '' then
15 vim.api.nvim_feedkeys( trigger .. c, 'i', true )
16 return
17 end
18 vim.snippet.expand( body )
19 end, opts )
20end

neovim/lua/std/const.lua

Added
new file mode 100644

+38 / −0 text lines

1return {
2 win32 = vim.loop.os_uname().sysname:match 'Win',
3 wsl2 = vim.loop.os_uname().release:match 'WSL2',
4 os_background = (function ()
5 -- Default value
6 local background = 'light'
7 local uname = vim.uv.os_uname()
8 -- First check whether we are on WSL or Windows
9 if vim.loop.os_uname().release:match 'WSL2' then
10 -- Check if 'reg.exe' is executable
11 if vim.fn.executable 'reg.exe' ~= 0 then
12 -- Execute command to check if the win32 appearance is set to Dark
13 local appsUseLightTheme = vim.fn.system { 'reg.exe', 'Query',
14 'HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize', '/v', 'AppsUseLightTheme' }
15 if not appsUseLightTheme:find '0x1' then
16 background = 'dark'
17 end
18 end
19 -- Check if 'busctl' is executable (part of systemd)
20 elseif vim.fn.executable 'busctl' ~= 0 then
21 -- Get the current color scheme from xdg-desktop-portal using busctl
22 local result = vim.fn.system {
23 'busctl', '--user', 'call', 'org.freedesktop.portal.Desktop', '/org/freedesktop/portal/desktop',
24 'org.freedesktop.portal.Settings', 'ReadOne', 'ss', 'org.freedesktop.appearance', 'color-scheme',
25 }
26 -- The result is in the form of "v u 0" for light and "v u 1" for dark
27 local color_scheme = result:match 'u%s+(%d+)'
29 if color_scheme == '1' then
30 background = 'dark'
31 end
32 else
33 end
35 return background
36 end)(),
38}

neovim/lua/std/ignored.lua

Modified

+4 / −0 text lines

1-- TODO: add functions to add stuff to lists so that plugins can register these
2-- and they get cleaned up when plugins get removed
13local filetypes = {
24 'NvimTree',
35 'Outline',
810 '^git.*',
911 'flash_prompt',
1012 'help',
13 'ivy',
1114 'lazy',
1215 'noice',
1316 'notify',
1619 'starter',
1720 'svn',
1821 'toggleterm',
22 'copilot-chat',
2125local buftypes = {

neovim/spell/nerd.utf-8.add

Modified

+1 / −0 text lines

9595difftastic
9696weechat
9797tarsnap
98mux

neovim/spell/nerd.utf-8.add.spl

Modified

Binary size (old → new): 1393 → 1398 bytes.

nushell/login.nu

Modified

+1 / −0 text lines

99use dwnld.nu
1010use packages.nu
1111use fedora_bootstrip.nu
12use notes.nu
1314if $env.WIN32 {
1415 use refreshenv.nu *

nushell/scripts/notes.nu

Added
new file mode 100644

+85 / −0 text lines

1### bugabingas custom note taking and organizing system
2###
3### notes are grouped into contexts (folders), so that i can distinguish between
4### personal and work related notes.
5
6
7
8def validate_context [
9 context: string
10] {
11 if not ($env.NOTES | path exists) {
12 error make {
13 msg: "No notes folder found in environment variables.
14 Make sure a NOTES variable exists in $env."
15 }
16 }
17 if not ($env.NOTES | path join $context | path exists) {
18error make {
19 msg: $"The given context ($context) does not exist in ($env.NOTES).
20 Create it and try again."
21 }
22 }
23}
25 export def main [
26 --context: string = "bugabinga" # which context do the notes belong to
27] {
28 # TODO: the context needs to get overridden by env var, so that switch between work and personal is easy
30 validate_context $context
31
32 ls --short-names ($env.NOTES | path join $context)
33 # TODO: print some high level view of the notes. tree, graph, text ?
34}
36def new_note_id [] { random binary 3 | encode new-base64 --nopad --url }
38def new_note [
39 title: string # title of note. will be used for title and initial heading
40 author: string # author, usually me...
41 date: string # creation date of note
42 tags: list<string> # a list of tags, if already known
43 context: string # note context
44] {
45 $"---
46title: ($title)
47author: ($author)
48date: ($date)
49tags:
50- ($context)
51($tags | each { '- ' + $in } | str join (char nl))
52---
53
54"
55}
57export def new [
58 title?: string # title of new node
59 --tags: list<string> # some optional tags for the note
60 --context: string = "bugabinga" # which context do the notes belong to
61] {
62 validate_context $context
64 let title = if ($title | is-empty) { input "gimme title: " } else { $title }
65 let author = 'Oliver Jan Krylow'
66 let now = date now | date to-record
67 let date = $"($now.day)/($now.month)/($now.year)" # german dates. what can i say...
68 let tags = if ($tags == null) { [] } else { $tags }
70 let note_content = new_note $title $author $date $tags $context
71 let note_file_name = $"(new_note_id)-($title | str kebab-case).md"
72 let note_file = [ $env.NOTES $context $note_file_name] | path join
74 if ($note_file | path exists) {
75 error make {
76 msg: "the note you are trying to create exists already"
77 }
78 }
80 $note_content | save --raw $note_file
82 let editor = if ( $env.EDITOR == null ) { 'vi' } else { $env.EDITOR }
83 let editor = if ( $env.VISUAL == null ) { $editor } else { $env.VISUAL }
84 run-external $editor $note_file
85}

wezterm/bugabinga/code_font.lua

Modified

+104 / −25 text lines

11local wez = require 'wezterm'
3return {
4 random = function ()
5 local selected = 'JetBrains Mono' -- safe default, because built in to wezterm
6 local font_names = {}
7 local weights = {}
8 local total_weight = 1 -- to account for luas 1 based indexing
9 local code_fonts = io.open( wez.config_dir .. '/bugabinga/code_fonts.csv', 'r' )
11 if code_fonts then
12 for line in code_fonts:lines() do
13 local weight, font_name = line:match '^%s*(%d*)%s*,%s*(.*)%s*$'
14 table.insert( font_names, font_name )
15 table.insert( weights, tonumber( weight ) )
16 total_weight = total_weight + weight
3local adjust_font_randomness_weight = function ( font_family, adjust )
4 local code_fonts = io.open( wez.config_dir .. '/bugabinga/code_fonts.csv', 'r+' )
5 if code_fonts then
6 local new_lines = {}
7 for line in code_fonts:lines() do
8 local weight, font_name = line:match '^%s*(%d+)%s*,%s*(.-)%s*$'
9 if not weight or not font_name then
10 wez.log_error 'Could not parse code_fonts.csv. Borked?'
11 return
1712 end
18 code_fonts:close()
13 weight = tonumber( weight )
14 if font_name == font_family then
15 weight = math.max( 0, adjust( weight ) )
16 end
17 table.insert( new_lines, weight .. ', ' .. font_name )
18 end
19 code_fonts:seek( 'set', 0 )
20 for _, new_line in ipairs( new_lines ) do
21 code_fonts:write( new_line, '\n' )
22 end
23 code_fonts:close()
24 else
25 wez.log_error 'Unable to read and write code_fonts.csv!'
26 end
27end
20 local random_weight = math.random( total_weight )
21 local cursor = 0
22 for idx, weight in ipairs( weights ) do
23 cursor = cursor + weight
24 if cursor >= random_weight then
25 selected = font_names[idx]
26 break
27 end
29-- like the current font.
30-- liked fonts have higher probablity of being picked on wezterm boot.
31-- increase the weight of the font in code_fonts.csv.
32-- not to be confused with a font weigth (aka bold).
33-- here weight means the likelyhood of being "randomly" picked.
34local like_current_font = function ( window )
35 local font = window:effective_config().font.font
36 -- not sure why font is a list
37 local family = font[1].family
38 adjust_font_randomness_weight( family, function ( weight )
39 local new_weight = weight + 1
40 -- TODO: remove notification once weight is displayed in status
41 window:toast_notification( 'code_fonts', 'Font ' .. family .. '(' .. new_weight .. ') liked! ', nil, 500 )
42 return new_weight
43 end )
44end
46local dislike_current_font = function ( window )
47 local font = window:effective_config().font.font
48 -- not sure why font is a list
49 local family = font[1].family
50 adjust_font_randomness_weight( family, function ( weight )
51 local new_weight = weight - 1
52 window:toast_notification( 'code_fonts', 'Font ' .. family .. '(' .. new_weight .. ') NOT liked! ', nil, 500 )
53 return new_weight
54 end )
55end
57local ban_current_font = function ( window )
58 local font = window:effective_config().font.font
59 -- not sure why font is a list
60 local family = font[1].family
61 adjust_font_randomness_weight( family, function ()
62 window:toast_notification( 'code_fonts', 'Font ' .. family .. ' BANNED!', nil, 500 )
63 return 0
64 end )
65end
67-- register those events with wezterm, so that key binds can trigger them
68wez.on( 'like-current-font', like_current_font )
69wez.on( 'dislike-current-font', dislike_current_font )
70wez.on( 'ban-current-font', ban_current_font )
72local random = function ()
73 local selected = 'JetBrains Mono' -- safe default, because built in to wezterm
74 local font_names = {}
75 local weights = {}
76 local total_weight = 1 -- to account for luas 1 based indexing
77 local code_fonts = io.open( wez.config_dir .. '/bugabinga/code_fonts.csv', 'r' )
79 if code_fonts then
80 for line in code_fonts:lines() do
81 local weight, font_name = line:match '^%s*(%d+)%s*,%s*(.-)%s*$'
82 if not weight or not font_name then
83 wez.log_error 'Could not parse code_fonts.csv. Borked?'
84 break
85 end
86 weight = tonumber( weight )
87 table.insert( font_names, font_name )
88 table.insert( weights, weight )
89 total_weight = total_weight + weight
90 end
91 code_fonts:close()
93 local random_weight = math.random( total_weight )
94 local cursor = 0
95 for idx, weight in ipairs( weights ) do
96 cursor = cursor + weight
97 if cursor >= random_weight then
98 selected = font_names[idx]
99 break
28100 end
29101 end
102 end
31 return wez.font( selected )
32 end,
104 return wez.font( selected )
105end
107return {
108 like_current_font = like_current_font,
109 dislike_current_font = dislike_current_font,
110 ban_current_font = ban_current_font,
111 random = random,

wezterm/bugabinga/code_fonts

Deleted
deleted file mode 100644

+0 / −116 text lines

1Anonymous Pro
2Anonymous Pro Minus
3Aurulent Sans Mono
4AverageMono
5BPmono
6BigBlue TerminalPlus
7Bitstream Vera Sans Mono
8Bront
9CMU Typewriter Text
10CPMono_v07
11CamingoCode
12Cascadia Code
13Code New Roman
14CodingFontTobi
15Consola Mono
16Courier Prime Code
17Cousine
18Crisp
19Cutive Mono
20D2Coding
21DejaVu Sans Mono
22Dina ttf 10px
23Droid Sans Mono
24Edlo
25Envy Code R
26Fantasque Sans Mono
27Fira Code
28Fira Mono
29Fixedsys Excelsior 3.01
30FreeMono
31Geist Mono
32Generic Mono II
33GohuFont
34Hack
35Hasklig
36Hermit
37# IBM Plex Math
38IBM Plex Mono
39# IBM Plex Sans
40# IBM Plex Sans Condensed
41# IBM Plex Serif
42Inconsolata
43Inconsolata LGC
44Inconsolata-dz
45Inconsolata-g
46Intel One Mono
47Iosevka
48Iosevka Slab
49JetBrains Mono
50JetBrains Mono NL
51Kawkab Mono
52Latin Modern Mono Light
53Lekton
54Liberation Mono
55Lilex
56Linux Libertine Mono
57Luculent
58Luxi Mono
59M+ 1m
60M+ 1mn
61M+ 2m
62Martian Mono
63Mensch
64Meslo LG M DZ
65Metrickal
66Monaspace Argon Var
67Monaspace Krypton Var
68Monaspace Neon Var
69Monaspace Radon Var
70Monaspace Xenon Var
71MonoSpatial
72Monoid
73Monospace
74MonospaceTypewriter
75MonteCarlo Fixed 12
76NanumGothic_Coding
77Nimbus Mono
78NotCourierSans
79Office Code Pro
80Office Code Pro D
81Oxygen Mono
82PT Mono
83Panic Sans
84PixelCarnageMonoTT
85Pointfree
86ProFontWindows
87ProggyCleanTT
88ProggyCleanTTSZ
89ProggySmallTT
90ProggySquareTT
91ProggySquareTTSZ
92ProggyTinyTT
93ProggyTinyTTSZ
94Rec Mono Casual
95Rec Mono Linear
96Roboto Mono
97SV Basic Manual
98Share Tech Mono
99Share-TechMonoTrue
100SmallTypeWriting
101Source Code Pro
102Sudo
103Symbols Nerd Font
104Symbols Nerd Font Mono
105TeX Gyre Cursor
106Terminus
107Ubuntu Mono
108Verily Serif Mono
109Victor Mono
110Whois
111agave
112iA Writer Mono V
113monoOne
114monofur
115mononoki
116saxMono

wezterm/bugabinga/code_fonts.csv

Modified

+110 / −110 text lines

1 1, Anonymous Pro
2 1, Anonymous Pro Minus
3 1, Aurulent Sans Mono
4 1, AverageMono
5 1, BPmono
6 1, BigBlue TerminalPlus
7 1, Bitstream Vera Sans Mono
8 1, Bront
9 1, CMU Typewriter Text
10 1, CPMono_v07
11 1, CamingoCode
12 1, Cascadia Code
13 1, Code New Roman
14 1, CodingFontTobi
15 1, Consola Mono
16 1, Courier Prime Code
17 1, Cousine
18 1, Crisp
19 1, Cutive Mono
20 1, D2Coding
21 1, DejaVu Sans Mono
22 1, Dina ttf 10px
23 1, Droid Sans Mono
24 1, Edlo
25 1, Envy Code R
26 1, Fantasque Sans Mono
27 1, Fira Code
28 1, Fira Mono
29 1, Fixedsys Excelsior 3.01
30 1, FreeMono
31 1, Geist Mono
32 1, Generic Mono II
33 1, GohuFont
34 1, Hack
35 1, Hasklig
36 10, Hermit
37 10, IBM Plex Mono
38 1, Inconsolata
39 1, Inconsolata LGC
40 1, Inconsolata-dz
41 1, Inconsolata-g
42 1, Intel One Mono
43 1, Iosevka
44 1, Iosevka Slab
45 1, JetBrains Mono
46 1, JetBrains Mono NL
47 1, Kawkab Mono
48 1, Latin Modern Mono Light
49 10, Lekton
50 1, Liberation Mono
51 1, Lilex
52 1, Linux Libertine Mono
53 1, Luculent
54 1, Luxi Mono
55 1, M+ 1m
56 1, M+ 1mn
57 1, M+ 2m
58 1, Martian Mono
59 1, Mensch
60 1, Meslo LG M DZ
61 1, Metrickal
62 1, Monaspace Argon Var
63 1, Monaspace Krypton Var
64 1, Monaspace Neon Var
65 1, Monaspace Radon Var
66 1, Monaspace Xenon Var
67 1, MonoSpatial
68 1, Monoid
69 1, Monospace
70 1, MonteCarlo Fixed 12
71 1, NanumGothic_Coding
72 1, NotCourierSans
73 1, Office Code Pro
74 1, Office Code Pro D
75 1, Oxygen Mono
76 1, PT Mono
77 1, Panic Sans
78 1, PixelCarnageMonoTT
79 1, Pointfree
80 1, ProFontWindows
81 1, ProggyCleanTT
82 1, ProggyCleanTTSZ
83 1, ProggySmallTT
84 1, ProggySquareTT
85 1, ProggySquareTTSZ
86 1, ProggyTinyTT
87 1, ProggyTinyTTSZ
88 1, Rec Mono Casual
89 1, Rec Mono Linear
90 1, Roboto Mono
91 1, SV Basic Manual
92 1, Share Tech Mono
93 1, Share-TechMonoTrue
94 1, SmallTypeWriting
95 1, Source Code Pro
96 1, Sudo
97 1, Symbols Nerd Font
98 1, Symbols Nerd Font Mono
99 1, TeX Gyre Cursor
100 1, Terminus
101 1, Ubuntu Mono
102 1, Verily Serif Mono
103 1, Victor Mono
104 1, Whois
105 1, agave
106 1, iA Writer Mono V
107 1, monoOne
108 1, monofur
109 1, mononoki
110 20, saxMono
11, Anonymous Pro
21, Anonymous Pro Minus
31, Aurulent Sans Mono
41, AverageMono
51, BPmono
61, BigBlue TerminalPlus
71, Bitstream Vera Sans Mono
81, Bront
91, CMU Typewriter Text
101, CPMono_v07
111, CamingoCode
121, Cascadia Code
131, Code New Roman
141, CodingFontTobi
151, Consola Mono
161, Courier Prime Code
171, Cousine
181, Crisp
191, Cutive Mono
201, D2Coding
211, DejaVu Sans Mono
221, Dina ttf 10px
231, Droid Sans Mono
241, Edlo
251, Envy Code R
261, Fantasque Sans Mono
271, Fira Code
281, Fira Mono
291, Fixedsys Excelsior 3.01
301, FreeMono
311, Geist Mono
3220, Generic Mono II
331, GohuFont
341, Hack
351, Hasklig
3611, Hermit
3711, IBM Plex Mono
381, Inconsolata
391, Inconsolata LGC
401, Inconsolata-dz
411, Inconsolata-g
421, Intel One Mono
431, Iosevka
441, Iosevka Slab
450, JetBrains Mono
460, JetBrains Mono NL
471, Kawkab Mono
481, Latin Modern Mono Light
4911, Lekton
501, Liberation Mono
511, Lilex
521, Linux Libertine Mono
531, Luculent
541, Luxi Mono
551, M+ 1m
561, M+ 1mn
571, M+ 2m
581, Martian Mono
591, Mensch
600, Meslo LG M DZ
611, Metrickal
621, Monaspace Argon Var
631, Monaspace Krypton Var
641, Monaspace Neon Var
651, Monaspace Radon Var
661, Monaspace Xenon Var
671, MonoSpatial
681, Monoid
691, Monospace
701, MonteCarlo Fixed 12
711, NanumGothic_Coding
721, NotCourierSans
731, Office Code Pro
741, Office Code Pro D
756, Oxygen Mono
761, PT Mono
771, Panic Sans
780, PixelCarnageMonoTT
791, Pointfree
801, ProFontWindows
811, ProggyCleanTT
821, ProggyCleanTTSZ
831, ProggySmallTT
841, ProggySquareTT
851, ProggySquareTTSZ
861, ProggyTinyTT
871, ProggyTinyTTSZ
881, Rec Mono Casual
891, Rec Mono Linear
901, Roboto Mono
911, SV Basic Manual
921, Share Tech Mono
931, Share-TechMonoTrue
941, SmallTypeWriting
951, Source Code Pro
961, Sudo
971, Symbols Nerd Font
981, Symbols Nerd Font Mono
991, TeX Gyre Cursor
1001, Terminus
1011, Ubuntu Mono
1020, Verily Serif Mono
1031, Victor Mono
1041, Whois
1051, agave
1061, iA Writer Mono V
1071, monoOne
1081, monofur
1091, mononoki
1100, saxMono

wezterm/bugabinga/fonts.lua

Modified

+1 / −1 text lines

11local wez = require 'wezterm'
33return function ( cfg )
4 local font_size = 16.0
4 local font_size = 11.0
55 local font = wez.font 'Cousine'
66 cfg.font = font
77 cfg.font_size = font_size

wezterm/bugabinga/key_binds.lua

Modified

+46 / −5 text lines

11local wez = require 'wezterm'
3local custom_action = function ( _ )
4 local id = 'custom-action-' .. tostring( wez.time.now() )
5 wez.on( id, _ )
6 return wez.action.EmitEvent( id )
7end
8
39local leader = { key = 'VoidSymbol', }
410if wez.target_triple:find 'windows' then
511 leader = { key = 'raw:255', }
612end
7local font_size_mode = ' Change Font Size (=-+)'
13local font_mode = ' Font mode (-=🠙🠛␡)'
814local pane_mode = ' Pane (hjklqr)'
915local resize_pane_mode = 'ﭕ Resize Pane (hjkl)'
17wez.on("inc-font-size", function(window)
18 local size = window:effective_config().font_size + 1
19 local overrides = window:get_config_overrides() or {}
20 overrides.font_size = size
21 window:set_config_overrides(overrides)
22end)
24wez.on("dec-font-size", function(window)
25 local size = window:effective_config().font_size - 1
26 local overrides = window:get_config_overrides() or {}
27 overrides.font_size = size
28 window:set_config_overrides(overrides)
29end)
1131local key_tables = {
1232 [resize_pane_mode] = {
1333 { key = 'h', action = wez.action.AdjustPaneSize { 'Left', 1, }, },
1838 -- Cancel the mode
1939 { key = 'Escape', action = 'PopKeyTable', },
2040 },
21 [font_size_mode] = {
22 { key = '-', action = wez.action.DecreaseFontSize, },
23 { key = '=', action = wez.action.IncreaseFontSize, },
41 [font_mode] = {
42 { key = '-', action = wez.action.EmitEvent 'dec-font-size', },
43 { key = '=', action = wez.action.EmitEvent 'inc-font-size', },
2444 { key = '0', action = wez.action.ResetFontSize, },
46 { key = 'UpArrow', action = wez.action.EmitEvent 'like-current-font' },
47 { key = 'DownArrow', action = wez.action.EmitEvent 'dislike-current-font' },
48 { key = 'Delete', action = wez.action.EmitEvent 'ban-current-font' },
2650 { key = 'Escape', action = 'PopKeyTable', },
2751 },
2852 [pane_mode] = {
4771 {
4872 key = '0',
4973 mods = 'LEADER',
50 action = wez.action.ActivateKeyTable { name = font_size_mode, one_shot = false, },
74 action = wez.action.ActivateKeyTable { name = font_mode, one_shot = false, },
5175 },
5276 {
5377 key = 'w',
91115 { Foreground = { AnsiColor = 'Purple', }, },
92116 { Text = 'New workspace:', },
93117 },
118 -- FIXME: move to workspace module and use emitevent instead of custom_action
94119 action = wez.action_callback( function ( window, pane, line )
95120 if line then
96121 window:perform_action(
154179 mods = 'LEADER',
155180 action = wez.action.QuitApplication,
156181 },
182 {
183 key = 'm',
184 mods = 'LEADER',
185 action = custom_action( function ( window, pane )
186 local unix_domain = 'unix'
187 wez.log_info( 'Current pane domain name: ', pane:get_domain_name() )
188 if pane:get_domain_name() == unix_domain then
189 wez.log_info( 'Detaching from: ', unix_domain )
190 window:perform_action( wez.action.DetachDomain { DomainName = unix_domain, }, pane )
191 else
192 wez.log_info( 'Switching to: ', unix_domain )
193 window:perform_action( wez.action.AttachDomain( unix_domain ), pane )
194 end
195 end ),
196 },
158199-- Navigate Tabs by LEADER+n
159200for i = 1, 8 do
160201 -- CTRL+ALT + number to activate that tab

wezterm/bugabinga/mouse_binds.lua

Modified

+1 / −0 text lines

33local bindings = {
44 {
55 event = { Down = { streak = 3, button = 'Left', }, },
6 -- FIXME: this needs integration in nushel
67 action = wez.action.SelectTextAtMouseCursor 'SemanticZone',
78 mods = 'NONE',
89 },

wezterm/bugabinga/options.lua

Modified

+27 / −19 text lines

11local wez = require 'wezterm'
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
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
22 cfg.unix_domains = {
23 {
24 name = 'unix',
25 no_serve_automatically = true, -- managed via systemd
26 -- multiplexing = "WezTerm",
27 local_echo_threshold_ms = 10,
28 },
29 }
2230end

wezterm/bugabinga/status.lua

Modified

+14 / −10 text lines

2222 local zoomed_state = zoomed( pane )
2323 local leader = nil
2424 if window:leader_is_active() then
25 leader = 'LEADER'
25 leader = '󱁐 '
2626 end
2727 local fonts = {}
2828 local config = window:effective_config()
3636 { Text = table.concat( fonts, ', ' ), },
3737 'ResetAttributes',
3838 }
39 local pane_domain = pane:get_domain_name()
40 local status = { '', }
41 local status = { '', }
4142 if leader then
4243 table.insert( status, leader )
4344 end
4748 if zoomed_state then
4849 table.insert( status, zoomed_state )
4950 end
50 if current_workspace then
51 table.insert( status, current_workspace )
52 end
53 if font then
54 table.insert( status, font )
55 end
52 local context = wez.format {
53 { Text = current_workspace, },
54 { Text = '@', },
55 { Attribute = { Intensity = 'Bold', }, },
56 { Text = pane_domain, },
57 'ResetAttributes',
58 }
59 table.insert( status, context )
61 table.insert( status, font )
5763 window:set_right_status( table.concat( status, DELIMITER ) )
5864 --TODO: shirley, something useful can be done here
6672 cfg.use_fancy_tab_bar = false
6773 cfg.tab_max_width = 42
6874 cfg.tab_bar_at_bottom = true
70
7175end

wezterm/wezterm.service

Modified

+1 / −2 text lines

11[Unit]
22Description=Wezterm Multiplexing Server
3After=gnome-session.target
54[Service]
65ExecStart=/usr/bin/wezterm-mux-server
76Restart=on-failure
98[Install]
10WantedBy=gnome-session.target
9WantedBy=default.target