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

term lock #39

Open
petaflot opened this issue Jan 3, 2023 · 2 comments
Open

term lock #39

petaflot opened this issue Jan 3, 2023 · 2 comments

Comments

@petaflot
Copy link

petaflot commented Jan 3, 2023

following #2 but not quite:

I usually like to set screen lock (and often screensaver too) explicitly : I don't like such tools to interfere with my work (reading a document, watching misc media, contemplating code).

using unimatrix as a term lock would be cool ; I started looking into it but I'm not quite sure where to put the code

basically, desired behaviour is "show a matrix until ctrl+Z is pressed ; then request password else restart (and log failed attempts, possibly with webcam shot)"

vlock program can be used as a locker, instead of re-inventing the wheel : https://linux.die.net/man/1/vlock

@petaflot
Copy link
Author

petaflot commented Jan 3, 2023

this works (and suprisingly also protects from Ctrl+Z)

alias vlock='unimatrix -l cP -c red -s 95 ;
        /usr/bin/vlock &&
        unimatrix -l BPPPsk -c green -s 98 -w'

requires Braille symbols ;-)

@petaflot
Copy link
Author

petaflot commented Jan 3, 2023

currently in my ~/.bashrc:

unimatrix -l BPPPsk -c green -s 98 -w
alias vlock='unimatrix -l cP -c red -s 98 -w ;
        unimatrix -l BPPPsk -c blue -g black -f -s 95 ;
        /usr/bin/vlock &&
        killall unimatrix 2>/dev/null;
        killall -9 vlock 2>/dev/null;
        unimatrix -l BPPPsk -c green -s 98 -w'

that killall -9 vlock is there in case other terms have been locked. still looking for a way to lock all terms simultanously

IS NOT SAFE when inside screen or tmux

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

1 participant