1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Run zoxide and vivid at compile time and not runtime

This commit is contained in:
RGBCube 2024-05-29 15:05:11 +03:00
parent 6f08c6b619
commit c138f9406b
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
3 changed files with 13 additions and 3 deletions

View file

@ -397,5 +397,3 @@ $env.config.keybindings = [
event: { send: enter } event: { send: enter }
} }
] ]
source ~/.config/nushell/zoxide.nu

View file

@ -20,6 +20,16 @@
}) })
(homeConfiguration { (homeConfiguration {
xdg.configFile = {
"nushell/zoxide.nu".source = pkgs.runCommand "zoxide.nu" {} ''
${lib.getExe pkgs.zoxide} init nushell --cmd cd > $out
'';
"nushell/ls_colors.txt".source = pkgs.runCommand "ls_colors.txt" {} ''
${lib.getExe pkgs.vivid} generate gruvbox-dark-hard > $out
'';
};
programs.starship = enabled { programs.starship = enabled {
settings = { settings = {
command_timeout = 100; command_timeout = 100;

View file

@ -7,6 +7,8 @@ $env.ENV_CONVERSIONS.PATH = {
} }
} }
$env.LS_COLORS = (open ~/.config/nushell/ls_colors.txt)
def --env mc [path: path] { def --env mc [path: path] {
mkdir $path mkdir $path
cd $path cd $path
@ -18,4 +20,4 @@ def --env mcg [path: path] {
git init git init
} }
zoxide init nushell --cmd cd | save --force ~/.config/nushell/zoxide.nu source ~/.config/nushell/zoxide.nu