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

Time of last change for each line/char on terminal #681

Open
al-zatv opened this issue May 6, 2022 · 7 comments
Open

Time of last change for each line/char on terminal #681

al-zatv opened this issue May 6, 2022 · 7 comments
Labels
enhancement New feature or request feature-request User requested features maybe-as-extension An idea that fits being implemented as extension.

Comments

@al-zatv
Copy link

al-zatv commented May 6, 2022

Contour is really interesting -- and is super fast! I want to use it more. Thank you all for this tool.

Abstract

Terminal users often run long processes. Compile something big, train neural network, scan disk drive or ports.
And, it is often good to know, when something happened.

Let say, you run something long in Friday evening. You came back at Monday morning, and see an output:

Stage 1/5 is completed... 
Stage 2/5 is completed... 

So, what happened -- stage 1 and 2 was completed in first 15 minutes, and after that, my process hangs? So, it is better to stop it now? Or, each stage take 1 day each, so now it is better to wait 3 more days? Nobody knows.

Probably, everyone who uses console often, sometimes face this situation.

Motivation

I propose to add mode to view time of change of each line (or char) on screen.

Let say, variant # 1

  • I press Alt+Shift+T
  • near each line i see time of change of this line (for example, to the right of the line)
  • If I drag my mouse to the time, I see date of this change (it can be important for Friday-->Monday situation)
  • On next press of Alt+Shift+T, this time suffix disappear.

variant # 2

  • I press Alt+Shift+T. Start of special "time mode" signaled somewhere in UI (for example, in window caption)
  • I can move my mouse to any char, and see the time of it change in a tooltip
  • On next press of Alt+Shift+T, this mode stops.

(as for me, I prefer 1st option, but 2nd one is also OK and can be useful sometimes)

ps Sorry if this was already discussed

@al-zatv al-zatv added enhancement New feature or request feature-request User requested features labels May 6, 2022
@christianparpart
Copy link
Member

Hey, thanks for the kind works. Performance is in fact what I lately work on the most, so it seems.

Coming back to your problem. Are you in control of that script? I would suggest to approach the problem from the other side, even non-intrusively:

alias logstamped="awk '{print strftime(\"[%Y-%m-%d %H:%M:%S]\", systime()), \$0};'"

Then, whatever long running command you are having that produces sequencial output, use it like that:

LongRunningScript.sh | logstamped

Example:

image

Otherwise, I am not against adding such functionality, internally the monotonic clock is held already, and adding such an existing meta information to a line isn't expensive, but how to show that I personally find more debatable. Here, I'd highly prefer to wait until Contour has received a plugin API and use that API for extending the core.

@al-zatv
Copy link
Author

al-zatv commented May 6, 2022

Thank you for 'logstamped' script. I'll save it, it may help in some situations.
But, in my opinion, it's good to know when something went wrong -- especially if you don't expect that something may go wrong. So, I think it better to be part of terminal emulator, in my humble opinion.

@data-man
Copy link
Contributor

data-man commented May 6, 2022

I am not against adding such functionality

I am against. It's not TE's task.

@al-zatv
Copy link
Author

al-zatv commented May 6, 2022

It's not TE's task.

TE's task is to allow power user to work with console software in most productive way, isn't it?
Productivity of group of users who work with long processes will increase from this feature, isn't it?
(I will answer myself -- yes, it is. Less problems with logging, especially logging on 3rd party tools,etc).
So, this is TE's task.

@data-man
Copy link
Contributor

data-man commented May 6, 2022

power user to work with console software in most productive way, isn't it?

A power user can develop/find suitable tool. It's very likely that such TUI/GUI tool already exists.
TE should not be like Nero Burning ROM.

@uspasojevic96
Copy link
Member

Honestly, having this done through scripting/plugin API wouldn't be a bad thing, I do disagree with @data-man though, modern TE should have more (sensible) features than it's predecessors.

@christianparpart
Copy link
Member

christianparpart commented May 6, 2022

It's not TE's task.

TE's task is to allow power user to work with console software in most productive way, isn't it? Productivity of group of users who work with long processes will increase from this feature, isn't it? (I will answer myself -- yes, it is. Less problems with logging, especially logging on 3rd party tools,etc). So, this is TE's task.

i'm all in for empowering the users. sometimes it's a core TE feature to be implemented (vi-like input modes for example), and sometimes some tool in between (e.g. a terminal screen recorder can be tooled as man-in-the-middle software).

For your idea, i'm not against, I lag some imagination in visualization, but I'd like to keep this ticket open specifically as motivation for scripting API requirements. I can't promise you anything soon, as other points are currently more pressing (stability, performance (finish open topics), Good Image Protocol, double-width/height text, UI tabs (ideally in the title bar :)).

@christianparpart christianparpart added the maybe-as-extension An idea that fits being implemented as extension. label May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature-request User requested features maybe-as-extension An idea that fits being implemented as extension.
Projects
None yet
Development

No branches or pull requests

4 participants