To lock your screen on MacOS just type this command line on terminal:
osascript -e 'tell application "System Events" to keystroke "q" using {control down, command down}'
To lock your screen on MacOS just type this command line on terminal:
osascript -e 'tell application "System Events" to keystroke "q" using {control down, command down}'