ctpv: fix img previews and correct dependency (#403288)

authored by Aleksana and committed by GitHub fd44bc6f 6798dbaa

+18
+5
pkgs/by-name/ct/ctpv/package.nix
··· 15 15 glow, 16 16 imagemagick, 17 17 jq, 18 + poppler-utils, 18 19 ueberzug, 19 20 }: 20 21 ··· 52 53 glow # for markdown files 53 54 imagemagick 54 55 jq # for json files 56 + poppler-utils # for pdf files 55 57 ueberzug # for image files on X11 56 58 ] 57 59 }"; 58 60 ''; 61 + 62 + # Until https://github.com/NikitaIvanovV/ctpv/pull/90 is merged 63 + patches = [ ./use-polite-flag.patch ]; 59 64 60 65 meta = with lib; { 61 66 description = "File previewer for a terminal";
+13
pkgs/by-name/ct/ctpv/use-polite-flag.patch
··· 1 + diff --git a/sh/helpers.sh b/sh/helpers.sh 2 + index fef8691..229d38f 100644 3 + --- a/sh/helpers.sh 4 + +++ b/sh/helpers.sh 5 + @@ -73,7 +73,7 @@ is_anim_image() { 6 + chafa_run() { 7 + format='-f symbols' 8 + autochafa && format= 9 + - chafasixel && format='-f sixels' 10 + + chafasixel && format='-f sixels --polite on' 11 + chafa -s "${w}x${h}" $format "$1" | sed 's/#/\n#/g' 12 + } 13 +