From 01a07f54c1c313d4688e86db9a8db77c25450e32 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sun, 5 Jan 2025 03:18:47 +0100 Subject: [PATCH 1/3] typst-configs: Update --- modules/desktop-environment/home/typst.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"; From cbf71bded5e31a8459f598ceb848f05e0ce24216 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sun, 5 Jan 2025 03:19:06 +0100 Subject: [PATCH 2/3] add uni aliases --- modules/shell/nu/aliases.nu | 7 +++++++ 1 file changed, 7 insertions(+) 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; From edafaf3c144cb36ba5ea8e49846218ad0d5a2522 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sun, 5 Jan 2025 03:19:20 +0100 Subject: [PATCH 3/3] improve `typed` command --- modules/shell/nu/custom_commands.nu | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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" }