repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

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

b1f3fe131f7ecee1799f8566755dbdc38df184c2

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (14)

+105 / −351 text lines

Diff layout

git/gitconfig

Modified

+34 / −34 text lines

11[user]
2 name = Oliver Jan Krylow
3 email = oliver@bugabinga.net
2 name = Oliver Jan Krylow
3 email = oliver@bugabinga.net
55[core]
6 editor = nvim
7 quotepath = false
8 autocrlf = input
9 pager = delta
10 safecrlf = false
11 symlinks = true
12 fscache = true
6 editor = nvim
7 quotepath = false
8 autocrlf = input
9 pager = delta
10 safecrlf = false
11 symlinks = true
12 fscache = true
1313 preloadIndex = true
1515[help]
2323 autosquash = true
2525[diff]
26 colorMoved = default
27 tool = difftastic
26 colorMoved = default
27 tool = difftastic
2929[difftool]
30 prompt = false
30 prompt = false
3232[difftool "meld"]
33 cmd = "meld \"$LOCAL\" \"$REMOTE\""
33 cmd = "meld \"$LOCAL\" \"$REMOTE\""
3535[difftool "difftastic"]
36 cmd = "difft \"$LOCAL\" \"$REMOTE\""
36 cmd = "difft \"$LOCAL\" \"$REMOTE\""
3838[pager]
39 difftool = true
39 difftool = true
4141[merge]
42 tool = nvim_merge
42 tool = nvim_merge
4444[mergetool]
45 keepBackup = false
46 prompt = false
45 keepBackup = false
46 prompt = false
4848[mergetool "meld_merge"]
49 cmd = "meld \"$LOCAL\" \"$MERGED\" \"$REMOTE\" "
49 cmd = "meld \"$LOCAL\" \"$MERGED\" \"$REMOTE\" "
5151[mergetool "nvim_merge"]
52 cmd = "nvim -d \"$LOCAL\" \"$MERGED\" \"$REMOTE\" "
52 cmd = "nvim -d \"$LOCAL\" \"$MERGED\" \"$REMOTE\" "
5454[push]
55 autoSetupRemote = true
56 default = "upstream"
55 autoSetupRemote = true
56 default = "upstream"
5858[pull]
59 rebase = false
59 rebase = false
6161[interactive]
62 diffFilter = delta --color-only
62 diffFilter = delta --color-only
6464[delta]
65 side-by-side = true
66 line-numbers = true
67 decorations = true
68 navigate = true
69 syntax-theme = none
65 side-by-side = true
66 line-numbers = true
67 decorations = true
68 navigate = true
69 syntax-theme = none
7171[interactive]
72 diffFilter = delta --color-only
72 diffFilter = delta --color-only
7474[init]
75 defaultBranch = trunk
75 defaultBranch = trunk
7777[commit]
78 verbose = true
78 verbose = true
8080[help]
8181 # try to automatically correct mispelled git commands
82 autocorrect = 7
82 autocorrect = 7
8484# In order to have host-specific configuration, I include additional settings here.
8585# On each host a different file might be symlinked into '.gitconfig.include'.
8686[include]
87 path = .gitconfig.include
87 path = .gitconfig.include

neovim/init.lua

Modified

+3 / −0 text lines

88-- ▀▀▀ █ █ ██ █
99-- ▀ ▀
11-- enable lua bytecode caching
12vim.loader.enable()
1114-- setup debug mode
1215-- require 'std.debug'.toggle()

neovim/lua/bugabinga/editorconfig.lua

Modified

+2 / −2 text lines

3131editorconfig.properties.diagnostic = function ( bufnr, value )
3232 local option = tobool( value )
3333 if option then
34 vim.diagnostic.enable( bufnr )
34 vim.diagnostic.enable( true, { bufnr = bufnr, } )
3535 else
36 vim.diagnostic.disable( bufnr )
36 vim.diagnostic.enable( false, { bufnr = bufnr } )
3737 end
3838end

neovim/lua/bugabinga/plugins/lint.lua

Modified

+3 / −2 text lines

99 },
1010 opts = {
1111 linters_by_ft = {
12 lua = { 'luacheck', },
12 lua = { 'selene', },
1313 sh = { 'shellcheck', },
14 nu = { 'nu-check', },
14 -- TODO make this linter
15 -- nu = { 'nu-check', },
1516 },
1617 linters = {},
1718 },

nushell/config.nu

Modified

+10 / −200 text lines

11# Nushell Config File
2use table.nu *
3use os.nu *
4use prompt.nu *
5use aliases.nu *
6use todo.nu
7use openssl.nu *
2use modules/table.nu *
3use modules/os.nu *
4use modules/prompt.nu *
5use modules/aliases.nu *
6use modules/todo.nu
7use modules/openssl.nu *
8use modules/md.nu
10# TODO: use nugu colors
911# for more information on themes see
1012# https://github.com/nushell/nushell/blob/main/docs/How_To_Coloring_and_Theming.md
1113let default_theme = {
7981 quick: true # set this to false to prevent auto-selecting completions when only one remains
8082 partial: true # set this to false to prevent partial filling of the prompt
8183 }
82 hooks: {
83 pre_prompt: [{||
84 if (which direnv | is-empty) {
85 return
86 }
87 direnv export json | from json | default {} | load-env
88 }]
89 }
9084 float_precision: 2
9185 use_ansi_coloring: true
9286 filesize: {
9993 max_size: 10000
10094 sync_on_enter: true # Enable to share the history between multiple sessions, else you have to close the session to persist history to file
10195 }
102 menus: [
103 # Configuration for default nushell menus
104 # Note the lack of source parameter
105 {
106 name: completion_menu
107 only_buffer_difference: false
108 marker: "| "
109 type: {
110 layout: columnar
111 columns: 4
112 # col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
113 col_padding: 2
114 }
115 style: {
116 text: green
117 selected_text: green_reverse
118 description_text: yellow
119 }
120 }
121 {
122 name: history_menu
123 only_buffer_difference: true
124 marker: "? "
125 type: {
126 layout: list
127 page_size: 10
128 }
129 style: {
130 text: green
131 selected_text: green_reverse
132 description_text: yellow
133 }
134 }
135 {
136 name: help_menu
137 only_buffer_difference: true
138 marker: "? "
139 type: {
140 layout: description
141 columns: 4
142 col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
143 col_padding: 2
144 selection_rows: 4
145 description_rows: 10
146 }
147 style: {
148 text: green
149 selected_text: green_reverse
150 description_text: yellow
151 }
152 }
153 # Example of extra menus created using a nushell source
154 # Use the source field to create a list of records that populates
155 # the menu
156 {
157 name: commands_menu
158 only_buffer_difference: false
159 marker: "# "
160 type: {
161 layout: columnar
162 columns: 4
163 col_width: 20
164 col_padding: 2
165 }
166 style: {
167 text: green
168 selected_text: green_reverse
169 description_text: yellow
170 }
171 source: { |buffer, position|
172 $nu.scope.commands
173 | where command =~ $buffer
174 | each { |it| {value: $it.command description: $it.usage} }
175 }
176 }
177 {
178 name: vars_menu
179 only_buffer_difference: true
180 marker: "# "
181 type: {
182 layout: list
183 page_size: 10
184 }
185 style: {
186 text: green
187 selected_text: green_reverse
188 description_text: yellow
189 }
190 source: { |buffer, position|
191 $nu.scope.vars
192 | where name =~ $buffer
193 | sort-by name
194 | each { |it| {value: $it.name description: $it.type} }
195 }
196 }
197 {
198 name: commands_with_description
199 only_buffer_difference: true
200 marker: "# "
201 type: {
202 layout: description
203 columns: 4
204 col_width: 20
205 col_padding: 2
206 selection_rows: 4
207 description_rows: 10
208 }
209 style: {
210 text: green
211 selected_text: green_reverse
212 description_text: yellow
213 }
214 source: { |buffer, position|
215 $nu.scope.commands
216 | where command =~ $buffer
217 | each { |it| {value: $it.command description: $it.usage} }
218 }
219 }
220 ]
221 keybindings: [
222 {
223 name: completion_menu
224 modifier: none
225 keycode: tab
226 mode: emacs # Options: emacs vi_normal vi_insert
227 event: {
228 until: [
229 { send: menu name: completion_menu }
230 { send: menunext }
231 ]
232 }
233 }
234 {
235 name: completion_previous
236 modifier: shift
237 keycode: backtab
238 mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list
239 event: { send: menuprevious }
240 }
241 {
242 name: history_menu
243 modifier: control
244 keycode: char_x
245 mode: emacs
246 event: {
247 until: [
248 { send: menu name: history_menu }
249 { send: menupagenext }
250 ]
251 }
252 }
253 {
254 name: history_previous
255 modifier: control
256 keycode: char_z
257 mode: emacs
258 event: {
259 until: [
260 { send: menupageprevious }
261 { edit: undo }
262 ]
263 }
264 }
265 # Keybindings used to trigger the user defined menus
266 {
267 name: commands_menu
268 modifier: control
269 keycode: char_t
270 mode: [emacs, vi_normal, vi_insert]
271 event: { send: menu name: commands_menu }
272 }
273 {
274 name: vars_menu
275 modifier: control
276 keycode: char_y
277 mode: [emacs, vi_normal, vi_insert]
278 event: { send: menu name: vars_menu }
279 }
280 {
281 name: commands_with_description
282 modifier: control
283 keycode: char_u
284 mode: [emacs, vi_normal, vi_insert]
285 event: { send: menu name: commands_with_description }
286 } ]
28998# must be done, after defining config, since zoxide mutates it
290use zoxide.nu *
99# this will fail if zoxide is not installed yet
100source ($nu.config-path | path dirname | path join "zoxide.nu")

nushell/env.nu

Modified

+4 / −13 text lines

33$env.WIN32 = ( $nu.os-info.name =~ "windows" )
44$env.NURC_DIR = ( $nu.config-path | path expand | path dirname )
55$env.DOTFILES = ( $env.NURC_DIR | path join ".." | path expand )
6$env.WORKSPACE = if $env.WIN32 { "W:/" } else { "~/Workspace" | path expand }
7$env.NOTES = if $env.WIN32 { "N:/" } else { "~/Notes" | path expand }
6$env.WORKSPACE = if $env.WIN32 { "~/Workspaces" } else { "~/Workspace" | path expand }
7$env.NOTES = ("~/Notes" | path expand)
8$env.TOOLS = ("~/Tools" | path expand)
910if not (which nvim | is-empty) {
1011 $env.EDITOR = 'nvim'
1819if ($env | get -i TERM_PROGRAM) == WezTerm {
19 $env.TERM = "wezterm"
20 if not $env.WIN32 {
21 $env.TERMCAP = ~./termcap/w/wezterm
22 }
20 $env.TERM = "xterm-256color"
2523# theme for ls and other programs, that use LS_COLORS
3937 to_string: { |v| $v | str join (char esep) }
4038 }
43# Directories to search for scripts when calling source or use
44$env.NU_LIB_DIRS = [
45 ($nu.config-path | path dirname | path join 'modules'),
46 ($nu.config-path | path dirname | path join 'completions')
47]

nushell/modules/md.nu

Added
new file mode 100644

+5 / −0 text lines

1# create new directory and change into to.
2export def --env main [ p:path ] {
3 mkdir $p
4 cd $p
5}

nushell/modules/prompt.nu

Modified

+7 / −4 text lines

3333 }
36def prompt-git-branch [] {
37}
3639def get_vcs_path [] {
3740 #normalize path
3841 let pwd = ($env.PWD | path expand)
4043 let svn_relative_cmd = ( do --ignore-errors { ^svn info --show-item relative-url --no-newline $pwd | complete } )
4144 let svn_relative_path = if ( (not ($svn_relative_cmd | is-empty)) and ($svn_relative_cmd.exit_code == 0)) { $" 🐢 (char nf_branch) ($svn_relative_cmd.stdout)" }
43 let git_status = ( do --ignore-errors { gstat } )
44 let git_branch = if ( ( not ($git_status | is-empty)) and ($git_status.branch != "no_branch") ) { $" (char nf_git) (char nf_branch) ($git_status.branch)" }
46 let git_branch_cmd = ( do -i { ^git rev-parse --abbrev-ref HEAD | complete } )
47 let git_path = if (not ($git_branch_cmd | is-empty) and ($git_branch_cmd.exit_code == 0)) { $" (char nf_git) (char nf_branch) ($git_branch_cmd.stdout | str trim -r)" }
4649 [
4750 $svn_relative_path
48 $git_branch
51 $git_path
4952 ] | str join
8790 $command_status_segment
8891 (ansi reset)
8992 (ansi dark_gray)
90 ( if (sys).host.hostname == "x230" { (akku) } else { $time_segment })
93 ( if (sys host).hostname == "x230" { (akku) } else { $time_segment })
9194 (ansi reset)
9295 ] | str join

nushell/modules/zoxide.nu

Deleted
deleted file mode 100644

+0 / −59 text lines

1# Code generated by zoxide. DO NOT EDIT.
2
3# =============================================================================
4#
5# Hook configuration for zoxide.
6#
7
8# Initialize hook to add new entries to the database.
9export-env {
10 $env.config = ($env | default {} config).config
11 $env.config = ($env.config | default {} hooks)
12 $env.config = ($env.config | update hooks ($env.config.hooks | default [] pre_prompt))
13 $env.config = ($env.config | update hooks.pre_prompt ($env.config.hooks.pre_prompt | append { ||
14 zoxide add -- $env.PWD
15 }))
16}
18# =============================================================================
19#
20# When using zoxide with --no-cmd, alias these internal functions as desired.
21#
23# Jump to a directory using only keywords.
24export def --env __zoxide_z [...rest:string] {
25 # `z -` does not work yet, see https://github.com/nushell/nushell/issues/4769
26 let arg0 = ($rest | append '~').0
27 let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
28 $arg0
29 } else {
30 (zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n")
31 }
32 cd $path
33}
35# Jump to a directory using interactive search.
36export def --env __zoxide_zi [...rest:string] {
37 cd $'(zoxide query -i -- ...$rest | str trim -r -c "\n")'
38}
40# =============================================================================
41#
42# Commands for zoxide. Disable these using --no-cmd.
43#
45export alias z = __zoxide_z
46export alias zi = __zoxide_zi
48# =============================================================================
49#
50# Add this to your env file (find it by running `$nu.env-path` in Nushell):
51#
52# zoxide init nushell --hook prompt | save ~/.zoxide.nu
53#
54# Now, add this to the end of your config file (find it by running
55# `$nu.config-path` in Nushell):
56#
57# source ~/.zoxide.nu
58#
59# Note: zoxide only supports Nushell v0.63.0 and above.

tools/cargo-tools.nu

Modified

+23 / −23 text lines

66# is not installed yet
77let cargo_crates = [
88 [ name bin crago_args];
9 [ "inferno" "inferno-flamegraph" [] ]
10 [ "nu" "nu" [ "--features" "extra" ] ]
11 [ "sd" "sd" [] ]
12 [ "ouch" "ouch" [] ]
13 [ "fd-find" "fd" [] ]
14 [ "choose", "choose", [] ]
15 [ "ripgrep" "rg" [] ]
16 [ "eva" "eva" [] ]
17 [ "mdcat" "mdcat" [] ]
18 [ "cargo-update" "cargo-install-update" [] ]
9 [ "bat" "bat" [] ]
10 [ "bottom" "btm" [] ]
1911 [ "cargo-cache" "cargo-cache" [] ]
12 [ "cargo-update" "cargo-install-update" [] ]
13 [ "choose", "choose", [] ]
14 [ "eva" "eva" [] ]
15 [ "eva" "eva" [] ]
16 [ "fd-find" "fd" [] ]
17 [ "git-delta" "delta" [] ]
18 [ "gitu" "gitu" [ "--locked" ] ]
2019 [ "hexyl" "hexyl" [] ]
2120 [ "hyperfine" "hyperfine" [] ]
22 [ "tealdeer" "tldr" [] ]
23 [ "tokei" "tokei" [] ]
24 [ "bat" "bat" [] ]
25 [ "pastel" "pastel" [] ]
26 [ "zoxide" "zoxide" [] ]
27 [ "lychee" "lychee" [] ]
28 [ "viu" "viu" [] ]
29 [ "vivid" "vivid" [] ]
30 [ "bottom" "btm" [] ]
3121 [ "just" "just" [] ]
22 [ "lms" "lms" [] ]
23 [ "lychee" "lychee" [ "--locked" "--no-default-features" "--features" "rustls-tls,email-check"] ]
24 [ "mdcat" "mdcat" [] ]
3225 [ "mdsh" "mdsh" [] ]
33 [ "git-delta" "delta" [] ]
26 [ "nu" "nu" [ "--features" "extra" ] ]
27 [ "ouch" "ouch" [] ]
28 [ "pastel" "pastel" [] ]
29 [ "ripgrep" "rg" [] ]
30 [ "sd" "sd" [] ]
3431 [ "selene" "selene" [ "--no-default-features" ] ]
3532 [ "stylua" "stylua" [ "--features" "lua52" ] ]
3633 [ "taplo-cli" "taplo" [] ]
37 [ "lms" "lms" [] ]
38 [ "gitu" "gitu" [ "--locked" ] ]
39 [ "yazi-fm" "yazi" [ "--locked" ] ]
34 [ "tealdeer" "tldr" [] ]
35 [ "tokei" "tokei" [] ]
36 [ "viu" "viu" [] ]
37 [ "vivid" "vivid" [] ]
4038 [ "yazi-cli" "ya" [ "--locked" ] ]
39 [ "yazi-fm" "yazi" [ "--locked" ] ]
40 [ "zoxide" "zoxide" [] ]
4343# install all my favorite crate, only if they are not already in PATH.

topgrade/topgrade.linux.toml

Modified

+0 / −1 text lines

4444"00 - Refresh Dotfiles" = "java ~/Workspace/dotfiles/bootstripper.java ~/Workspace/dotfiles"
4646# install tools from cargo, that are not already in path
47# TODO: this could be annoying when setting up a machine first time?
4847"01 - Install Cargo Tools" = "nu --env-config ~/.config/nushell/env.nu ~/Workspace/dotfiles/tools/cargo-tools.nu"

topgrade/topgrade.windows.toml

Modified

+2 / −3 text lines

2525[git]
2626# Additional git repositories to pull
27repos = ["W:/*/"]
27repos = ["C:/Users/okr/Workspaces/*/"]
2929max_concurrency = 12
3939# Commands to run before anything
4040[pre_commands]
41"01 - Scoop Export" = "scoop export --config > 'X:/scoop_installed_apps.json' *> $null"
41"01 - Winget Export" = "winget export --disable-interactivity --accept-source-agreements --output 'C:/Users/okr/Tools/winget_installed_apps.json' *> $null"
4343[commands]
44"00 - Register Nu Plugins" = "nu -c 'register ~\\scoop\\apps\\nu\\current\\nu_plugin_gstat.exe'"
4544"10 - Refresh dotfiles" = "java W:/dotfiles/bootstripper.java W:/dotfiles"
4645"20 - Install Cargo Tools" = "nu --env-config ~/AppData/Roaming/nushell/env.nu W:/dotfiles/tools/cargo-tools.nu"
4746"30 - Advantage-PM Client" = "nu X:/update_apm_client.nu"

wezterm/bugabinga/workspaces.lua

Modified

+7 / −5 text lines

55local get_my_code_workspace = function()
66 if win32 then
7 return 'W:/'
7 return wez.home_dir .. '/Workspaces'
88 else
9 return os.getenv 'HOME' .. '/Workspace'
9 return wez.home_dir .. '/Workspace'
1010 end
1111end
5959end
6161wez.on('gui-attached', function()
62 -- setup_workspaces()
6263 maximize_window()
6364end)
6566-- NOTE(oli): errors in here do not show up as configuration errors
6667-- check the log file in the wezterm mux server runtime directory
6768-- e.g. /run/user/1000/wezterm/log
68wez.on('mux-startup', function()
69 setup_workspaces()
70end)
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/wezterm.lua

Modified

+5 / −5 text lines

1616-- local font = wez.font 'IBM Plex Mono'
1717local font = wez.font 'Cousine'
1818if hostname == 'x230' then
19 font_size = 13
19 font_size = 11
2020 enable_wayland = true
2121elseif hostname == 'NB-00718' then
22 font_size = 15
22 font_size = 13
2323elseif hostname == 'fedora' then
2424 font_size = 13
2525 local font_names = {}
102102 default_prog = { 'nu', '--login' },
103103 default_cursor_style = 'SteadyBlock',
105 exec_domains = not win32 and exec_domains or {},
106 unix_domains = { { name = 'mux' } },
107 default_gui_startup_args = { 'connect', 'mux' },
105 exec_domains = exec_domains,
106 -- unix_domains = { { name = 'mux' } },
107 -- default_gui_startup_args = { 'connect', 'mux' },
109109 font = font,
110110 font_size = font_size,