Make 'typst-edit' work on any directory in the repo
This commit is contained in:
parent
3966e3110b
commit
344876af49
1 changed files with 11 additions and 1 deletions
|
@ -88,7 +88,17 @@
|
|||
help = " launch Typst editing environment";
|
||||
name = "typst-edit";
|
||||
category = " Typst";
|
||||
command = "${nixGLPkgs.nixgl.nixGLMesa}/bin/nixGLMesa ${pkgs.qutebrowser}/bin/qutebrowser ${tinymistURL} & ${pkgs.helix}/bin/hx ${config.languages.typst.entrypoint}; kill $!";
|
||||
command = ''
|
||||
${pkgs.nushell}/bin/nu -c "
|
||||
let git_root = (git rev-parse --show-toplevel | str trim)
|
||||
let file_path = $\"(\$git_root)/${config.languages.typst.entrypoint}\"
|
||||
let bg_process = (job spawn {
|
||||
${nixGLPkgs.nixgl.nixGLMesa}/bin/nixGLMesa ${pkgs.qutebrowser}/bin/qutebrowser ${tinymistURL}
|
||||
})
|
||||
${pkgs.helix}/bin/hx \$file_path
|
||||
job kill \$bg_process
|
||||
"
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue