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

should fix linux watch mode #256

Merged
merged 9 commits into from
Dec 6, 2016
Merged

should fix linux watch mode #256

merged 9 commits into from
Dec 6, 2016

Conversation

sfranky
Copy link
Collaborator

@sfranky sfranky commented Dec 2, 2016

No description provided.

@fgeorgatos
Copy link
Collaborator

not fixed: it seems that with watch -d ./qtop -FTG I still get the bug

@fgeorgatos
Copy link
Collaborator

fgeorgatos commented Dec 5, 2016

OK. one bug fixed, one bug received:

  • ./qtop.py -FGTw truncates top of the screen, ie. section 1 is scrolled up enough to hide it completely

@fgeorgatos
Copy link
Collaborator

also, ...and thank you for ..watching ;) should not be visible up there when invoked with watch -d

@fgeorgatos fgeorgatos added the bug label Dec 5, 2016
@fgeorgatos fgeorgatos added this to the 0.9.201612 milestone Dec 5, 2016
_command = subprocess.Popen('stty size', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
tty_size, _error = _command.communicate()
if not _error:
term_height, term_columns = [int(x) for x in tty_size.strip().split()]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map(int, tty_size.strip().split()) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik, list comps are preferred to map

read_char = wait_for_keypress_or_autorefresh(viewport, int(options.WATCH[0]) or KEYPRESS_TIMEOUT)
control_qtop(viewport, read_char, cluster)
read_char = wait_for_keypress_or_autorefresh(viewport, FALLBACK_TERMSIZE, int(options.WATCH[0]) or
KEYPRESS_TIMEOUT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the way your editor tells you: "you have far too long function name" ;-)

@fgeorgatos
Copy link
Collaborator

lgtm, both in source and output; merging!

@fgeorgatos fgeorgatos merged commit 8778927 into develop Dec 6, 2016
@fgeorgatos fgeorgatos deleted the bug-206-linux-watch branch December 6, 2016 16:45
@fgeorgatos
Copy link
Collaborator

this resolves #248 & #206

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

Successfully merging this pull request may close these issues.

None yet

2 participants