diff --git a/.config/helix/config.toml b/.config/helix/config.toml index c1bc8944..1372fab1 100644 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -182,6 +182,8 @@ C-u = ["page_cursor_half_up", "align_view_center"] # typst [keys.normal.space.l.t] +# open pdf preview +p = ':sh ~/.config/helix/scripts/typst-zathura.fish %{buffer_name}' # git stuff [keys.normal.space.g] diff --git a/.config/helix/scripts/typst-zathura.fish b/.config/helix/scripts/typst-zathura.fish new file mode 100755 index 00000000..6fff70e0 --- /dev/null +++ b/.config/helix/scripts/typst-zathura.fish @@ -0,0 +1,4 @@ +#!/usr/bin/env fish + +set -l src (path resolve $argv[1]) +set -l targ (string replace --filter '.typ' '.pdf')