Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

janis watch support 'q' for quit #20

Open
bjpop opened this issue Mar 19, 2020 · 1 comment
Open

janis watch support 'q' for quit #20

bjpop opened this issue Mar 19, 2020 · 1 comment

Comments

@bjpop
Copy link
Contributor

bjpop commented Mar 19, 2020

It is not clear what is the preferred way to stop janis watch.

Currently I am just control-c, but that seems inelegant.

Some interactive Unix tools support pressing 'q' for quit (e.g. less).

This is a minor issue, but maybe janis watch could do the same, and perhaps print a message down the bottom that q will quit the program.

@illusional
Copy link
Member

illusional commented Mar 23, 2020

Hi @bjpop, this would be a good addition to to the watch screen.

I started working on this a while ago to support curses, or allowing janis watch to not clear the screen (like how htop does it). The "Press 'q' to quit" functionality is implemented here: management/workflowmanager.py#L353-L388.

I used the Python module blessed (and is actually still a dependency), but I ran into trouble with allowing the progress screen to scroll if you have many tasks, so I have put it on hold for now. I think it's possible by overriding the scroll and up/down keyboard events and only printing certain elements to memory, but very happy to take guidance on this.

Dev note: Uncomment workflowmanager.py#L316-L326 to re-enable this behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants