From: Oleg Broytman Date: Fri, 19 Feb 2021 20:29:35 +0000 (+0300) Subject: Feat: Display WEBP images using `display` from ImageMagic X-Git-Tag: 5.1.0~19 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=839045f02d15aa1ffb272eb60dff01a5a8f9bd69;p=xsetbg.git Feat: Display WEBP images using `display` from ImageMagic --- diff --git a/xsetbg.py b/xsetbg.py index 1f318c7..706e183 100644 --- a/xsetbg.py +++ b/xsetbg.py @@ -129,6 +129,12 @@ def change(force=False): if ext in ('tif', 'tiff'): program_options[0] = 'xsetbg' + if ext == 'webp': + program_options = ['display', '-backdrop', + '-background', random.choice(borders), + '-window', 'root', + row.full_name.encode(fs_encoding)] + rc = subprocess.call(program_options) if rc: error("cannot execute xli!")