├── Sleep.jpg ├── Sleep.zip ├── Sleep ├── Sleep │ ├── Icon.icns │ ├── Sleep.entitlements │ ├── Info.plist │ ├── AppDelegate.swift │ └── Base.lproj │ │ └── MainMenu.xib └── Sleep.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── Patrick.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── Sleep.xccheckout │ ├── xcuserdata │ └── Patrick.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── Sleep.xcscheme │ └── project.pbxproj ├── .gitignore ├── README.md └── LICENSE /Sleep.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nscoding/sleep-osx/HEAD/Sleep.jpg -------------------------------------------------------------------------------- /Sleep.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nscoding/sleep-osx/HEAD/Sleep.zip -------------------------------------------------------------------------------- /Sleep/Sleep/Icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nscoding/sleep-osx/HEAD/Sleep/Sleep/Icon.icns -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS generated files # 2 | ###################### 3 | 4 | .DS_Store 5 | .DS_Store? 6 | ._* 7 | .Spotlight-V100 8 | xcuserdata 9 | -------------------------------------------------------------------------------- /Sleep/Sleep.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sleep/Sleep.xcodeproj/project.xcworkspace/xcuserdata/Patrick.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nscoding/sleep-osx/HEAD/Sleep/Sleep.xcodeproj/project.xcworkspace/xcuserdata/Patrick.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Sleep/Sleep.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sleep/Sleep/Sleep.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Sleep 2 | ========= 3 | 4 | A Swift app to put your computer to sleep directly from Spotlight. Just build the app and install it in your applications folder. 5 | 6 | [](http://nscoding.co.uk) 7 | 8 | ###Download 9 | 10 | You can download a signed version from [here](http://nscoding.co.uk/downloads/SleepOSX100.zip) 11 | 12 | ###Contact 13 | 14 | [Patrick Chamelo](https://github.com/nscoding)
15 | [@nscoding](https://twitter.com/nscoding) 16 | 17 | ###Icon 18 | 19 | [Kylan McBride](https://github.com/kmcbride) 20 | 21 | ###License 22 | 23 | Sleep is available under the MIT license. See the LICENSE file for details. 24 | 25 | Enjoy! 26 | 27 | Patrick Chamelo. 28 | -------------------------------------------------------------------------------- /Sleep/Sleep.xcodeproj/xcuserdata/Patrick.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Sleep.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | CD77A73B1990FF3B00758F4A 16 | 17 | primary 18 | 19 | 20 | CD77A74D1990FF3B00758F4A 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Patrick Chamelo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Sleep/Sleep/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | Icon.icns 11 | CFBundleIdentifier 12 | com.nscoding.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 100 25 | LSApplicationCategoryType 26 | public.app-category.productivity 27 | LSMinimumSystemVersion 28 | ${MACOSX_DEPLOYMENT_TARGET} 29 | LSUIElement 30 | 31 | NSHumanReadableCopyright 32 | Copyright © 2014 Patrick Chamelo, Kylan McBride. All rights reserved. 33 | NSMainNibFile 34 | MainMenu 35 | NSPrincipalClass 36 | NSApplication 37 | 38 | 39 | -------------------------------------------------------------------------------- /Sleep/Sleep.xcodeproj/project.xcworkspace/xcshareddata/Sleep.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | CB3062D5-957C-4075-9DF8-77FA6CB074D6 9 | IDESourceControlProjectName 10 | Sleep 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 523F975ACF76085F5F2208B8B0116F0CBC224592 14 | github.com:nscoding/sleep-osx.git 15 | 16 | IDESourceControlProjectPath 17 | Sleep/Sleep.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 523F975ACF76085F5F2208B8B0116F0CBC224592 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:nscoding/sleep-osx.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 523F975ACF76085F5F2208B8B0116F0CBC224592 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 523F975ACF76085F5F2208B8B0116F0CBC224592 36 | IDESourceControlWCCName 37 | sleep-osx 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Sleep/Sleep/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Sleep 4 | // 5 | // Created by Patrick Chamelo on 05/08/14. 6 | // Copyright (c) 2014 Patrick Chamelo. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | import Cocoa 27 | 28 | @NSApplicationMain 29 | class AppDelegate: NSObject, NSApplicationDelegate { 30 | 31 | func applicationDidFinishLaunching(_ aNotification: Notification) { 32 | let task = Process() 33 | task.launchPath = "/usr/bin/pmset" 34 | task.arguments = ["sleepnow"] 35 | task.launch() 36 | exit(0) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Sleep/Sleep.xcodeproj/xcuserdata/Patrick.xcuserdatad/xcschemes/Sleep.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Sleep/Sleep.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CD30616C1991360F00C1DEFA /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = CD30616B1991360F00C1DEFA /* Icon.icns */; }; 11 | CD77A7441990FF3B00758F4A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD77A7431990FF3B00758F4A /* AppDelegate.swift */; }; 12 | CDFCE60C19DC42A300760EFD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDFCE60B19DC42A300760EFD /* Foundation.framework */; }; 13 | CDFCE60E19DC42B100760EFD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDFCE60D19DC42B100760EFD /* Cocoa.framework */; }; 14 | CDFCE61219DC440D00760EFD /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD77A7471990FF3B00758F4A /* MainMenu.xib */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | 132A5A0321444BAE0019E44F /* Sleep.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Sleep.entitlements; sourceTree = ""; }; 19 | CD30616B1991360F00C1DEFA /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; 20 | CD77A73C1990FF3B00758F4A /* Sleep.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sleep.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | CD77A7401990FF3B00758F4A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 22 | CD77A7431990FF3B00758F4A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | CD77A7481990FF3B00758F4A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 24 | CDFCE60B19DC42A300760EFD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25 | CDFCE60D19DC42B100760EFD /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 26 | /* End PBXFileReference section */ 27 | 28 | /* Begin PBXFrameworksBuildPhase section */ 29 | CD77A7391990FF3B00758F4A /* Frameworks */ = { 30 | isa = PBXFrameworksBuildPhase; 31 | buildActionMask = 2147483647; 32 | files = ( 33 | CDFCE60E19DC42B100760EFD /* Cocoa.framework in Frameworks */, 34 | CDFCE60C19DC42A300760EFD /* Foundation.framework in Frameworks */, 35 | ); 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXFrameworksBuildPhase section */ 39 | 40 | /* Begin PBXGroup section */ 41 | CD77A7331990FF3B00758F4A = { 42 | isa = PBXGroup; 43 | children = ( 44 | CD77A73E1990FF3B00758F4A /* Sleep */, 45 | CD77A73D1990FF3B00758F4A /* Products */, 46 | ); 47 | sourceTree = ""; 48 | }; 49 | CD77A73D1990FF3B00758F4A /* Products */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | CD77A73C1990FF3B00758F4A /* Sleep.app */, 53 | ); 54 | name = Products; 55 | sourceTree = ""; 56 | }; 57 | CD77A73E1990FF3B00758F4A /* Sleep */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 132A5A0321444BAE0019E44F /* Sleep.entitlements */, 61 | CD77A7431990FF3B00758F4A /* AppDelegate.swift */, 62 | CD30616B1991360F00C1DEFA /* Icon.icns */, 63 | CDFCE61119DC42D100760EFD /* Libraries */, 64 | CD77A7471990FF3B00758F4A /* MainMenu.xib */, 65 | CD77A73F1990FF3B00758F4A /* Supporting Files */, 66 | ); 67 | path = Sleep; 68 | sourceTree = ""; 69 | }; 70 | CD77A73F1990FF3B00758F4A /* Supporting Files */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | CD77A7401990FF3B00758F4A /* Info.plist */, 74 | ); 75 | name = "Supporting Files"; 76 | sourceTree = ""; 77 | }; 78 | CDFCE61119DC42D100760EFD /* Libraries */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | CDFCE60D19DC42B100760EFD /* Cocoa.framework */, 82 | CDFCE60B19DC42A300760EFD /* Foundation.framework */, 83 | ); 84 | name = Libraries; 85 | path = ..; 86 | sourceTree = ""; 87 | }; 88 | /* End PBXGroup section */ 89 | 90 | /* Begin PBXNativeTarget section */ 91 | CD77A73B1990FF3B00758F4A /* Sleep */ = { 92 | isa = PBXNativeTarget; 93 | buildConfigurationList = CD77A7581990FF3B00758F4A /* Build configuration list for PBXNativeTarget "Sleep" */; 94 | buildPhases = ( 95 | CD91990B19DC470500945690 /* ShellScript */, 96 | CD77A7381990FF3B00758F4A /* Sources */, 97 | CD77A7391990FF3B00758F4A /* Frameworks */, 98 | CD77A73A1990FF3B00758F4A /* Resources */, 99 | ); 100 | buildRules = ( 101 | ); 102 | dependencies = ( 103 | ); 104 | name = Sleep; 105 | productName = Sleep; 106 | productReference = CD77A73C1990FF3B00758F4A /* Sleep.app */; 107 | productType = "com.apple.product-type.application"; 108 | }; 109 | /* End PBXNativeTarget section */ 110 | 111 | /* Begin PBXProject section */ 112 | CD77A7341990FF3B00758F4A /* Project object */ = { 113 | isa = PBXProject; 114 | attributes = { 115 | LastSwiftUpdateCheck = 0700; 116 | LastUpgradeCheck = 0940; 117 | ORGANIZATIONNAME = "Patrick Chamelo"; 118 | TargetAttributes = { 119 | CD77A73B1990FF3B00758F4A = { 120 | CreatedOnToolsVersion = 6.0; 121 | DevelopmentTeam = HPSF3D2F4U; 122 | ProvisioningStyle = Automatic; 123 | SystemCapabilities = { 124 | com.apple.Sandbox = { 125 | enabled = 1; 126 | }; 127 | }; 128 | }; 129 | }; 130 | }; 131 | buildConfigurationList = CD77A7371990FF3B00758F4A /* Build configuration list for PBXProject "Sleep" */; 132 | compatibilityVersion = "Xcode 3.2"; 133 | developmentRegion = English; 134 | hasScannedForEncodings = 0; 135 | knownRegions = ( 136 | en, 137 | Base, 138 | ); 139 | mainGroup = CD77A7331990FF3B00758F4A; 140 | productRefGroup = CD77A73D1990FF3B00758F4A /* Products */; 141 | projectDirPath = ""; 142 | projectRoot = ""; 143 | targets = ( 144 | CD77A73B1990FF3B00758F4A /* Sleep */, 145 | ); 146 | }; 147 | /* End PBXProject section */ 148 | 149 | /* Begin PBXResourcesBuildPhase section */ 150 | CD77A73A1990FF3B00758F4A /* Resources */ = { 151 | isa = PBXResourcesBuildPhase; 152 | buildActionMask = 2147483647; 153 | files = ( 154 | CD30616C1991360F00C1DEFA /* Icon.icns in Resources */, 155 | CDFCE61219DC440D00760EFD /* MainMenu.xib in Resources */, 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXResourcesBuildPhase section */ 160 | 161 | /* Begin PBXShellScriptBuildPhase section */ 162 | CD91990B19DC470500945690 /* ShellScript */ = { 163 | isa = PBXShellScriptBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | ); 167 | inputPaths = ( 168 | ); 169 | outputPaths = ( 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | shellPath = /bin/sh; 173 | shellScript = "buildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"${PROJECT_DIR}/${INFOPLIST_FILE}\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"${PROJECT_DIR}/${INFOPLIST_FILE}\"\n"; 174 | }; 175 | /* End PBXShellScriptBuildPhase section */ 176 | 177 | /* Begin PBXSourcesBuildPhase section */ 178 | CD77A7381990FF3B00758F4A /* Sources */ = { 179 | isa = PBXSourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | CD77A7441990FF3B00758F4A /* AppDelegate.swift in Sources */, 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | }; 186 | /* End PBXSourcesBuildPhase section */ 187 | 188 | /* Begin PBXVariantGroup section */ 189 | CD77A7471990FF3B00758F4A /* MainMenu.xib */ = { 190 | isa = PBXVariantGroup; 191 | children = ( 192 | CD77A7481990FF3B00758F4A /* Base */, 193 | ); 194 | name = MainMenu.xib; 195 | sourceTree = ""; 196 | }; 197 | /* End PBXVariantGroup section */ 198 | 199 | /* Begin XCBuildConfiguration section */ 200 | CD77A7561990FF3B00758F4A /* Debug */ = { 201 | isa = XCBuildConfiguration; 202 | buildSettings = { 203 | ALWAYS_SEARCH_USER_PATHS = NO; 204 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 205 | CLANG_CXX_LIBRARY = "libc++"; 206 | CLANG_ENABLE_MODULES = YES; 207 | CLANG_ENABLE_OBJC_ARC = YES; 208 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 209 | CLANG_WARN_BOOL_CONVERSION = YES; 210 | CLANG_WARN_COMMA = YES; 211 | CLANG_WARN_CONSTANT_CONVERSION = YES; 212 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 213 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 214 | CLANG_WARN_EMPTY_BODY = YES; 215 | CLANG_WARN_ENUM_CONVERSION = YES; 216 | CLANG_WARN_INFINITE_RECURSION = YES; 217 | CLANG_WARN_INT_CONVERSION = YES; 218 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 219 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 220 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 221 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 222 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 223 | CLANG_WARN_STRICT_PROTOTYPES = YES; 224 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 225 | CLANG_WARN_UNREACHABLE_CODE = YES; 226 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 227 | CODE_SIGN_IDENTITY = "Mac Developer"; 228 | COPY_PHASE_STRIP = NO; 229 | ENABLE_STRICT_OBJC_MSGSEND = YES; 230 | ENABLE_TESTABILITY = YES; 231 | GCC_C_LANGUAGE_STANDARD = gnu99; 232 | GCC_DYNAMIC_NO_PIC = NO; 233 | GCC_NO_COMMON_BLOCKS = YES; 234 | GCC_OPTIMIZATION_LEVEL = 0; 235 | GCC_PREPROCESSOR_DEFINITIONS = ( 236 | "DEBUG=1", 237 | "$(inherited)", 238 | ); 239 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 240 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 241 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 242 | GCC_WARN_UNDECLARED_SELECTOR = YES; 243 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 244 | GCC_WARN_UNUSED_FUNCTION = YES; 245 | GCC_WARN_UNUSED_VARIABLE = YES; 246 | MACOSX_DEPLOYMENT_TARGET = 10.10; 247 | MTL_ENABLE_DEBUG_INFO = YES; 248 | ONLY_ACTIVE_ARCH = YES; 249 | SDKROOT = macosx; 250 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 251 | }; 252 | name = Debug; 253 | }; 254 | CD77A7571990FF3B00758F4A /* Release */ = { 255 | isa = XCBuildConfiguration; 256 | buildSettings = { 257 | ALWAYS_SEARCH_USER_PATHS = NO; 258 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 259 | CLANG_CXX_LIBRARY = "libc++"; 260 | CLANG_ENABLE_MODULES = YES; 261 | CLANG_ENABLE_OBJC_ARC = YES; 262 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 263 | CLANG_WARN_BOOL_CONVERSION = YES; 264 | CLANG_WARN_COMMA = YES; 265 | CLANG_WARN_CONSTANT_CONVERSION = YES; 266 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 267 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 268 | CLANG_WARN_EMPTY_BODY = YES; 269 | CLANG_WARN_ENUM_CONVERSION = YES; 270 | CLANG_WARN_INFINITE_RECURSION = YES; 271 | CLANG_WARN_INT_CONVERSION = YES; 272 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 273 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 274 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 276 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 277 | CLANG_WARN_STRICT_PROTOTYPES = YES; 278 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 279 | CLANG_WARN_UNREACHABLE_CODE = YES; 280 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 281 | CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; 282 | COPY_PHASE_STRIP = YES; 283 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 284 | ENABLE_NS_ASSERTIONS = NO; 285 | ENABLE_STRICT_OBJC_MSGSEND = YES; 286 | GCC_C_LANGUAGE_STANDARD = gnu99; 287 | GCC_NO_COMMON_BLOCKS = YES; 288 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 289 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 290 | GCC_WARN_UNDECLARED_SELECTOR = YES; 291 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 292 | GCC_WARN_UNUSED_FUNCTION = YES; 293 | GCC_WARN_UNUSED_VARIABLE = YES; 294 | MACOSX_DEPLOYMENT_TARGET = 10.10; 295 | MTL_ENABLE_DEBUG_INFO = NO; 296 | SDKROOT = macosx; 297 | SWIFT_COMPILATION_MODE = wholemodule; 298 | }; 299 | name = Release; 300 | }; 301 | CD77A7591990FF3B00758F4A /* Debug */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | CODE_SIGN_ENTITLEMENTS = Sleep/Sleep.entitlements; 305 | CODE_SIGN_IDENTITY = "Mac Developer"; 306 | CODE_SIGN_STYLE = Automatic; 307 | COMBINE_HIDPI_IMAGES = YES; 308 | DEVELOPMENT_TEAM = ""; 309 | GCC_OPTIMIZATION_LEVEL = s; 310 | INFOPLIST_FILE = Sleep/Info.plist; 311 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 312 | MACOSX_DEPLOYMENT_TARGET = 10.11; 313 | ONLY_ACTIVE_ARCH = YES; 314 | PRODUCT_BUNDLE_IDENTIFIER = "com.nscoding.${PRODUCT_NAME:rfc1034identifier}"; 315 | PRODUCT_NAME = "$(TARGET_NAME)"; 316 | PROVISIONING_PROFILE = ""; 317 | PROVISIONING_PROFILE_SPECIFIER = ""; 318 | SWIFT_VERSION = 4.0; 319 | }; 320 | name = Debug; 321 | }; 322 | CD77A75A1990FF3B00758F4A /* Release */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | CODE_SIGN_ENTITLEMENTS = Sleep/Sleep.entitlements; 326 | CODE_SIGN_IDENTITY = "Mac Developer"; 327 | CODE_SIGN_STYLE = Automatic; 328 | COMBINE_HIDPI_IMAGES = YES; 329 | DEVELOPMENT_TEAM = ""; 330 | INFOPLIST_FILE = Sleep/Info.plist; 331 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 332 | MACOSX_DEPLOYMENT_TARGET = 10.11; 333 | PRODUCT_BUNDLE_IDENTIFIER = "com.nscoding.${PRODUCT_NAME:rfc1034identifier}"; 334 | PRODUCT_NAME = "$(TARGET_NAME)"; 335 | PROVISIONING_PROFILE = ""; 336 | PROVISIONING_PROFILE_SPECIFIER = ""; 337 | SWIFT_VERSION = 4.0; 338 | }; 339 | name = Release; 340 | }; 341 | /* End XCBuildConfiguration section */ 342 | 343 | /* Begin XCConfigurationList section */ 344 | CD77A7371990FF3B00758F4A /* Build configuration list for PBXProject "Sleep" */ = { 345 | isa = XCConfigurationList; 346 | buildConfigurations = ( 347 | CD77A7561990FF3B00758F4A /* Debug */, 348 | CD77A7571990FF3B00758F4A /* Release */, 349 | ); 350 | defaultConfigurationIsVisible = 0; 351 | defaultConfigurationName = Release; 352 | }; 353 | CD77A7581990FF3B00758F4A /* Build configuration list for PBXNativeTarget "Sleep" */ = { 354 | isa = XCConfigurationList; 355 | buildConfigurations = ( 356 | CD77A7591990FF3B00758F4A /* Debug */, 357 | CD77A75A1990FF3B00758F4A /* Release */, 358 | ); 359 | defaultConfigurationIsVisible = 0; 360 | defaultConfigurationName = Release; 361 | }; 362 | /* End XCConfigurationList section */ 363 | }; 364 | rootObject = CD77A7341990FF3B00758F4A /* Project object */; 365 | } 366 | -------------------------------------------------------------------------------- /Sleep/Sleep/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | Default 535 | 536 | 537 | 538 | 539 | 540 | 541 | Left to Right 542 | 543 | 544 | 545 | 546 | 547 | 548 | Right to Left 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | Default 560 | 561 | 562 | 563 | 564 | 565 | 566 | Left to Right 567 | 568 | 569 | 570 | 571 | 572 | 573 | Right to Left 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | --------------------------------------------------------------------------------