Is there any way to check if screen is locked in shell or applescript? Not just check if screensaver is running, but screen is locked by energy saver settings or by pressing โŒƒโ‡งโ (shift+control+eject).

Thank you in advance.

Edit
Report