walset
[I] image: Using image wallhaven-x67oxo.png.
[I] colors: Generating a colorscheme.
[I] colors: Using wal backend.
Traceback (most recent call last):
File "/usr/bin/wal", line 33, in <module>
sys.exit(load_entry_point('pywal16==3.5.3', 'console_scripts', 'wal')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pywal/__main__.py", line 244, in main
parse_args(parser)
File "/usr/lib/python3.12/site-packages/pywal/__main__.py", line 184, in parse_args
colors_plain = colors.get(image_file, args.l, args.cols16, args.backend,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pywal/colors.py", line 213, in get
colors = getattr(backend, "get")(img, light, cols16)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pywal/backends/wal.py", line 77, in get
colors = gen_colors(img)
^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pywal/backends/wal.py", line 64, in gen_colors
return [re.search("#.{6}", str(col)).group(0) for col in raw_colors[1:]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
Currently whenever a terminal is in suspended mode (and maybe for some other reasons) and pywal tries to send the color sequences to it the save_file here:
|
util.save_file(sequences, dev) |
it will get stuck trying to write indefinitelly, blocking the writing to the remaining ttys and program itself
I tried this PR Add --active-only flag to only run pywal on active ttys from dylanaraps repo. But unfortunately it didn't work for Kitty, which doesn't show up in who
output for some reason and also doesn't handle the aforementioned suspend mode.
So I am wondering if there is a way to reliably detect whether a tty cannot receive input so it is skipped. Konsole links to this wiki page about Software Flow Control, could it be that there is a way to detect in which state a tty is? Or will it be okay putting a timeout to the write operation to abort when it gets stuck?