From 026ce534acc194a22adf9679784bb94f53002a35 Mon Sep 17 00:00:00 2001 From: Lionel Dricot Date: Wed, 30 Mar 2022 14:35:37 +0200 Subject: [PATCH] displaying animated gifs (but only one loop) --- CHANGELOG | 1 + offpunk.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3220889..2ce7e0d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ - New behaviour for "find" (or "/") which is to grep through current page (ripgrep used if detected) - Default width set to 80 as many gopherholes and gemini capsules have it hardcoded - Streaming URL without valid content-length are now closed after 5Mo of download (thanks to Eoin Carney for reporting the issue) +- Gif animations are now displayed once when viewed (instead of a still frame). - Restored some AV-98 certificate validation code that was lost I don’t know how. - Improved clarity of dependencies in "version" - Fixed a crash when the cache is already a dir inside a dir. diff --git a/offpunk.py b/offpunk.py index 136dd22..f2f8cf5 100755 --- a/offpunk.py +++ b/offpunk.py @@ -126,9 +126,9 @@ def terminal_image(img_file): # it is also centered cmd = None if _HAS_TIMG: - cmd = "timg --frames=1 -C" + cmd = "timg --loops=1 -C" elif _HAS_CHAFA: - cmd = "chafa --bg white -w 1" + cmd = "chafa -d 0 --bg white -w 1" if cmd: cmd = cmd + " \"%s\""%img_file subprocess.run(cmd,shell=True)