#!/bin/sh XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" true_input_path="$(readlink -f "$1")" image() { file_path="$1" mw="$(($2 - 1))" mh="$3" x="$4" y="$5" ueberzugpp cmd -s "$UB_SOCKET" -a add -i PREVIEW -x "$x" -y "$y" --max-width "$mw" --max-height "$mh" -f "$file_path" exit 1 } plaintext() { if command -v bat >/dev/null 2>&1; then bat --color=never --style=numbers --pager=never "$@" else cat "$@" fi } generate_cache_path() { while IFS=' ' read -r thumbnail _; do printf '%s' "$thumbnail" done <