Amphetamine-Enhancer icon indicating copy to clipboard operation
Amphetamine-Enhancer copied to clipboard

Lock user account but don't sleep

Open nekename opened this issue 5 years ago • 4 comments

Hello,

I have been using Amphetamine for under 10 minutes now and it's fantastic. However, I would love it if you added support for the below feature.

In Amphetamine, please could you add support for a setting that when you shut the lid of a MacBook, it doesn't go to sleep, but it shows the lock screen (just password entry, not complete logout)? I would like to be able to keep my data secure without sleeping my Mac. I know I can just do Control-Command-Q before shutting my screen, but I'm lazy :/ .

I don't know if Apple's security system lets other applications lock the screen, but if it does, this would be extremely helpful. I also don't know if this is for Amphetamine Enhancer or just Amphetamine, but I couldn't find anywhere else to post this.

Thanks, ninjadev64

Amphetamine is a fantastic app by the way. It works for everything I need it for, just the small issue with the thing above. 👍 😄

nekename avatar Nov 30 '20 17:11 nekename

I'm looking for this too.

DUOLabs333 avatar Nov 11 '21 16:11 DUOLabs333

What I did is just press the shortcut and I got used to it, it's a reflex now.

nekename avatar Nov 12 '21 19:11 nekename

I was able to get it done with Fermata and

#!/opt/local/bin/bash

cd ~/scripts 
while true
do
	if [[ $(ioreg -r -k AppleClamshellState | grep '"AppleClamshellState"' | cut -f2 -d"=") = ' Yes' ]]; then
		./lockscreen
		sleep 1
	fi
done

./lockscreen comes from here

DUOLabs333 avatar Nov 12 '21 19:11 DUOLabs333

Nice!

nekename avatar Nov 12 '21 19:11 nekename