dotfiles
bugabingas dorkfiles
owned by bugabinga
package.nu: provisioning packages
d17dfa64cfb2f4e2444b8dc13456d1e4786b4806
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (17)
NB-00718.symlinks
Modifiednew file mode 160000 1 +Subproject commit 569b9633c1a4d46d1715853f793053aa9ca0be43
20 23 ~/.local/bin/svn.merge
23 -~/.local/bin/git-info
26 26 ~/.cargo/config.toml
helix/config.toml
Modified 4 4 shell = [
"nu",
"--commands"]
neovim/lua/bugabinga/key_preview.lua
Modified16 16 {
mode =
'i',
keys =
'<C-x>' },
19 + {
mode =
'n',
keys =
'[' },
20 + {
mode =
'n',
keys =
']' },
19 23 {
mode =
'n',
keys =
'g' },
20 24 {
mode =
'x',
keys =
'g' },
neovim/lua/bugabinga/options/keymaps.lua
Modified 1 1 local map
= require 'std.map' 2 -local const
= require 'std.const' 3 2 local togglers
= require 'bugabinga.options.togglers' 34 + description =
'Keep visual selection when indenting',
41 + description =
'Keep visual selection when outdenting',
35 48 description =
'Dismiss current search highlight',
36 49 category =
'search',
54 67 keys
= '<leader>tt',
55 68 command = function()
56 - if vim.opt.background:get()
== 'dark' then 69 + if vim.opt.background:get()
== 'dark' then 57 70 vim.opt.background
= 'light' 59 72 vim.opt.background
= 'dark' 61 - vim.notify(
'Toggled background to ' .. vim.opt.background:get()
.. '.')
74 + vim.notify(
'Toggled background to ' .. vim.opt.background:get()
.. '.')
neovim/lua/bugabinga/textobjects.lua
Modified 17 17 [
'ac']
= {
query =
'@comment.outer',
description =
'outer comment' },
18 18 [
'ic']
= {
query =
'@comment.inner',
description =
'inner comment' },
20 + [
'al']
= {
query =
'@loop.outer',
description =
'outer loop' },
21 + [
'il']
= {
query =
'@loop.inner',
description =
'inner loop' },
23 + [
'ab']
= {
query =
'@block.outer',
description =
'outer block' },
24 + [
'ib']
= {
query =
'@block.inner',
description =
'inner block' },
26 + [
'as']
= {
query =
'@statement.outer',
description =
'outer statement' },
27 + [
'is']
= {
query =
'@statement.inner',
description =
'inner statement' },
29 + [
'at']
= {
query =
'@class.outer',
description =
'outer class' },
30 + [
'it']
= {
query =
'@class.inner',
description =
'inner class' },
21 33 for keys, maps
in pairs(textobject_select_keymaps)
do nushell/modules/package/folders.nu
Modified28 -const database =
$package_home ++
'/Database' 29 -export def database [] {
34 28 const programs =
$package_home ++
'/Programs' 35 29 export def programs [] {
nushell/modules/package/installer.nu
Modifiednushell/modules/package/lib.nu
Modified 55 +export def type-check [
56 + expected_type: string
58 + let actual_type = (
$in | describe)
59 + if (
$actual_type !=
$expected_type) {
63 + text: $
'Expected ($expected_type) type, but was ($actual_type)' 64 + span: (metadata
$in).span
nushell/modules/package/manifestor.nu
Modified101 -]: string -> string {
102 103 if (
$in | is-not-empty) {
103 - str replace --all
$version "{ version }" 104 + $in | type-check
'string' 105 + $in | str replace --all
$version "{ version }" 133 135 use ./native-package-manager
135 137 mut version = github fetch-latest-release-version
$org $name 136 - let version_extractor = (input --default
"v(.*)" $
"Github tag version is ($version). Choose version extractor regex: ")
138 + let version_extractor = (input --default
"v?(.*)" $
"Github tag version is ($version). Choose version extractor regex: ")
137 139 $version = (
$version | parse --regex
$version_extractor | get capture0.
0)
138 140 print $
"Extracted version is ($version)" 139 141 let binary_path =
$name 298 - (make-unique-package-name
$org $name) ++
'.nu' 300 + (make-unique-package-name
$org $name) ++
'.nuon' nushell/modules/package/mod.nu
Modified11 11 export module ./manifestor.nu
12 12 export module ./installer.nu
13 +export module ./provider.nu
nushell/modules/package/provider.nu
Modified 15 +use ./native-package-manager
17 +const INSTALL_ACTION =
'install' 18 +const UNINSTALL_ACTION =
'uninstall' 17 20 export def provision [] {
21 + cd (folders manifests)
22 + let manifests = ls | get name | str replace
'.nuon' '' | wrap manifest
23 + cd (folders provisions)
24 + let provisions = open **/*.nuon | uniq
nushell/modules/sy.nu
Modified 5 - let git_status_notes = [
'-C' $env.NOTES status
'--short' '--branch' ]
6 4 let git_status_dotfiles = [
'-C' $env.DOTFILES status
'--short' '--branch' ]
9 - run-external git ...
$git_status_notes 11 5 run-external git ...
$git_status_dotfiles 20 - let git_add_notes = [
'-C' $env.NOTES add
'--all' ]
21 - let git_commit_notes = [
'-C' $env.NOTES commit
'--all' ]
22 - let git_push_notes = [
'-C' $env.NOTES push ]
23 13 let git_add_dotfiles = [
'-C' $env.DOTFILES add
'--all' ]
24 14 let git_commit_dotfiles = [
'-C' $env.DOTFILES commit
'--all' ]
25 15 let git_push_dotfiles = [
'-C' $env.DOTFILES push ]
27 - run-external git ...
$git_add_notes 28 - try { run-external git ...
$git_commit_notes }
29 - run-external git ...
$git_push_notes 31 17 run-external git ...
$git_add_dotfiles 32 18 try { run-external git ...
$git_commit_dotfiles }
33 19 run-external git ...
$git_push_dotfiles 37 23 export def down [] {
40 - let git_pull_notes = [
'-C' $env.NOTES pull ]
41 25 let git_pull_dotfiles = [
'-C' $env.DOTFILES pull ]
44 - run-external git ...
$git_pull_notes 46 26 run-external git ...
$git_pull_dotfiles 47 - if (not
$env.WIN32) {
49 - run-external topgrade
27 + run-external topgrade
53 30 def all-exist [] { all { which
$in | is-not-empty } }
20 23 ~/.subversion/merge
23 -~/.local/bin/git-info
26 26 ~/.cargo/config.toml
wezterm/bugabinga/launch.lua
Modified 7 7 args
= {
'topgrade', },
12 + args = {
'cha',
'-V' },
12 17 args = {
'nvim', },