brunobraga / termsaver

Simple text-based Terminal Screensaver
https://github.com/brunobraga/termsaver
Apache License 2.0
92 stars 21 forks source link

support for locking terminal #10

Open jonassmedegaard opened 12 years ago

jonassmedegaard commented 12 years ago

Would be cool if possible to password-protect, similar to xscreensaver-command -lock.

Perhaps integrate with vlock?

brunobraga commented 12 years ago

This is a great idea.... It comes down to the screensaver interaction with the keyboard... my initial thoughts were to, somehow (and for those who want it), run in background and start if the terminal stays idle for N minutes... then, getting out of it would be by hitting any key instead of ctrl+C, with the plus option of locking you've just said.

I was, however, planning to minimize package dependencies for better platform compatibility, and release plugins that could be platform dependent. This is still a work-in-progress... plan to release a first plugin by next month.

What do you reckon? A plugin to add such feature, or perhaps write the vlock clone in pure python?

jonassmedegaard commented 12 years ago

On 12-05-07 at 06:15pm, Bruno Braga wrote:

This is a great idea.... It comes down to the screensaver interaction with the keyboard... my initial thoughts were to, somehow (and for those who want it), run in background and start if the terminal stays idle for N minutes... then, getting out of it would be by hitting any key instead of ctrl+C, with the plus option of locking you've just said.

I was, however, planning to minimize package dependencies for better platform compatibility, and release plugins that could be platform dependent. This is still a work-in-progress... plan to release a first plugin by next month.

What do you reckon? A plugin to add such feature, or perhaps write the vlock clone in pure python?

Great that you have it on your radar. Sorry, my skills are in other areas, so I cannot really help much with implementation details.

What do you mean by "hitting any key instead of ctrl+C"? It sure would need to grab the CTRL+C too, or the very point of "locking" would be lost, no?

brunobraga commented 12 years ago

On Tue, May 8, 2012 at 7:58 PM, Jonas Smedegaard < reply@reply.github.com

wrote:

Great that you have it on your radar. Sorry, my skills are in other areas, so I cannot really help much with implementation details.

No worries!

What do you mean by "hitting any key instead of ctrl+C"? It sure would need to grab the CTRL+C too, or the very point of "locking" would be lost, no?

Just that now Ctrl+C is the only way to interrupt the program (or, more obviously if you close the terminal window, or shutdown the machine)... by enabling key events, any key pressed or mouse movement could be considered to terminate the screensaver, just as it is in the graphical ones.

EddieDover commented 1 year ago

PR #61 adds the proper hooks to make something like this viable. I'll investigate it in a future feature branch.