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

Keybind / option for read-only / protected mode #697

Closed
whisperity opened this issue May 21, 2022 · 6 comments · Fixed by #718
Closed

Keybind / option for read-only / protected mode #697

whisperity opened this issue May 21, 2022 · 6 comments · Fixed by #718
Labels
enhancement New feature or request feature-request User requested features frontend Contour Terminal Emulator (GUI frontend)

Comments

@whisperity
Copy link
Member

whisperity commented May 21, 2022

Abstract

A new keybind action, perhaps not bound to anything by default, should be added that, when pressed, disable passing input to the underlying programs.

Motivation

Sometimes I have long-running applications, output I would like to monitor, but I'm scared that pressing ^C will kill potentially hours' worth of computation. Idea taken from KiTTY that has a "Protected" mode: if enabled, you can't interact with the shell (no mouse events or keys are forwarded), and you can't even close the window -- but output is still being refreshed on your side.

@whisperity whisperity added enhancement New feature or request frontend Contour Terminal Emulator (GUI frontend) feature-request User requested features labels May 21, 2022
@christianparpart
Copy link
Member

That's a very interesting idea and should be trivial to implement. It should be shown to the user in some way or the other, such that the user won't be disappointed why nothing is happening.

@whisperity
Copy link
Member Author

whisperity commented May 21, 2022

That's a very interesting idea and should be trivial to implement. It should be shown to the user in some way or the other, such that the user won't be disappointed why nothing is happening.

All KiTTY does is put a (PROTECTED) into the title of the window, which is not quite enough. My first idea would be to change the running window's icon (I guess that is possible?) to a contour logo with a lock on it? (Get one of the nice coloured lock icons from Wikipedia! 😉 )

But I guess a lock could also be drawn somewhere in the viewport of the window, where it is expected to be unobtrusive. Top right corner?

Actually, how about all three of this?

Maybe the lock icon could be somehow justapoxed with the background image? We already have a solution for showing a background even if there is text above it! We can just put a lock in the right location, and render it as a "middleground". So on top of the background, but behind the text, and preferably not blurred, even if the background is.

@uspasojevic96
Copy link
Member

While I agree that changing some sort of window decoration is nice, but keep in mind that some of us have decorations disabled

@christianparpart
Copy link
Member

What about changing color scheme when in readonly-mode?

@whisperity
Copy link
Member Author

What about changing color scheme when in readonly-mode?

@christianparpart The problem with that is that the underlying buffer could change in readonly mode, it's just the user that should be prevented from entering things... And changing the colours could be disruptive of that.

@christianparpart
Copy link
Member

While the logic itself is trivial to implement, it's probably best to simply wait for #687 to be implemented, such that the visual feedback is easy, too. :)

christianparpart added a commit that referenced this issue Jun 6, 2022
…rminal application against accidental input (#697).
christianparpart added a commit that referenced this issue Jun 7, 2022
…rminal application against accidental input (#697).
christianparpart added a commit that referenced this issue Jun 7, 2022
…rminal application against accidental input (#697).
christianparpart added a commit that referenced this issue Jun 7, 2022
…rminal application against accidental input (#697).
christianparpart added a commit that referenced this issue Jun 7, 2022
[contour] Adds new input action `ToggleInputProtection` to protect terminal application against accidental input (#697).
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 frontend Contour Terminal Emulator (GUI frontend)
Projects
None yet
3 participants