From b15108ceed0c20aec99649217aff9835716cf7f1 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sat, 29 Jul 2023 16:24:05 +0300 Subject: [PATCH] lmao --- config/newsboat/kitty-img-pager.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/config/newsboat/kitty-img-pager.sh b/config/newsboat/kitty-img-pager.sh index 4e8a3be6..9568cdf6 100755 --- a/config/newsboat/kitty-img-pager.sh +++ b/config/newsboat/kitty-img-pager.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # Shows images, scaled to terminal dimensions, via kitty's icat. # Designed for image-feeds like xkcd.com. # by Timm Heuss (https://github.com/heussd/) - CC-BY 4.0 @@ -8,12 +8,11 @@ # macro i set pager "$PATHTOTHIS/kitty-img-pager"; open; set pager internal # 2) Now you use this pager in articleview using the hotkey + -set -o errexit -set -o pipefail -set -o nounset +#set -o errexit +#set -o pipefail +#set -o nounset - -image=$(grep -E -o "https?://[a-zA-Z0-9./?=_%:-]*" < "${#}" | tail -1) +image=$(grep -E -o "https?://[a-zA-Z0-9./?=_%:-]*" < "${1}" | tail -1) # Detect terminal dimensions dims="$(tput cols)x$(tput lines)@0x0"