mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
auto up 00:24:13 up 0:32, 2 users, load average: 0.84, 0.77, 0.74
This commit is contained in:
15
shell/traverse_typst.sh
Executable file
15
shell/traverse_typst.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Directory to search (default: current directory or given argument)
|
||||
SEARCH_DIR="${1:-.}"
|
||||
|
||||
# Your Typst viewer or editor — adjust as needed
|
||||
TYPST_VIEWER="alacritty -e nvim " # or "typst preview", "helix", "nvim", etc.
|
||||
|
||||
# Ensure required commands exist
|
||||
command -v fzf >/dev/null 2>&1 || { echo "fzf not found"; exit 1; }
|
||||
|
||||
# Find all .typ files recursively and open them interactively with fzf
|
||||
find "$SEARCH_DIR" -type f -iname '*.typ' | sort | \
|
||||
fzf --multi \
|
||||
--bind "enter:execute-silent($TYPST_VIEWER {} &)"
|
||||
Reference in New Issue
Block a user