.dotfiles/.config/newsboat/scripts/kitty-pager.sh
2024-09-21 15:05:15 -03:00

15 lines
289 B
Bash
Executable File

set -o errexit
set -o pipefail
set -o nounset
image=$(grep -E -o "https?://[a-zA-Z0-9./?=_%:-]*" < "${1}" | tail -1)
# Detect terminal dimensions
dims="$(tput cols)x$(tput lines)@0x0"
clear
kitty +kitten icat --clear
kitty +kitten icat --hold --scale-up --place "$dims" "$image"
clear