diff --git a/modules/desktop-environment/home/typst.nix b/modules/desktop-environment/home/typst.nix index 1b7f032..d7d3fcc 100644 --- a/modules/desktop-environment/home/typst.nix +++ b/modules/desktop-environment/home/typst.nix @@ -4,8 +4,8 @@ domain = "forge.katzen.cafe"; owner = "schrottkatze"; repo = "typst-configs"; - rev = "7e184eecd8c6f87c08246a0bb105867423bd4fbf"; #:REV:- rev = "%REV%";-:# - sha256 = "sha256-Lv5/DxBiG7EUgcOHPL8aqztJ97s+78TXXENB7lb1olM="; #:SHA:- sha256 = "%SHA%";-:# + rev = "9a5bd5256ace2a56de51b89793f191b4eecce1dc"; #:REV:- rev = "%REV%";-:# + sha256 = "sha256-E+5fJULNxM0XcbimuENqIJC24ZwPRMSHnG97ncBtEGw="; #:SHA:- sha256 = "%SHA%";-:# }; flow = pkgs.fetchFromGitHub { owner = "MultisampledNight"; diff --git a/modules/shell/nu/aliases.nu b/modules/shell/nu/aliases.nu index f2cce90..20fe226 100644 --- a/modules/shell/nu/aliases.nu +++ b/modules/shell/nu/aliases.nu @@ -25,3 +25,10 @@ alias zsh = echo $"(ansi red)no, fuck that shit!"; alias fish = echo $"(ansi red)no, fuck that shit!"; alias px = pulsemixer; + +# uni +alias gun = cd ~/Docs/uni; +alias guni = cd ~/Docs/uni/info1; +alias gunids = cd ~/Docs/uni/design; +alias gunida = cd ~/Docs/uni/dramaturgie; +alias gunm = cd ~/Docs/uni/mathe1-3; diff --git a/modules/shell/nu/custom_commands.nu b/modules/shell/nu/custom_commands.nu index e3581f3..5b66b1b 100644 --- a/modules/shell/nu/custom_commands.nu +++ b/modules/shell/nu/custom_commands.nu @@ -38,8 +38,13 @@ def glog [ def typed [ name: string ] { - touch $"($name).typ" - typst compile $"($name).typ" + const DEFAULT_TYPST_FILE = "#import \"@local/typst-configs:0.1.0\": generic, sf;\n#show: generic.with();" + if not ($"($name).typ" | path exists) and not ($"($name).pdf" | path exists) { + $DEFAULT_TYPST_FILE | save $"($name).typ" + typst compile $"($name).typ" + } 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" }