diff --git a/.local/bin/scripts/arg-test b/.local/bin/scripts/arg-test index 2328384..a7f30bf 100755 --- a/.local/bin/scripts/arg-test +++ b/.local/bin/scripts/arg-test @@ -1,7 +1,7 @@ #!/bin/sh { echo "$# Args: $@" -echo "${@:-default}" | sed 's/\w\+/\0-w/g' +#echo "${@:-default}" | sed 's/\w\+/\0-w/g' for last; do true; done echo "Last arg: $last" } | tee /tmp/args$(date +%s) diff --git a/.local/bin/scripts/titest b/.local/bin/scripts/titest new file mode 100755 index 0000000..6b014ec --- /dev/null +++ b/.local/bin/scripts/titest @@ -0,0 +1,11 @@ +#!/bin/bash +# Compare select terminal image viewers +# Args: [images]... +runti() { + which "$1" >/dev/null && + highlight "$*" && "$@" +} +cols="$(expr $(tput cols) / $1 / 4 \| 1)" +runti timg --grid=${cols} -g $(tput cols)x$(expr $1 \* $cols) "${@:2}" +runti viu --name -h $1 "${@:2}" +runti tiv -h $1 -c $cols "${@:2}"