repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

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

d5d4565b72a09fbc93dcd2b964a8263a04b7ba6c

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (11)

neovim/.lsp.settings.lua

Modified
1 1 return {
2 2 LuaLS = {
3 3 Lua = {
4 - diagnostics = { globals = { 'vim', 'prequire' } },
5 4 runtime = { version = 'LuaJIT' },
6 - workspace = {},
5 + diagnostics = { globals = { 'vim', 'prequire' } },
6 + workspace = {
7 + checkThridParties = false,
8 + library = {
9 + '${3rd}/luv/library',
10 + unpack( vim.api.nvim_get_runtime_file( '', true ) ),
11 + },
12 + },

neovim/lua/bugabinga/options/behaviour.lua

Modified
57 57 -- integrate Nushell with nvim
58 58 vim.opt.shell = 'nu'
59 -vim.opt.shellcmdflag = '--commands'
60 -vim.opt.shellpipe = 'out+err>| save %s'
61 -vim.opt.shellredir = '| save %s'
62 -vim.opt.shellquote = ''
59 +vim.opt.shellcmdflag = '--stdin --no-newline --commands'
60 +vim.opt.shellredir = 'out+err> %s'
61 +vim.opt.shellpipe = '| complete | update stderr { ansi strip } | tee { get stderr | save --force --raw %s} | into record'
62 +vim.opt.shelltemp = false
63 63 vim.opt.shellxquote = ''
64 +vim.opt.shellxescape = ''
65 +vim.opt.shellquote = ''
65 67 require 'bugabinga.health'.add_dependency

nushell/gen-aliases.nu

Modified
31 31 aka vim nvim
32 32 aka code nvim
33 +aka vide neovide
33 34 aka edit nvim '--clean'
34 35 aka ed nvim '--clean'
35 36 aka vi nvim '--clean'

topgrade/topgrade.linux.toml

Modified
1 1 [misc]
2 -# Disable specific steps - same options as the command line flag
3 -disable = ["restarts", "vim"]
2 +disable = ["vim"]
5 3 assume_yes = true
7 -# Run specific steps - same options as the command line flag
8 -#only = ["system", "emacs"]
10 -# Do not ask to retry failed steps (default: false)
11 4 no_retry = true
13 -# Do not set the terminal title
14 5 set_title = true
16 -# Display the time in step titles
17 6 display_time = true
19 -# Cleanup temporary or old files
20 7 cleanup = true
22 9 [composer]
23 10 self_update = false
25 12 [git]
26 -# Additional git repositories to pull
27 -repos = ["/home/oli/Workspace/*", "/home/oli/Source/*"]
13 +repos = ["/home/oli/Source/*", "/home/oli/Notes"]
14 +arguments = "--ff --rebase"
29 15 max_concurrency = 12
31 16 pull_predefined = false
33 -# Arguments to pass Git when pulling Repositories
34 -# arguments = "--ff --rebase"
36 -# Commands to run before anything
37 -[pre_commands]
38 -"00 - Create BTRFS snapshot" = "echo TODO"
40 -# Custom commands
41 -[commands]
43 -# Updating my configuration files
44 -"00 - Refresh Dotfiles" = "java ~/Workspace/dotfiles/bootstripper.java ~/Workspace/dotfiles"
46 -# install tools from cargo, that are not already in path
47 -"01 - Install Cargo Tools" = "cd ~/Workspace/dotfiles/tools ; java ~/Workspace/dotfiles/tools/install.java"

wezterm/bugabinga/code_font.lua

Modified
2 2 local wez = require 'wezterm'
4 4 return {
5 5 random = function ()
6 + local selected = 'JetBrains Mono' -- safe default, because built in to wezterm
6 7 local font_names = {}
7 - local nerdfonts = io.open( wez.config_dir .. '/bugabinga/code_fonts', 'r' )
8 - if nerdfonts then
9 - for font_name in nerdfonts:lines() do
10 - if not font_name:match '^#.*' then
11 - table.insert( font_names, font_name )
8 + local weights = {}
9 + local total_weight = 1 -- to account for luas 1 based indexing
10 + local code_fonts = io.open( wez.config_dir .. '/bugabinga/code_fonts.csv', 'r' )
12 + if code_fonts then
13 + for line in code_fonts:lines() do
14 + local weight, font_name = line:match '^%s*(%d*)%s*,%s*(.*)%s*$'
15 + table.insert( font_names, font_name )
16 + table.insert( weights, tonumber( weight ) )
17 + total_weight = total_weight + weight
18 + end
19 + code_fonts:close()
21 + local random_weight = math.random( total_weight )
22 + local cursor = 0
23 + for idx, weight in ipairs( weights ) do
24 + cursor = cursor + weight
25 + if cursor >= random_weight then
26 + selected = font_names[idx]
27 + break
14 - local random_font = font_names[math.random( #font_names )]
15 - return wez.font( random_font )
17 - return wez.font 'JetBrains Mono'
32 + return wez.font( selected )
18 33 end,

wezterm/bugabinga/code_fonts.csv

Added
new file mode 100644
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

wezterm/bugabinga/hosts/NB-00718.lua

Modified
1 1 local code_font = require 'bugabinga.code_font'
2 3 return function ( cfg )
3 - cfg.default_domain = 'WSL:Fedora'
4 - cfg.default_mux_server_domain = 'WSL:Fedora'
4 + cfg.font = code_font.random();
6 + cfg.default_domain = { 'WSL:Fedora', }
7 + cfg.default_mux_server_domain = { 'WSL:Fedora', }
5 8 cfg.default_prog = { 'powershell', '-NoLogo', }
7 10 cfg.font_size = 13

wezterm/bugabinga/key_binds.lua

Modified
7 7 local font_size_mode = ' Change Font Size (=-+)'
8 8 local pane_mode = ' Pane (hjklqr)'
9 9 local resize_pane_mode = 'ﭕ Resize Pane (hjkl)'
10 -local navigate_forward_mode = ' Navigate forward (bw)'
11 -local navigate_backward_mode = ' Navigate backward (bw)'
13 11 local key_tables = {
14 12 [resize_pane_mode] = {
21 19 { key = 'Escape', action = 'PopKeyTable', },
23 21 [font_size_mode] = {
24 - { key = 'j', action = wez.action.DecreaseFontSize, },
25 - { key = 'k', action = wez.action.IncreaseFontSize, },
26 - { key = '=', action = wez.action.ResetFontSize, },
22 + { key = '-', action = wez.action.DecreaseFontSize, },
23 + { key = '=', action = wez.action.IncreaseFontSize, },
24 + { key = '0', action = wez.action.ResetFontSize, },
28 26 { key = 'Escape', action = 'PopKeyTable', },
32 30 { key = 'j', action = wez.action.ActivatePaneDirection 'Down', },
33 31 { key = 'k', action = wez.action.ActivatePaneDirection 'Up', },
34 32 { key = 'l', action = wez.action.ActivatePaneDirection 'Right', },
33 + { key = 'a', action = wez.action.PaneSelect, },
36 35 { key = 'v', action = wez.action.SplitHorizontal { domain = 'CurrentPaneDomain', }, },
37 36 { key = 's', action = wez.action.SplitVertical { domain = 'CurrentPaneDomain', }, },
43 42 { key = 'Escape', action = 'PopKeyTable', },
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 - },
67 46 local keys = {
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 - },
79 48 key = '0',
80 49 mods = 'LEADER',
85 54 mods = 'LEADER',
86 55 action = wez.action.ActivateKeyTable { name = pane_mode, },
88 - {
89 - key = 'a',
90 - mods = 'LEADER',
91 - action = wez.action.PaneSelect,
92 - },
94 58 key = 'f',
95 59 mods = 'LEADER',
111 75 action = wez.action.ShowDebugOverlay,
114 - key = 'u',
78 + key = '.',
115 79 mods = 'LEADER',
116 80 action = wez.action.CharSelect {
117 81 copy_on_select = true,
118 82 copy_to = 'ClipboardAndPrimarySelection',
85 + {
86 + key = 'n',
87 + mods = 'LEADER',
88 + action = wez.action.PromptInputLine {
89 + description = wez.format {
90 + { Attribute = { Intensity = 'Bold', }, },
91 + { Foreground = { AnsiColor = 'Purple', }, },
92 + { Text = 'New workspace:', },
93 + },
94 + action = wez.action_callback( function ( window, pane, line )
95 + if line then
96 + window:perform_action(
97 + wez.action.SwitchToWorkspace { name = line, },
98 + pane
99 + )
100 + end
101 + end ),
102 + },
103 + },
122 105 key = 'c',
123 106 mods = 'CTRL|SHIFT',
137 120 key = 'p',
138 121 mods = 'LEADER',
139 - action = wez.action.ActivateCommandPalette,
122 + action = wez.action.ShowLauncherArgs {
123 + title = '🔭 Launcher',
124 + flags = 'FUZZY|DOMAINS|KEY_ASSIGNMENTS|COMMANDS',
125 + },
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',
128 + key = 'Tab',
158 129 mods = 'LEADER',
159 130 action = wez.action.ShowLauncherArgs {
160 131 flags = 'FUZZY|WORKSPACES',
164 135 key = 'd',
165 136 mods = 'LEADER',
166 137 action = wez.action.ShowLauncherArgs {
138 + title = '󰮫 Menu',
167 139 flags = 'FUZZY|LAUNCH_MENU_ITEMS',
169 - }, {
141 + },
170 143 key = '/',
171 144 mods = 'LEADER',
172 145 action = wez.action.Search 'CurrentSelectionOrEmptyString',

wezterm/bugabinga/launch.lua

Modified
31 31 label = 'Weather',
32 - args = { 'wthrr' },
32 + args = { 'nu', '-c', 'loop {clear; wthrr --forecast today; sleep 15sec}', },
33 33 cwd = wez.home_dir,

wezterm/bugabinga/mouse_binds.lua

Added
new file mode 100644
1 +local wez = require 'wezterm'
3 +local bindings = {
4 + {
5 + event = { Down = { streak = 3, button = 'Left', }, },
6 + action = wez.action.SelectTextAtMouseCursor 'SemanticZone',
7 + mods = 'NONE',
8 + },
9 +}
10 +return function ( cfg )
11 + cfg.mouse_bindings = bindings
12 +end

wezterm/wezterm.lua

Modified
8 8 require 'bugabinga.status' ( cfg )
9 9 require 'bugabinga.theme' ( cfg )
10 10 require 'bugabinga.key_binds' ( cfg )
11 +require 'bugabinga.mouse_binds' ( cfg )
11 12 require 'bugabinga.hosts' ( cfg )
12 13 require 'bugabinga.launch' ( cfg )
13 14 require 'bugabinga.neovim_zen_mode'