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() {
file=${1:-$f}
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
chafa "$file" -s "$((w - 2))x$h" --polite on
else
# shellcheck disable=2086
chafa -f sixel -s "${w}x${h}" --polite on --animate false "$file"
exit 0
fi
# shellcheck disable=2086
chafa -f sixel -s "${w}x${h}" --polite on --animate false "$file"
exit 0
}
video() {