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

Use ⌃⌘Q to lock screen #80

Merged
merged 4 commits into from
Feb 26, 2024

Conversation

necojackarc
Copy link
Contributor

/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession is no longer available in newer macOS versions (see https://apple.stackexchange.com/questions/409820/access-fast-user-switching-from-a-script-in-big-sur).

Also, what the Option–Command–Power button does is to put your Mac to sleep, according to the official document https://support.apple.com/en-gb/HT201236

`/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession` is no longer available in newer macOS versions (see https://apple.stackexchange.com/questions/409820/access-fast-user-switching-from-a-script-in-big-sur).

Also, what Option–Command–Power button does is to put your Mac to sleep according to the offical document https://support.apple.com/en-gb/HT201236
Copy link

Summary of JSON file changes this PR will cause:

 json/windows_shortcuts.json | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

Detailed diffs:

json/windows_shortcuts.json
diff --git a/json/windows_shortcuts.json b/json/windows_shortcuts.json
index 93ebab3..aa68aed 100644
--- a/json/windows_shortcuts.json
+++ b/json/windows_shortcuts.json
@@ -1358,7 +1358,7 @@
          ]
       },
       {
-         "description": "L (Win) [Login Window]",
+         "description": "L (Win) [Lock Screen]",
          "manipulators": [
             {
                "from": {
@@ -1374,7 +1374,11 @@
                },
                "to": [
                   {
-                     "shell_command": "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"
+                     "key_code": "q",
+                     "modifiers": [
+                        "control",
+                        "command"
+                     ]
                   }
                ],
                "type": "basic"
@@ -1382,7 +1386,7 @@
          ]
       },
       {
-         "description": "L (Win) [Lock Screen]",
+         "description": "L (Win) [Sleep]",
          "manipulators": [
             {
                "from": {
@@ -1410,7 +1414,7 @@
          ]
       },
       {
-         "description": "L (Alt+Ctrl) [Login Window]",
+         "description": "L (Alt+Ctrl) [Lock Screen]",
          "manipulators": [
             {
                "from": {
@@ -1427,7 +1431,11 @@
                },
                "to": [
                   {
-                     "shell_command": "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"
+                     "key_code": "q",
+                     "modifiers": [
+                        "control",
+                        "command"
+                     ]
                   }
                ],
                "type": "basic"
@@ -1435,7 +1443,7 @@
          ]
       },
       {
-         "description": "L (Alt+Ctrl) [Lock Screen]",
+         "description": "L (Alt+Ctrl) [Sleep]",
          "manipulators": [
             {
                "from": {

@rux616
Copy link
Owner

rux616 commented Feb 26, 2024

Thanks for the PR! Apologies for not getting to it sooner; I've been on vacation.

Looks like GitHub is having a Moment, so I'll get this approved and merge once it comes back.

@rux616 rux616 merged commit 1aba248 into rux616:master Feb 26, 2024
4 checks passed
@necojackarc necojackarc deleted the re-assign-win-l-shortcut branch February 27, 2024 09:18
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

Successfully merging this pull request may close these issues.

2 participants