fix: expand lutgen binary lookup paths in recolor_watcher.py to ensure wallpaper recolor logic transfers seamlessly
This commit is contained in:
parent
454023e8e0
commit
3413c6517e
@ -65,9 +65,17 @@ PALETTES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def find_lutgen():
|
def find_lutgen():
|
||||||
cargo_path = os.path.expanduser('~/.cargo/bin/lutgen')
|
for p in [
|
||||||
if os.path.exists(cargo_path):
|
os.path.expanduser('~/.cargo/bin/lutgen'),
|
||||||
return cargo_path
|
os.path.expanduser('~/.cargo/bin/lutgen-cli'),
|
||||||
|
os.path.expanduser('~/.local/bin/lutgen'),
|
||||||
|
os.path.expanduser('~/.local/bin/lutgen-cli'),
|
||||||
|
'/usr/bin/lutgen',
|
||||||
|
'/usr/local/bin/lutgen',
|
||||||
|
'/usr/bin/lutgen-cli'
|
||||||
|
]:
|
||||||
|
if os.path.exists(p):
|
||||||
|
return p
|
||||||
return shutil.which('lutgen') or shutil.which('lutgen-cli')
|
return shutil.which('lutgen') or shutil.which('lutgen-cli')
|
||||||
|
|
||||||
def recolor_and_replace(img_path, palette_hex_list, out_path):
|
def recolor_and_replace(img_path, palette_hex_list, out_path):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user