some optimzations in custom commands
This commit is contained in:
parent
98e3bc8b32
commit
bee13a9391
1 changed files with 8 additions and 4 deletions
|
@ -16,10 +16,9 @@ def nr [
|
|||
def lcr [
|
||||
file_extension: string
|
||||
] {
|
||||
ls **/*
|
||||
| where name ends-with $".($file_extension)"
|
||||
glob **/*.($file_extension)
|
||||
| par-each {|file|
|
||||
open $file.name
|
||||
open $file
|
||||
| lines --skip-empty
|
||||
| length }
|
||||
| math sum
|
||||
|
@ -45,7 +44,7 @@ def typed [
|
|||
} else if ($"($name).pdf" | path exists) {
|
||||
typst compile $"($name).typ"
|
||||
}
|
||||
mprocs --names Editor,Viewer,Notify $"hx '($name).typ'" $"while true; do mupdf-x11 '($name).pdf' && break; done" $"while inotifywait -e modify '($name).pdf' ; do pkill -HUP mupdf; done"
|
||||
mprocs --names Editor,Viewer,Notify $"hx '($name).typ'" $"while true; do mupdf-x11 '($name).pdf' && break; done" $"bash -c 'while inotifywait -e modify \'($name).pdf\' ; do pkill -HUP mupdf; done'"
|
||||
}
|
||||
|
||||
# figure out when the next event is
|
||||
|
@ -99,3 +98,8 @@ def "dp gay" [] {
|
|||
swaymsg "output DP-3 position 0 0 scale 1 transform normal resolution 1920x1080@60Hz"
|
||||
bars "LEN G27c-10"
|
||||
}
|
||||
|
||||
def oobs [] {
|
||||
set-env SHELL /run/current-system/sw/bin/bash
|
||||
obs
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue