.dotfiles/.config/newsboat/scripts/kitty-pager.sh

15 lines
289 B
Bash
Raw Normal View History

2024-09-21 19:14:02 -04:00
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