Skip to content

Handling ttys not accepting sequences e.g when suspended by Flow Control #22

Description

@luisbocanegra

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions