1
0
Fork 0

clean up preview script

This commit is contained in:
Luca Bilke 2024-05-23 17:06:03 +02:00
parent 1370d4ee62
commit 6287059d34
1 changed files with 3 additions and 7 deletions

View File

@ -9,13 +9,9 @@ f="$(realpath "$1")" w=$2 h=$3 # x=$4 y=$5
image() { image() {
file=${1:-$f} file=${1:-$f}
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then # shellcheck disable=2086
chafa "$file" -s "$((w - 2))x$h" --polite on chafa -f sixel -s "${w}x${h}" --polite on --animate false "$file"
else exit 0
# shellcheck disable=2086
chafa -f sixel -s "${w}x${h}" --polite on --animate false "$file"
exit 0
fi
} }
video() { video() {