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

A wait option #165

Open
constatinus opened this issue Apr 21, 2020 · 2 comments
Open

A wait option #165

constatinus opened this issue Apr 21, 2020 · 2 comments

Comments

@constatinus
Copy link

In my scripts, i use:

betterlockscreen -l &
sleep 0.5
sudo zzz

for suspending my non-systemd distro. The problem here is not of an needed -s suspend command upgrade, but rather to make something like betterlockscreen -l -e, with the -e option being like a wait option until betterlockscreen is actually loaded, and then it passing away as a background process, letting the shell do its thing.

The problem with this is that without the sleep command the system would go sleep, and then when its woken up there will be a slight time of the system not being locked, and then locking itself, due to betterlockscreen not being fast enough. If instead i just removed the & at the end of the command, the system would wait for blscreen to unlock and only then will it suspend the machine.

However what if my system, for some reason, such as a nearly full ram, is slow, and betterlockscreen doesnt get to lock it in the right time (0.5 secs)?

Can an option such as -e, to let betterlockscreen hand only for the amount of time that it is not active, be brought?

@AUTplayed
Copy link
Collaborator

kinda related to #137, have you tried running betterlockscreen -s -l instead?

@constatinus
Copy link
Author

Yeah, the scripts just tried to call systemctl, doesnt work. Although i dont think i will do something like patch my system to execute betterlockscreen everytime it goes into suspending, maybe sometime i want to suspend it without locking it. Until something better of a solution comes, i guess i could just go on like this or edit the command in betterlockscreen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants