diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /.config/vifm/scripts | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/vifm/scripts')
| -rwxr-xr-x | .config/vifm/scripts/vifm-show-sixel | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/.config/vifm/scripts/vifm-show-sixel b/.config/vifm/scripts/vifm-show-sixel deleted file mode 100755 index 1644153..0000000 --- a/.config/vifm/scripts/vifm-show-sixel +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -set -e - -if [ "$#" -ne 3 ]; then - echo "Usage: $0 filename width height" - exit 1 -fi - -dim=( $(convert "$1" -format "%w %h" info:) ) -w=${dim[0]} -h=${dim[1]} - -pw=$(($2*8)) -ph=$(($3*14)) - -height=auto -width=auto -if [ $pw -lt $w ] && [ $ph -lt $h ]; then - newh=$(echo "($h*$pw)/$w" | bc) - neww=$(echo "($w*$ph)/$h" | bc) - - if [ $newh -le $ph ]; then - width=$pw - else - height=$ph - fi -elif [ $pw -lt $w ]; then - width=$pw -elif [ $ph -lt $h ]; then - height=$ph -fi - -# debugging stuff -# echo pw=$pw ph=$ph -# echo w=$w h=$h -# echo neww=$neww newh=$newh -# exec echo width=$width height=$height - -# account for GNU screen -if [ -n "$STY" ]; then - popt=-P -fi - -exec img2sixel $popt --width=$width --height=$height "$1" |