Sleep Shutdown Eject Keyboard Shortcuts

Discussion in 'Customization' started by vulgo, May 8, 2017.

  1. vulgo

    vulgo

    Joined:
    Jul 24, 2015
    Messages:
    1,274
    Mobo:
    MSI H81i
    CPU:
    i5-4570
    Graphics:
    GTX 970
    Mac:
    iMac
    Mobile Phone:
    Android
    May 8, 2017 at 12:03 PM #1
    vulgo

    vulgo

    Joined:
    Jul 24, 2015
    Messages:
    1,274
    Mobo:
    MSI H81i
    CPU:
    i5-4570
    Graphics:
    GTX 970
    Mac:
    iMac
    Mobile Phone:
    Android
    Real macs can be put to sleep or shut down with their keyboards

    Option + Command + Eject


    Go to sleep

    Control + Option + Command + Eject

    Shut Down

    Small hack emulating this behaviour with macOS Services

    Attached to this post are 2 scripts. Open/edit the 'Power Off' script in automator and provide your password. For example if your password was "tonymacx86" you would edit the line

    Code (Text):
    set pass to "password" as string
    to read

    Code (Text):
    set pass to "tonymacx86" as string
    Now the scripts can be installed to ~/Library/Services and keyboard shortcuts of your choosing assigned!

    Eject and close the optical drive tray

    See post #5
     
    cloudy likes this.

    Attached Files:

    Last edited: Jun 4, 2017
  2. cloudy

    cloudy

    Joined:
    May 25, 2010
    Messages:
    19
    Mobo:
    ML/Mav with shutdown/wake-up issue
    CPU:
    i7-4770
    Graphics:
    Intel4600 on ga-z87m-d3h
    Mac:
    MacBook Air, MacBook Pro, Mac mini
    Mobile Phone:
    iOS
    Jun 3, 2017 at 11:10 AM #2
    cloudy

    cloudy

    Joined:
    May 25, 2010
    Messages:
    19
    Mobo:
    ML/Mav with shutdown/wake-up issue
    CPU:
    i7-4770
    Graphics:
    Intel4600 on ga-z87m-d3h
    Mac:
    MacBook Air, MacBook Pro, Mac mini
    Mobile Phone:
    iOS
    Hi, vulgo
    Thanks for these very useful scripts.
    And I have a request. Could you make a script to open/close cd tray?
    Thanks in advance.
     
  3. vulgo

    vulgo

    Joined:
    Jul 24, 2015
    Messages:
    1,274
    Mobo:
    MSI H81i
    CPU:
    i5-4570
    Graphics:
    GTX 970
    Mac:
    iMac
    Mobile Phone:
    Android
    Jun 3, 2017 at 6:43 PM #3
    vulgo

    vulgo

    Joined:
    Jul 24, 2015
    Messages:
    1,274
    Mobo:
    MSI H81i
    CPU:
    i5-4570
    Graphics:
    GTX 970
    Mac:
    iMac
    Mobile Phone:
    Android
    Glad you find them useful. I don't have an optical drive for testing, but this macrumors thread seems to have a solution for CD tray automation. See attached archive containing the commands as services.

    Credits for usage of drutil command: tjwett over on macrumors forums
     
    Last edited: Jun 4, 2017
  4. cloudy

    cloudy

    Joined:
    May 25, 2010
    Messages:
    19
    Mobo:
    ML/Mav with shutdown/wake-up issue
    CPU:
    i7-4770
    Graphics:
    Intel4600 on ga-z87m-d3h
    Mac:
    MacBook Air, MacBook Pro, Mac mini
    Mobile Phone:
    iOS
    Jun 4, 2017 at 1:22 AM #4
    cloudy

    cloudy

    Joined:
    May 25, 2010
    Messages:
    19
    Mobo:
    ML/Mav with shutdown/wake-up issue
    CPU:
    i7-4770
    Graphics:
    Intel4600 on ga-z87m-d3h
    Mac:
    MacBook Air, MacBook Pro, Mac mini
    Mobile Phone:
    iOS
    Thank you for this, vulgo.
    drutil command works good on terminal app. but unfortunately i have failed to add your workflow as a service. I will try it again later. Thank you.
     
  5. vulgo

    vulgo

    Joined:
    Jul 24, 2015
    Messages:
    1,274
    Mobo:
    MSI H81i
    CPU:
    i5-4570
    Graphics:
    GTX 970
    Mac:
    iMac
    Mobile Phone:
    Android
    Jun 4, 2017 at 10:15 AM #5
    vulgo

    vulgo

    Joined:
    Jul 24, 2015
    Messages:
    1,274
    Mobo:
    MSI H81i
    CPU:
    i5-4570
    Graphics:
    GTX 970
    Mac:
    iMac
    Mobile Phone:
    Android
    My fault i hadn't set the workflow input parameter to none. Uninstall the existing files from ~/Library/Services if they are there and try these ones attached.
     

    Attached Files:

  6. cloudy

    cloudy

    Joined:
    May 25, 2010
    Messages:
    19
    Mobo:
    ML/Mav with shutdown/wake-up issue
    CPU:
    i7-4770
    Graphics:
    Intel4600 on ga-z87m-d3h
    Mac:
    MacBook Air, MacBook Pro, Mac mini
    Mobile Phone:
    iOS
    Jun 6, 2017 at 12:27 AM #6
    cloudy

    cloudy

    Joined:
    May 25, 2010
    Messages:
    19
    Mobo:
    ML/Mav with shutdown/wake-up issue
    CPU:
    i7-4770
    Graphics:
    Intel4600 on ga-z87m-d3h
    Mac:
    MacBook Air, MacBook Pro, Mac mini
    Mobile Phone:
    iOS
    Works great! Thank you vulgo! Very useful for the hackintosh world.
     

Share This Page