dotfiles
bugabingas dorkfiles
owned by bugabinga
nushell: robust sourcing of generated configs
32a0fb6ffc997bf954ef4d70f026b6f9009ed484
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (8)
neovim/lazy-lock.json
Modified42 42 "nvim-neoclip.lua": {
"branch":
"main",
"commit":
"32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
43 43 "nvim-rulebook": {
"branch":
"main",
"commit":
"bc5e3874a9870709ec91152f9efce6dad49ca862" },
44 44 "nvim-surround": {
"branch":
"main",
"commit":
"ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
45 - "nvim-treesitter": {
"branch":
"master",
"commit":
"9b1e607298dd5fc2ee6549488324cc92dafb99c0" },
45 + "nvim-treesitter": {
"branch":
"master",
"commit":
"cc2c11c403a9143827501223b4ee64432dcaf246" },
46 46 "nvim-treesitter-endwise": {
"branch":
"master",
"commit":
"8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
47 - "nvim-treesitter-textobjects": {
"branch":
"master",
"commit":
"b91c98afa6c42819aea6cbc1ba38272f5456a5cf" },
47 + "nvim-treesitter-textobjects": {
"branch":
"master",
"commit":
"4a2d05ec24eaa6b655c7d19092a3b6c0219d46b9" },
48 48 "nvim-ts-autotag": {
"branch":
"main",
"commit":
"e239a560f338be31337e7abc3ee42515daf23f5e" },
49 - "nvim-web-devicons": {
"branch":
"master",
"commit":
"56f17def81478e406e3a8ec4aa727558e79786f3" },
49 + "nvim-web-devicons": {
"branch":
"master",
"commit":
"6b53401918a9033a41159d012160c5fb5eb249ae" },
50 50 "oil.nvim": {
"branch":
"master",
"commit":
"1eb9fb35a4613518f79790117ed82c367a0b4a22" },
51 51 "plenary.nvim": {
"branch":
"master",
"commit":
"2d9b06177a975543726ce5c73fca176cedbffe9d" },
52 52 "range-highlight.nvim": {
"branch":
"master",
"commit":
"8b5e8ccb3460b2c3675f4639b9f54e64eaab36d9" },
79 79 source (
$nu.default-config-dir | path join
'gen-aliases.nu')
82 +let zoxide_config_path =
$nu.default-config-dir | path join
'zoxide.nu' 82 83 if not (which zoxide | is-empty) {
83 - zoxide init nushell | save -f (
$nu.default-config-dir | path join
'zoxide.nu')
84 + zoxide init nushell | save --force
$zoxide_config_path 86 + '' | save -f
$zoxide_config_path 90 +$env.CARAPACE_BRIDGES =
'zsh,fish,bash,inshellisense' 91 +let carapace_config_path =
$nu.default-config-dir | path join
'carapace.nu' 86 92 if not (which carapace | is-empty) {
87 - $env.CARAPACE_BRIDGES =
'zsh,fish,bash,inshellisense' 88 - mkdir ~/.cache/carapace
89 - carapace _carapace nushell | save --force ~/.cache/carapace/init.nu
93 + carapace _carapace nushell | save --force
$carapace_config_path 95 + '' | save --force
$carapace_config_path 92 98 def --env wslg [] {
13 13 use fedora_bootstrip.nu
17 +use svn-completions.nu *
16 19 use svn-completions.nu *
22 25 source (
$nu.default-config-dir | path join
'aliases.nu')
26 26 source (
$nu.default-config-dir | path join
"zoxide.nu")
27 +source (
$nu.default-config-dir | path join
"carapace.nu")
31 -source ( [
$nu.home-path '.cache' 'carapace' 'init.nu'] | path join)
33 -source (
$nu.default-config-dir | path join
"scripts/direnv.nu")
nushell/scripts/commands.nu
Modified 24 + if not (
$file | path exists ) {
26 + msg:
"The file to backup does not exist.",
28 + text:
"Missing its existence!",
29 + span: (metadata
$file).span
33 + let full_path =
$file | path expand
34 + let tmpdir = mktemp --directory --tmpdir backup_XXX
35 + let backup =
$tmpdir | path join (
$file | path basename )
36 + let backup_original_path =
$tmpdir | path join
'original.path' 37 + $full_path | save
$backup_original_path 38 + cp --preserve [ mode timestamps ]
$file $backup 46 + if not (
$backup | path exists ) {
48 + msg:
"The backup file does not exist.",
50 + text:
"Missing its existence!",
51 + span: (metadata
$backup).span
55 + let backup_file =
$backup | path expand
56 + if (
$backup_file !~
'backup_' ) {
58 + msg:
"The file does not seem to be a backup file from `bak`.",
60 + text:
"Are u even bak'ed up?",
61 + span: (metadata
$backup).span
65 + let backup_dir =
$backup | path dirname
66 + let original_path_file =
$backup_dir | path join
'original.path' 67 + let original_path = open --raw
$original_path_file 69 + mv --progress --interactive --verbose
$backup_file $original_path 73 + rm --trash --recursive
$backup_dir nushell/scripts/fedora_bootstrip.nu
Modified14 14 sudo dnf install perl-File-Compare perl-File-Copy perl-FindBin perl-IPC-Cmd
17 + sudo dnf install python3-dnf-plugin-rpmconf dnf-automatic
18 + sudo systemctl enable --now dnf-automatic-install.timer
17 21 sudo dnf install aerc llvm clang cmake unison rustup neovim mold java-latest-openjdk-devel java-latest-openjdk-src perl-Image-ExifTool
topgrade/topgrade.toml
Modified10 13 self_update =
false wezterm/bugabinga/key_binds.lua
Modified 59 59 {
key =
'v',
action = wez.action.SplitHorizontal {
domain =
'CurrentPaneDomain', }, },
60 60 {
key =
's',
action = wez.action.SplitVertical {
domain =
'CurrentPaneDomain', }, },
62 + {
key =
'r',
action = wez.action.RotatePanes
'CounterClockwise', },
63 + {
key =
'R',
action = wez.action.RotatePanes
'Clockwise', },
62 64 {
key =
'=',
action = wez.action.ActivateKeyTable {
name = resize_pane_mode,
one_shot =
false, }, },
64 66 {
key =
'q',
action = wez.action.CloseCurrentPane {
confirm =
false, }, },
23 23 ~/.config/nushell/scripts
26 +~/.config/nushell/completions
25 28 icc/thinkpad_x230.icc
26 29 ~/.config/icc/thinkpad_x230.icc