Skip to content

Commit

Permalink
universal app
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyclenerd committed Mar 12, 2023
1 parent 0e4088a commit e56f345
Show file tree
Hide file tree
Showing 65 changed files with 2,503 additions and 110 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# macOS Shutdown, Restart, Sleep and Log Out App

I built four simple Apple Automator apps:
[![Bagde: Apple](https://img.shields.io/badge/Apple-000000.svg?logo=apple&logoColor=white)](https://github.com/Cyclenerd/macos-missing-shutdown-app#readme)

Four simple Apple Automator apps:

* Shutdown.app
* Restart.app
* Sleep.app
* Log Out.app

For example, if you copy these apps to your application folder, you can use Spotlight Search to shut down your Mac.
Copy these apps to your application folder. Use Spotlight Search to shut down your Mac.

![Spotlight](images/shutdown-spotlight.png)


## Installation

[![Download](https://www.nkn-it.de/img/download_button_200px.png)](https://github.com/Cyclenerd/macos-missing-shutdown-app/releases/download/v1.0/Apps.zip)
[![Download](https://www.nkn-it.de/img/download_button_200px.png)](https://github.com/Cyclenerd/macos-missing-shutdown-app/releases/download/v1.1/Apps.zip)

Just download `Apps.zip` and copy the apps into your application (`~/Applications`) folder.
Just download [`Apps.zip`](https://github.com/Cyclenerd/macos-missing-shutdown-app/releases/download/v1.1/Apps.zip) and copy the apps into your application (`~/Applications`) folder.

## Apps

Expand All @@ -25,31 +27,38 @@ Just download `Apps.zip` and copy the apps into your application (`~/Application
Shut down without showing a confirmation dialog.

Apple Script:
`tell app "System Events" to shut down`

```
tell app "System Events" to shut down
```

### Restart.app

Restart without showing a confirmation dialog.

Apple Script:
`tell app "System Events" to restart`
```
tell app "System Events" to restart
```


### Sleep.app

Go to sleep without showing a confirmation dialog.

Apple Script:
`tell app "System Events" to sleep`
```
tell app "System Events" to sleep
```


### Log Out.app

Log out after showing a confirmation dialog.

Apple Script:
`tell app "System Events" to log out`
```
tell app "System Events" to log out
```


## Icons
Expand All @@ -58,7 +67,7 @@ If you modify and save the app with Apple Automator, the icon will be reset.

You can set the icon again:

```
```shell
rm "~/Applications/Log Out.app/Icon"*
cp images/logout.icns "~/Applications/Log Out.app/Contents/Resources/AutomatorApplet.icns"
```
Expand Down
53 changes: 36 additions & 17 deletions apps/Log Out.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>AMStayOpen</key>
<false/>
<key>BuildMachineOSBuild</key>
<string>16B2657</string>
<string>20A241133</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
Expand All @@ -30,11 +30,11 @@
</dict>
</array>
<key>CFBundleExecutable</key>
<string>Application Stub</string>
<string>Automator Application Stub</string>
<key>CFBundleIconFile</key>
<string>AutomatorApplet</string>
<string>ApplicationStub</string>
<key>CFBundleIdentifier</key>
<string>com.apple.automator.Log Out</string>
<string>com.apple.automator.Log-Out</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -52,36 +52,55 @@
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>444.7</string>
<string>520</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9P107g</string>
<string>14A6270d</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<string>13.2</string>
<key>DTSDKBuild</key>
<string>17F2</string>
<string>22D36</string>
<key>DTSDKName</key>
<string>macosx10.13internal</string>
<string>macosx13.2.internal</string>
<key>DTXcode</key>
<string>0930</string>
<string>1400</string>
<key>DTXcodeBuild</key>
<string>9P107g</string>
<string>14A6270d</string>
<key>LSMinimumSystemVersion</key>
<string>10.5</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<string>10.9</string>
<key>LSUIElement</key>
<true/>
<key>NSAppleEventsUsageDescription</key>
<string>This workflow needs to control other applications to run.</string>
<key>NSAppleMusicUsageDescription</key>
<string>This workflow needs access to your music to run.</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSCalendarsUsageDescription</key>
<string>This workflow needs access to your calendars to run.</string>
<key>NSCameraUsageDescription</key>
<string>This workflow needs access to your camera to run.</string>
<key>NSContactsUsageDescription</key>
<string>This workflow needs access to your contacts to run.</string>
<key>NSHomeKitUsageDescription</key>
<string>This workflow needs access to your HomeKit Home to run.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This workflow needs access to your microphone to run.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This workflow needs access to your photos to run.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSRemindersUsageDescription</key>
<string>This workflow needs access to your reminders to run.</string>
<key>NSServices</key>
<array/>
<key>NSSiriUsageDescription</key>
<string>This workflow needs access to Siri to run.</string>
<key>NSSystemAdministrationUsageDescription</key>
<string>This workflow needs access to administer this system in order to run.</string>
<key>UTExportedTypeDeclarations</key>
<array/>
<key>UTImportedTypeDeclarations</key>
Expand Down
Binary file removed apps/Log Out.app/Contents/MacOS/Application Stub
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added apps/Log Out.app/Contents/Resources/Assets.car
Binary file not shown.
Binary file not shown.
Binary file not shown.
171 changes: 171 additions & 0 deletions apps/Log Out.app/Contents/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Resources/ApplicationStub.icns</key>
<data>
RYTqh+7iocnEIV8iTs9EgJjEkO4=
</data>
<key>Resources/Assets.car</key>
<data>
+EyHXsSpe2QgUC474KHf/eJJOCo=
</data>
<key>Resources/InfoPlist.loctable</key>
<data>
GFHRfFTmEbAuZE1iyKibKmkU2+0=
</data>
</dict>
<key>files2</key>
<dict>
<key>Resources/ApplicationStub.icns</key>
<dict>
<key>hash</key>
<data>
RYTqh+7iocnEIV8iTs9EgJjEkO4=
</data>
<key>hash2</key>
<data>
odOqeBevxysHIbR5V5qgZz11qTuV9cL5jKaIcUw3R0I=
</data>
</dict>
<key>Resources/Assets.car</key>
<dict>
<key>hash</key>
<data>
+EyHXsSpe2QgUC474KHf/eJJOCo=
</data>
<key>hash2</key>
<data>
dsrJNb9XLiM6FpWXiJbLeUQWQeP3OK8zhQP9vrXz74c=
</data>
</dict>
<key>Resources/InfoPlist.loctable</key>
<dict>
<key>hash</key>
<data>
GFHRfFTmEbAuZE1iyKibKmkU2+0=
</data>
<key>hash2</key>
<data>
UOUbWh1OGuLBljFDZpqdwARDPWymLLRuoV5MvojegUE=
</data>
</dict>
<key>document.wflow</key>
<dict>
<key>cdhash</key>
<data>
YDMFmYiWlQA1P7LobDCmIubrGGs=
</data>
<key>requirement</key>
<string>cdhash H"f7363fea9c8cbbd9df2c4e2a59ca6964709f492e" or cdhash H"6033059988969500353fb2e86c30a622e6eb186b"</string>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
Loading

0 comments on commit e56f345

Please sign in to comment.