X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=xsetbg.py;h=706e183ef2cad8338877b5a6c59bfa04a419c2c5;hb=839045f02d15aa1ffb272eb60dff01a5a8f9bd69;hp=68828cf567b5db4c43875df9e5c36b737c02362d;hpb=8fedc324654b410682e313d2542726c8305b2b93;p=xsetbg.git diff --git a/xsetbg.py b/xsetbg.py index 68828cf..706e183 100644 --- a/xsetbg.py +++ b/xsetbg.py @@ -125,6 +125,16 @@ def change(force=False): "-center", "-onroot", "-quiet", "-zoom", "auto", row.full_name.encode(fs_encoding)] + ext = os.path.splitext(row.full_name)[1].lower() + 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!")