make typst live editing and preview a thing
This commit is contained in:
parent
65039f4f17
commit
4f01412843
3 changed files with 104 additions and 30 deletions
|
@ -803,18 +803,15 @@ def glog [
|
|||
] {
|
||||
git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n $amount
|
||||
| lines
|
||||
| split column "»¦«" commit subject name email date
|
||||
| split column "»¦«u commit subject name email date"
|
||||
}
|
||||
|
||||
def ed [
|
||||
file: path
|
||||
...cmdargs: string
|
||||
def typed [
|
||||
name: string
|
||||
] {
|
||||
let ext = $file | path parse | get extension;
|
||||
match $ext {
|
||||
"typ" => {|| zellij run --direction down -- typst watch $file ($cmdargs | prepend '--open' | str join ' ') }
|
||||
};
|
||||
hx $file
|
||||
touch $"($name).typ"
|
||||
typst compile $"($name).typ"
|
||||
mprocs --names Editor,Viewer,Notify $"hx '($name).typ'" $"mupdf-x11 '($name).pdf'" $"while inotifywait -e modify '($name).pdf' ; do pkill -HUP mupdf; done"
|
||||
}
|
||||
|
||||
alias gnix = cd ~/nix-configs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue