repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

wezterm: adds workspace navigation with zoxide wezterm: remove multiplexing bs wezterm: default workspace on dotfiles neovim: adds ivy as fuzzy finder

87fc961565c5a2c43851342044a9eb3fe8dc11a7

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (12)

neovim/init.lua

Modified
77 77 require 'bugabinga.patterns'
78 78 require 'bugabinga.pairs'
79 79 require 'bugabinga.terminal'
80 +require 'bugabinga.fuzzy_find'
81 82 require 'bugabinga.incubator'

neovim/lua/bugabinga/fuzzy_find.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
3 +puk.defer 'ivy' ( function ( ivy )
4 + ivy.setup {
5 + backends = {
6 + { 'ivy.backends.files', { keymap = '<leader>f' } },
7 + { 'ivy.backends.rg', { keymap = '<leader>ff' } },
8 + { 'ivy.backends.buffers', { keymap = '<leader>fb' } },
9 + { 'ivy.backends.lsp-workspace-symbols', { keymap = '<leader>fs' } },
10 + { 'ivy.backends.cmd-history', { keymap = '<leader>fh' } },
11 + },
12 + mappings = vim.tbl_extend( 'force', config:get { 'mappings' }, {
13 + ['<esc>'] = 'destroy',
14 + } ),
15 + }
16 +end )

neovim/puk.nu

Modified
183 183 if $spec.build != null {
184 184 print $"Build step for plugin ($spec.name) detected! Executing now..."
185 185 cd $tmp_path
186 - run-external $spec.build.0 ...($spec.build | range 1.. )
186 + run-external $spec.build.0 ...($spec.build | slice 1.. )
188 188 $tmp_path

neovim/puk.plugins.nuon

Modified
338 338 master,
339 339 "ece818f909c6414cbad4e1fb240d87e003e10fda",
341 + ],
343 + ivy,
344 + github,
345 + AdeAttwood/ivy.nvim,
346 + 0.x,
347 + "006e4d9cede60b68898df7b8aa4b3976ff069fe9",
349 + cargo,
350 + build,
351 + --release

subversion/config.win32

Modified
103 103 # global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__
104 104 # *.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db
105 105 ### Set log-encoding to the default encoding for log messages
106 -log-encoding = utf-8
106 +#log-encoding = utf-8
107 107 ### Set use-commit-times to make checkout/update/switch/revert
108 108 ### put last-committed timestamps on every file touched.
109 109 # use-commit-times = yes

wezterm/bugabinga/dotfiles_workspace.lua

Added
new file mode 100644
1 +local wez = require 'wezterm'
2 +local is_win32 = wez.target_triple:match 'windows'
3 +local dotfiles_path = is_win32 and 'W:/dotfiles' or wez.home_dir .. '/Workspace/dotfiles'
5 +return function ( _ )
6 + wez.on( 'gui-startup', function ( cmd )
7 + local tab, command_pane, window = wez.mux.spawn_window( cmd or {
8 + workspace = 'dotfiles',
9 + cwd = dotfiles_path,
10 + } )
12 + local neovim_pane = command_pane:split {
13 + direction = 'Top',
14 + size = 0.92,
15 + args = { 'nvim', 'neovim', '-c', 'lua vim.api.nvim_set_current_dir("' .. dotfiles_path .. '/neovim' .. '")', },
16 + }
17 + local wezterm_pane = neovim_pane:split {
18 + size = 0.42,
19 + args = { 'nvim', 'wezterm', '-c', 'lua vim.api.nvim_set_current_dir("' .. dotfiles_path .. '/wezterm' .. '")', },
20 + }
21 + neovim_pane:activate()
22 + wez.mux.set_active_workspace 'dotfiles'
23 + window:gui_window():maximize()
24 + end )
25 +end

wezterm/bugabinga/hosts/NB-00718.lua

Modified
1 1 local code_font = require 'bugabinga.code_font'
3 -local wezterm = require 'wezterm'
4 -local mux = wezterm.mux
6 -wezterm.on('gui-startup', function(cmd)
7 - local tab, pane, window = mux.spawn_window(cmd or {})
8 - window:gui_window():maximize()
9 - -- Create a split occupying the right side of the screen
10 - pane:split { size = 0.42 }
11 - pane:activate()
12 -end)
14 3 return function ( cfg )
15 4 cfg.font_size = 13
16 5 cfg.font = code_font.random();

wezterm/bugabinga/hosts/fedora.lua

Modified
3 3 local code_font = require 'bugabinga.code_font'
5 5 return function ( cfg )
6 6 cfg.window_decorations = 'NONE'
7 7 cfg.font = code_font.random();
8 - cfg.unix_domains = {
9 - {
10 - name = 'unix',
11 - no_serve_automatically = true, -- managed via systemd
12 - },
13 - }
14 - cfg.default_domain = 'unix'

wezterm/bugabinga/hosts/x230.lua

Modified
4 4 local code_font = require 'bugabinga.code_font'
6 6 return function ( cfg )
7 7 cfg.window_decorations = 'NONE'
8 8 cfg.font_size = 13
9 9 cfg.font = code_font.random();
10 - cfg.unix_domains = {
11 - {
12 - name = 'unix',
13 - no_serve_automatically = true, -- managed via systemd
14 - },
15 - }
16 - cfg.default_domain = 'unix'

wezterm/bugabinga/key_binds.lua

Modified
1 1 local wez = require 'wezterm'
2 +-- FIXME: vendor in custom version of this plugin
3 +local workspace_switcher = wez.plugin.require 'https://github.com/MLFlexer/smart_workspace_switcher.wezterm'
3 5 local custom_action = function ( _ )
4 6 local id = 'custom-action-' .. tostring( wez.time.now() )
14 16 local pane_mode = ' Pane (hjklqr)'
15 17 local resize_pane_mode = 'ﭕ Resize Pane (hjkl)'
17 -wez.on("inc-font-size", function(window)
19 +wez.on( 'inc-font-size', function ( window )
18 20 local size = window:effective_config().font_size + 1
19 21 local overrides = window:get_config_overrides() or {}
20 22 overrides.font_size = size
21 - window:set_config_overrides(overrides)
22 -end)
23 + window:set_config_overrides( overrides )
24 +end )
24 -wez.on("dec-font-size", function(window)
26 +wez.on( 'dec-font-size', function ( window )
25 27 local size = window:effective_config().font_size - 1
26 28 local overrides = window:get_config_overrides() or {}
27 29 overrides.font_size = size
28 - window:set_config_overrides(overrides)
29 -end)
30 + window:set_config_overrides( overrides )
31 +end )
31 33 local key_tables = {
32 34 [resize_pane_mode] = {
39 41 { key = 'Escape', action = 'PopKeyTable', },
41 43 [font_mode] = {
42 - { key = '-', action = wez.action.EmitEvent 'dec-font-size', },
43 - { key = '=', action = wez.action.EmitEvent 'inc-font-size', },
44 - { key = '0', action = wez.action.ResetFontSize, },
44 + { key = '-', action = wez.action.EmitEvent 'dec-font-size', },
45 + { key = '=', action = wez.action.EmitEvent 'inc-font-size', },
46 + { 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' },
48 + { key = 'UpArrow', action = wez.action.EmitEvent 'like-current-font', },
49 + { key = 'DownArrow', action = wez.action.EmitEvent 'dislike-current-font', },
50 + { key = 'Delete', action = wez.action.EmitEvent 'ban-current-font', },
50 - { key = 'Escape', action = 'PopKeyTable', },
52 + { key = 'Escape', action = 'PopKeyTable', },
52 54 [pane_mode] = {
53 55 { key = 'h', action = wez.action.ActivatePaneDirection 'Left', },
147 149 key = 'PageUp',
148 - action = wez.action.ScrollByLine(-1),
150 + action = wez.action.ScrollByLine( -1 ),
151 153 key = 'PageDown',
152 - action = wez.action.ScrollByLine(1),
154 + action = wez.action.ScrollByLine( 1 ),
155 157 key = 'PageUp',
156 158 mods = 'SHIFT',
157 - action = wez.action.ScrollByPage(-0.42),
159 + action = wez.action.ScrollByPage( -0.42 ),
160 162 key = 'PageDown',
161 163 mods = 'SHIFT',
162 - action = wez.action.ScrollByPage(0.42),
164 + action = wez.action.ScrollByPage( 0.42 ),
165 167 key = 'p',
184 186 flags = 'FUZZY|LAUNCH_MENU_ITEMS',
190 + key = 'z',
191 + mods = 'LEADER',
192 + action = workspace_switcher.switch_workspace(),
193 + },
188 195 key = '/',
189 196 mods = 'LEADER',
200 207 action = wez.action.QuitApplication,
203 - key = 'm',
210 + key = 'k',
204 211 mods = 'LEADER',
205 - action = custom_action( function ( window, pane )
206 - local unix_domain = 'unix'
207 - wez.log_info( 'Current pane domain name: ', pane:get_domain_name() )
208 - if pane:get_domain_name() == unix_domain then
209 - wez.log_info( 'Detaching from: ', unix_domain )
210 - window:perform_action( wez.action.DetachDomain { DomainName = unix_domain, }, pane )
211 - else
212 - wez.log_info( 'Switching to: ', unix_domain )
213 - window:perform_action( wez.action.AttachDomain( unix_domain ), pane )
214 - end
215 - end ),
212 + action = wez.action.SwitchToWorkspace { name = 'dotfiles', },

wezterm/wezterm.lua

Modified
13 13 require 'bugabinga.launch' ( cfg )
14 14 require 'bugabinga.neovim_zen_mode' (cfg)
15 15 require 'bugabinga.hosts' ( cfg )
16 +require 'bugabinga.dotfiles_workspace' ( cfg )
17 18 -- logs key presses
18 19 -- cfg.debug_key_events = true,

wezterm/wezterm.service

Deleted
deleted file mode 100644
1 -[Unit]
2 -Description=Wezterm Multiplexing Server
4 -[Service]
5 -ExecStart=/usr/bin/wezterm-mux-server
6 -Restart=on-failure
8 -[Install]
9 -WantedBy=graphical-session.target