├── .gitignore ├── AppIcon.idraw ├── AppIcon.png ├── LICENSE ├── Mac Activity Indicator.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── Mac Activity Indicator.xcscheme ├── Mac Activity Indicator ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ └── appicon.png ├── Base.lproj │ └── MainMenu.xib ├── Info.plist ├── appicon.idraw ├── icon.idraw ├── icondim.png ├── icondim@2x.png ├── iconlit.png ├── iconlit@2x.png └── main.m ├── MenuIcon.idraw └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /AppIcon.idraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/AppIcon.idraw -------------------------------------------------------------------------------- /AppIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/AppIcon.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /Mac Activity Indicator.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3319A9EE1E085437005DB79C /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 3319A9EC1E085437005DB79C /* LICENSE */; }; 11 | 3319A9EF1E085437005DB79C /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 3319A9ED1E085437005DB79C /* README.md */; }; 12 | 336F747B1E07EC92009BCC1B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 336F747A1E07EC92009BCC1B /* main.m */; }; 13 | 336F747D1E07EC92009BCC1B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 336F747C1E07EC92009BCC1B /* Assets.xcassets */; }; 14 | 336F74801E07EC92009BCC1B /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 336F747E1E07EC92009BCC1B /* MainMenu.xib */; }; 15 | 336F74911E07ECB8009BCC1B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 336F74901E07ECB8009BCC1B /* AppDelegate.m */; }; 16 | 33E522051FC6180F004927FE /* iconlit@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 33E522011FC6180F004927FE /* iconlit@2x.png */; }; 17 | 33E522061FC6180F004927FE /* icondim.png in Resources */ = {isa = PBXBuildFile; fileRef = 33E522021FC6180F004927FE /* icondim.png */; }; 18 | 33E522071FC6180F004927FE /* icondim@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 33E522031FC6180F004927FE /* icondim@2x.png */; }; 19 | 33E522081FC6180F004927FE /* iconlit.png in Resources */ = {isa = PBXBuildFile; fileRef = 33E522041FC6180F004927FE /* iconlit.png */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 3319A9EC1E085437005DB79C /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; }; 24 | 3319A9ED1E085437005DB79C /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; 25 | 336F74731E07EC92009BCC1B /* Mac Activity Indicator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mac Activity Indicator.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 336F747A1E07EC92009BCC1B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 27 | 336F747C1E07EC92009BCC1B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | 336F747F1E07EC92009BCC1B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 29 | 336F74811E07EC92009BCC1B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | 336F748F1E07ECB8009BCC1B /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 31 | 336F74901E07ECB8009BCC1B /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 32 | 33E522011FC6180F004927FE /* iconlit@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iconlit@2x.png"; sourceTree = ""; }; 33 | 33E522021FC6180F004927FE /* icondim.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icondim.png; sourceTree = ""; }; 34 | 33E522031FC6180F004927FE /* icondim@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icondim@2x.png"; sourceTree = ""; }; 35 | 33E522041FC6180F004927FE /* iconlit.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = iconlit.png; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 336F74701E07EC92009BCC1B /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | 336F746A1E07EC92009BCC1B = { 50 | isa = PBXGroup; 51 | children = ( 52 | 336F74751E07EC92009BCC1B /* Mac Activity Indicator */, 53 | 336F74741E07EC92009BCC1B /* Products */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | 336F74741E07EC92009BCC1B /* Products */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 336F74731E07EC92009BCC1B /* Mac Activity Indicator.app */, 61 | ); 62 | name = Products; 63 | sourceTree = ""; 64 | }; 65 | 336F74751E07EC92009BCC1B /* Mac Activity Indicator */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 336F748F1E07ECB8009BCC1B /* AppDelegate.h */, 69 | 336F74901E07ECB8009BCC1B /* AppDelegate.m */, 70 | 336F74791E07EC92009BCC1B /* Supporting Files */, 71 | ); 72 | path = "Mac Activity Indicator"; 73 | sourceTree = ""; 74 | }; 75 | 336F74791E07EC92009BCC1B /* Supporting Files */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 33E522021FC6180F004927FE /* icondim.png */, 79 | 33E522031FC6180F004927FE /* icondim@2x.png */, 80 | 33E522041FC6180F004927FE /* iconlit.png */, 81 | 33E522011FC6180F004927FE /* iconlit@2x.png */, 82 | 336F747C1E07EC92009BCC1B /* Assets.xcassets */, 83 | 336F747E1E07EC92009BCC1B /* MainMenu.xib */, 84 | 336F74811E07EC92009BCC1B /* Info.plist */, 85 | 3319A9EC1E085437005DB79C /* LICENSE */, 86 | 3319A9ED1E085437005DB79C /* README.md */, 87 | 336F747A1E07EC92009BCC1B /* main.m */, 88 | ); 89 | name = "Supporting Files"; 90 | sourceTree = ""; 91 | }; 92 | /* End PBXGroup section */ 93 | 94 | /* Begin PBXNativeTarget section */ 95 | 336F74721E07EC92009BCC1B /* Mac Activity Indicator */ = { 96 | isa = PBXNativeTarget; 97 | buildConfigurationList = 336F74841E07EC92009BCC1B /* Build configuration list for PBXNativeTarget "Mac Activity Indicator" */; 98 | buildPhases = ( 99 | 336F746F1E07EC92009BCC1B /* Sources */, 100 | 336F74701E07EC92009BCC1B /* Frameworks */, 101 | 336F74711E07EC92009BCC1B /* Resources */, 102 | ); 103 | buildRules = ( 104 | ); 105 | dependencies = ( 106 | ); 107 | name = "Mac Activity Indicator"; 108 | productName = "MacOS Activity Indicator"; 109 | productReference = 336F74731E07EC92009BCC1B /* Mac Activity Indicator.app */; 110 | productType = "com.apple.product-type.application"; 111 | }; 112 | /* End PBXNativeTarget section */ 113 | 114 | /* Begin PBXProject section */ 115 | 336F746B1E07EC92009BCC1B /* Project object */ = { 116 | isa = PBXProject; 117 | attributes = { 118 | LastUpgradeCheck = 0820; 119 | ORGANIZATIONNAME = "Milan Toth"; 120 | TargetAttributes = { 121 | 336F74721E07EC92009BCC1B = { 122 | CreatedOnToolsVersion = 8.2; 123 | DevelopmentTeam = KAX983KY52; 124 | ProvisioningStyle = Automatic; 125 | SystemCapabilities = { 126 | com.apple.Sandbox = { 127 | enabled = 0; 128 | }; 129 | }; 130 | }; 131 | }; 132 | }; 133 | buildConfigurationList = 336F746E1E07EC92009BCC1B /* Build configuration list for PBXProject "Mac Activity Indicator" */; 134 | compatibilityVersion = "Xcode 3.2"; 135 | developmentRegion = English; 136 | hasScannedForEncodings = 0; 137 | knownRegions = ( 138 | en, 139 | Base, 140 | ); 141 | mainGroup = 336F746A1E07EC92009BCC1B; 142 | productRefGroup = 336F74741E07EC92009BCC1B /* Products */; 143 | projectDirPath = ""; 144 | projectRoot = ""; 145 | targets = ( 146 | 336F74721E07EC92009BCC1B /* Mac Activity Indicator */, 147 | ); 148 | }; 149 | /* End PBXProject section */ 150 | 151 | /* Begin PBXResourcesBuildPhase section */ 152 | 336F74711E07EC92009BCC1B /* Resources */ = { 153 | isa = PBXResourcesBuildPhase; 154 | buildActionMask = 2147483647; 155 | files = ( 156 | 33E522081FC6180F004927FE /* iconlit.png in Resources */, 157 | 336F747D1E07EC92009BCC1B /* Assets.xcassets in Resources */, 158 | 33E522051FC6180F004927FE /* iconlit@2x.png in Resources */, 159 | 3319A9EE1E085437005DB79C /* LICENSE in Resources */, 160 | 336F74801E07EC92009BCC1B /* MainMenu.xib in Resources */, 161 | 33E522071FC6180F004927FE /* icondim@2x.png in Resources */, 162 | 33E522061FC6180F004927FE /* icondim.png in Resources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXResourcesBuildPhase section */ 167 | 168 | /* Begin PBXSourcesBuildPhase section */ 169 | 336F746F1E07EC92009BCC1B /* Sources */ = { 170 | isa = PBXSourcesBuildPhase; 171 | buildActionMask = 2147483647; 172 | files = ( 173 | 3319A9EF1E085437005DB79C /* README.md in Sources */, 174 | 336F74911E07ECB8009BCC1B /* AppDelegate.m in Sources */, 175 | 336F747B1E07EC92009BCC1B /* main.m in Sources */, 176 | ); 177 | runOnlyForDeploymentPostprocessing = 0; 178 | }; 179 | /* End PBXSourcesBuildPhase section */ 180 | 181 | /* Begin PBXVariantGroup section */ 182 | 336F747E1E07EC92009BCC1B /* MainMenu.xib */ = { 183 | isa = PBXVariantGroup; 184 | children = ( 185 | 336F747F1E07EC92009BCC1B /* Base */, 186 | ); 187 | name = MainMenu.xib; 188 | sourceTree = ""; 189 | }; 190 | /* End PBXVariantGroup section */ 191 | 192 | /* Begin XCBuildConfiguration section */ 193 | 336F74821E07EC92009BCC1B /* Debug */ = { 194 | isa = XCBuildConfiguration; 195 | buildSettings = { 196 | ALWAYS_SEARCH_USER_PATHS = NO; 197 | CLANG_ANALYZER_NONNULL = YES; 198 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 199 | CLANG_CXX_LIBRARY = "libc++"; 200 | CLANG_ENABLE_MODULES = YES; 201 | CLANG_ENABLE_OBJC_ARC = NO; 202 | CLANG_WARN_BOOL_CONVERSION = YES; 203 | CLANG_WARN_CONSTANT_CONVERSION = YES; 204 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 205 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 206 | CLANG_WARN_EMPTY_BODY = YES; 207 | CLANG_WARN_ENUM_CONVERSION = YES; 208 | CLANG_WARN_INFINITE_RECURSION = YES; 209 | CLANG_WARN_INT_CONVERSION = YES; 210 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 211 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 212 | CLANG_WARN_UNREACHABLE_CODE = YES; 213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 214 | CODE_SIGN_IDENTITY = "-"; 215 | COPY_PHASE_STRIP = NO; 216 | DEBUG_INFORMATION_FORMAT = dwarf; 217 | ENABLE_STRICT_OBJC_MSGSEND = YES; 218 | ENABLE_TESTABILITY = YES; 219 | GCC_C_LANGUAGE_STANDARD = gnu99; 220 | GCC_DYNAMIC_NO_PIC = NO; 221 | GCC_NO_COMMON_BLOCKS = YES; 222 | GCC_OPTIMIZATION_LEVEL = 0; 223 | GCC_PREPROCESSOR_DEFINITIONS = ( 224 | "DEBUG=1", 225 | "$(inherited)", 226 | ); 227 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 228 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 229 | GCC_WARN_UNDECLARED_SELECTOR = YES; 230 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 231 | GCC_WARN_UNUSED_FUNCTION = YES; 232 | GCC_WARN_UNUSED_VARIABLE = YES; 233 | MACOSX_DEPLOYMENT_TARGET = 10.12; 234 | MTL_ENABLE_DEBUG_INFO = YES; 235 | ONLY_ACTIVE_ARCH = YES; 236 | SDKROOT = macosx; 237 | }; 238 | name = Debug; 239 | }; 240 | 336F74831E07EC92009BCC1B /* Release */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_ANALYZER_NONNULL = YES; 245 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 246 | CLANG_CXX_LIBRARY = "libc++"; 247 | CLANG_ENABLE_MODULES = YES; 248 | CLANG_ENABLE_OBJC_ARC = NO; 249 | CLANG_WARN_BOOL_CONVERSION = YES; 250 | CLANG_WARN_CONSTANT_CONVERSION = YES; 251 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 252 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 253 | CLANG_WARN_EMPTY_BODY = YES; 254 | CLANG_WARN_ENUM_CONVERSION = YES; 255 | CLANG_WARN_INFINITE_RECURSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 258 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 259 | CLANG_WARN_UNREACHABLE_CODE = YES; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | CODE_SIGN_IDENTITY = "-"; 262 | COPY_PHASE_STRIP = NO; 263 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 264 | ENABLE_NS_ASSERTIONS = NO; 265 | ENABLE_STRICT_OBJC_MSGSEND = YES; 266 | GCC_C_LANGUAGE_STANDARD = gnu99; 267 | GCC_NO_COMMON_BLOCKS = YES; 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 270 | GCC_WARN_UNDECLARED_SELECTOR = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 272 | GCC_WARN_UNUSED_FUNCTION = YES; 273 | GCC_WARN_UNUSED_VARIABLE = YES; 274 | MACOSX_DEPLOYMENT_TARGET = 10.12; 275 | MTL_ENABLE_DEBUG_INFO = NO; 276 | SDKROOT = macosx; 277 | }; 278 | name = Release; 279 | }; 280 | 336F74851E07EC92009BCC1B /* Debug */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 284 | CLANG_ENABLE_OBJC_ARC = NO; 285 | CODE_SIGN_IDENTITY = "Mac Developer"; 286 | COMBINE_HIDPI_IMAGES = YES; 287 | DEVELOPMENT_TEAM = KAX983KY52; 288 | INFOPLIST_FILE = "Mac Activity Indicator/Info.plist"; 289 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 290 | MACOSX_DEPLOYMENT_TARGET = 10.8; 291 | PRODUCT_BUNDLE_IDENTIFIER = com.milgra.activityindicator; 292 | PRODUCT_NAME = "$(TARGET_NAME)"; 293 | }; 294 | name = Debug; 295 | }; 296 | 336F74861E07EC92009BCC1B /* Release */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 300 | CLANG_ENABLE_OBJC_ARC = NO; 301 | CODE_SIGN_IDENTITY = "Mac Developer"; 302 | COMBINE_HIDPI_IMAGES = YES; 303 | DEVELOPMENT_TEAM = KAX983KY52; 304 | INFOPLIST_FILE = "Mac Activity Indicator/Info.plist"; 305 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 306 | MACOSX_DEPLOYMENT_TARGET = 10.8; 307 | PRODUCT_BUNDLE_IDENTIFIER = com.milgra.activityindicator; 308 | PRODUCT_NAME = "$(TARGET_NAME)"; 309 | }; 310 | name = Release; 311 | }; 312 | /* End XCBuildConfiguration section */ 313 | 314 | /* Begin XCConfigurationList section */ 315 | 336F746E1E07EC92009BCC1B /* Build configuration list for PBXProject "Mac Activity Indicator" */ = { 316 | isa = XCConfigurationList; 317 | buildConfigurations = ( 318 | 336F74821E07EC92009BCC1B /* Debug */, 319 | 336F74831E07EC92009BCC1B /* Release */, 320 | ); 321 | defaultConfigurationIsVisible = 0; 322 | defaultConfigurationName = Release; 323 | }; 324 | 336F74841E07EC92009BCC1B /* Build configuration list for PBXNativeTarget "Mac Activity Indicator" */ = { 325 | isa = XCConfigurationList; 326 | buildConfigurations = ( 327 | 336F74851E07EC92009BCC1B /* Debug */, 328 | 336F74861E07EC92009BCC1B /* Release */, 329 | ); 330 | defaultConfigurationIsVisible = 0; 331 | defaultConfigurationName = Release; 332 | }; 333 | /* End XCConfigurationList section */ 334 | }; 335 | rootObject = 336F746B1E07EC92009BCC1B /* Project object */; 336 | } 337 | -------------------------------------------------------------------------------- /Mac Activity Indicator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Mac Activity Indicator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Mac Activity Indicator.xcodeproj/xcshareddata/xcschemes/Mac Activity Indicator.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Mac Activity Indicator/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AppDelegate : NSObject 4 | 5 | - ( void ) addLog : ( NSString* ) string; 6 | 7 | @end 8 | 9 | @interface MyWindow : NSWindow 10 | 11 | @end 12 | 13 | @interface MyTextView : NSTextView 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Mac Activity Indicator/AppDelegate.m: -------------------------------------------------------------------------------- 1 | 2 | #import "AppDelegate.h" 3 | 4 | 5 | @interface AppDelegate () 6 | { 7 | char flag; 8 | NSWindow *window; 9 | NSTextView *textview; 10 | NSScrollView *scrollview; 11 | NSMutableArray* logs; 12 | NSStatusItem* statusItem; 13 | NSString* imageName; 14 | NSDate* lastLog; 15 | BOOL isLit; 16 | BOOL newLog; 17 | } 18 | 19 | @end 20 | 21 | FSEventStreamRef _eventStream; 22 | FSEventStreamContext callbackCtx; 23 | 24 | static void CDEventsCallback( 25 | 26 | ConstFSEventStreamRef streamRef, 27 | void *callbackCtxInfo, 28 | size_t numEvents, 29 | void *eventPaths, // CFArrayRef 30 | const FSEventStreamEventFlags eventFlags[], 31 | const FSEventStreamEventId eventIds[]) 32 | { 33 | AppDelegate * delegate = (__bridge AppDelegate *)callbackCtxInfo; 34 | NSArray *eventPathsArray = (__bridge NSArray *)eventPaths; 35 | 36 | for (NSUInteger i = 0; i < numEvents; ++i) 37 | { 38 | NSString* path = [eventPathsArray objectAtIndex:i]; 39 | [delegate addLog: path ]; 40 | } 41 | } 42 | 43 | @implementation AppDelegate 44 | 45 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 46 | 47 | logs = [ [ NSMutableArray alloc ] init ]; 48 | flag = 0; 49 | isLit = NO; 50 | 51 | // Version string 52 | NSDictionary *bundleInfo = [[NSBundle mainBundle] infoDictionary]; 53 | NSString *versionString = [NSString stringWithFormat:@"Version %@ (build %@)", 54 | bundleInfo[@"CFBundleShortVersionString"], 55 | bundleInfo[@"CFBundleVersion"] 56 | ]; 57 | 58 | NSMenu *menu = [ [ NSMenu alloc ] init ]; 59 | 60 | [ menu addItemWithTitle : @"Show Changes" action : @selector(show) keyEquivalent : @"" ]; 61 | 62 | [ menu addItem : [ NSMenuItem separatorItem ] ]; // A thin grey line 63 | [ menu addItemWithTitle : versionString action : nil keyEquivalent : @"" ]; 64 | [ menu addItem : [ NSMenuItem separatorItem ] ]; // A thin grey line 65 | 66 | [ menu addItemWithTitle : @"Donate if you like the app" action : @selector(support) keyEquivalent : @"" ]; 67 | [ menu addItemWithTitle : @"Check for updates" action : @selector(update) keyEquivalent : @"" ]; 68 | [ menu addItemWithTitle : @"Quit" action : @selector(terminate) keyEquivalent : @"" ]; 69 | 70 | statusItem = [ [ [ NSStatusBar systemStatusBar ] statusItemWithLength : NSVariableStatusItemLength ] retain ]; 71 | [statusItem setHighlightMode : NO ]; 72 | [statusItem setToolTip : @"MacOS File Activity Indicator" ]; 73 | [statusItem setImage : [NSImage imageNamed:@"switchIcon.png"] ]; 74 | [statusItem setMenu: menu ]; 75 | [statusItem.image setTemplate:NO]; 76 | 77 | callbackCtx.version = 0; 78 | callbackCtx.info = (__bridge void *)self; 79 | callbackCtx.retain = NULL; 80 | callbackCtx.release = NULL; 81 | callbackCtx.copyDescription = NULL; 82 | 83 | NSArray *watchedPaths = [ NSArray arrayWithObject : [ NSString stringWithCString: "/" encoding:NSUTF8StringEncoding ] ]; 84 | FSEventStreamCreateFlags creationFlags = kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagWatchRoot | kFSEventStreamCreateFlagIgnoreSelf | kFSEventStreamCreateFlagFileEvents; 85 | 86 | _eventStream = FSEventStreamCreate(kCFAllocatorDefault, 87 | &CDEventsCallback, 88 | &callbackCtx, 89 | (__bridge CFArrayRef)watchedPaths, 90 | kFSEventStreamEventIdSinceNow, 91 | (NSTimeInterval)1.0, 92 | (uint) creationFlags); 93 | 94 | FSEventStreamScheduleWithRunLoop(_eventStream, 95 | [[NSRunLoop currentRunLoop] getCFRunLoop], 96 | kCFRunLoopDefaultMode); 97 | 98 | if ( !FSEventStreamStart( _eventStream ) ) 99 | { 100 | [NSException raise:@"CDEventsEventStreamCreationFailureException" 101 | format:@"Failed to create event stream."]; 102 | } 103 | 104 | [ NSTimer scheduledTimerWithTimeInterval:0.1 repeats:YES block:^(NSTimer* timer) 105 | { 106 | if ( newLog ) 107 | { 108 | newLog = NO; 109 | isLit = !isLit; 110 | if ( isLit ) imageName = @"iconlit"; 111 | else imageName = @"icondim"; 112 | [self performSelectorOnMainThread:@selector(setImage) withObject:nil waitUntilDone:NO]; 113 | } 114 | }]; 115 | } 116 | 117 | - ( void ) addLog : ( NSString* ) string 118 | { 119 | [ logs insertObject : string atIndex : 0 ]; 120 | if ( [ logs count ] > 100 ) [ logs removeLastObject ]; 121 | 122 | if ( window != nil && [ window isVisible ] ) 123 | { 124 | [ [ [ textview textStorage ] mutableString ] setString:[logs componentsJoinedByString: @"\n" ] ]; 125 | [textview setTextColor:[NSColor greenColor]]; 126 | [textview setBackgroundColor:[NSColor blackColor]]; 127 | [textview setFont:[NSFont fontWithName:@"Courier New" size:13]]; 128 | } 129 | 130 | [ lastLog release ]; 131 | lastLog = [ [ NSDate alloc ] init ]; 132 | 133 | newLog = YES; 134 | } 135 | 136 | - ( void ) setImage 137 | { 138 | [statusItem setImage : [NSImage imageNamed:imageName] ]; 139 | } 140 | 141 | - ( void ) windowWillClose:(NSNotification *)notification 142 | { 143 | window = nil; 144 | textview = nil; 145 | scrollview = nil; 146 | } 147 | 148 | - (void)show 149 | { 150 | if ( window == nil ) 151 | { 152 | float wth = 900; 153 | float hth = 600; 154 | 155 | NSRect screenRect = [ [ NSScreen mainScreen ] frame ]; 156 | NSRect windowRect = NSMakeRect( 157 | ( screenRect.size.width - wth ) / 2 , 158 | ( screenRect.size.height - hth ) / 2 , 159 | wth , 160 | hth ); 161 | 162 | window = [ [ MyWindow alloc ] 163 | initWithContentRect : windowRect 164 | styleMask : NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable 165 | backing : NSBackingStoreBuffered 166 | defer : YES ]; 167 | 168 | window.releasedWhenClosed = YES; 169 | 170 | scrollview = [ [ NSScrollView alloc ] initWithFrame : NSMakeRect(0, 0, wth, hth) ]; 171 | [scrollview setBorderType : NSNoBorder]; 172 | [scrollview setHasVerticalScroller : YES]; 173 | [scrollview setHasHorizontalScroller : NO]; 174 | [scrollview setAutoresizingMask : NSViewWidthSizable | NSViewHeightSizable ]; 175 | 176 | NSSize contentSize = [ scrollview contentSize ]; 177 | 178 | textview = [[MyTextView alloc] initWithFrame:NSMakeRect(0, 0, contentSize.width, contentSize.height)]; 179 | [textview setMinSize:NSMakeSize(0.0, contentSize.height)]; 180 | [textview setMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)]; 181 | [textview setVerticallyResizable:YES]; 182 | [textview setHorizontallyResizable:NO]; 183 | [textview setAutoresizingMask:NSViewWidthSizable]; 184 | [textview setEditable:NO]; 185 | [textview setSelectable:YES]; 186 | [[textview textContainer] setContainerSize:NSMakeSize(contentSize.width, FLT_MAX)]; 187 | [[textview textContainer] setWidthTracksTextView:YES]; 188 | 189 | [scrollview setDocumentView:textview]; 190 | 191 | [ window setTitle:@"Activity Indicator - Files"]; 192 | [ window setLevel : NSNormalWindowLevel ]; 193 | [ window setDelegate : self ]; 194 | [ window setHasShadow : YES ]; 195 | [ window setContentView : scrollview ]; 196 | [ window setAcceptsMouseMovedEvents : YES ]; 197 | [ window setMinSize: NSMakeSize( 200, 300 ) ]; 198 | 199 | [ window makeKeyAndOrderFront : self ]; 200 | [ window makeFirstResponder : textview ]; 201 | [ window makeMainWindow ]; 202 | 203 | [NSApp activateIgnoringOtherApps:YES]; 204 | 205 | [ [ [ textview textStorage ] mutableString ] setString:[logs componentsJoinedByString: @"\n" ] ]; 206 | [textview setTextColor:[NSColor greenColor]]; 207 | [textview setBackgroundColor:[NSColor blackColor]]; 208 | [textview setFont:[NSFont fontWithName:@"Courier New" size:13]]; 209 | } 210 | else 211 | { 212 | [ window setContentView : nil ]; 213 | [ scrollview setDocumentView : nil ]; 214 | [ window close ]; 215 | } 216 | } 217 | 218 | - ( void ) terminate 219 | { 220 | [ NSApp terminate : nil ]; 221 | } 222 | 223 | - ( void ) support 224 | { 225 | [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString: @"https://paypal.me/milgra"]]; 226 | } 227 | 228 | - ( void ) update 229 | { 230 | [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString: @"http://milgra.com/macos-activity-indicator.html"]]; 231 | } 232 | 233 | @end 234 | 235 | 236 | @implementation MyWindow 237 | 238 | - ( BOOL ) canBecomeKeyWindow { return YES; } 239 | - ( BOOL ) canBecomeMainWindow { return YES; } 240 | 241 | @end 242 | 243 | @implementation MyTextView 244 | 245 | - ( void ) mouseDown:(NSEvent *)event 246 | { 247 | if ( [self selectedRange].length == 0 ) 248 | { 249 | [self selectAll:self]; 250 | [[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil]; 251 | [[NSPasteboard generalPasteboard] setString:[[self textStorage] mutableString] forType:NSStringPboardType]; 252 | } 253 | else [self setSelectedRange: NSMakeRange(0, 0)]; 254 | } 255 | 256 | @end 257 | -------------------------------------------------------------------------------- /Mac Activity Indicator/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "size" : "512x512", 50 | "idiom" : "mac", 51 | "filename" : "appicon.png", 52 | "scale" : "2x" 53 | } 54 | ], 55 | "info" : { 56 | "version" : 1, 57 | "author" : "xcode" 58 | } 59 | } -------------------------------------------------------------------------------- /Mac Activity Indicator/Assets.xcassets/AppIcon.appiconset/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/Mac Activity Indicator/Assets.xcassets/AppIcon.appiconset/appicon.png -------------------------------------------------------------------------------- /Mac Activity Indicator/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Mac Activity Indicator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.2 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | LSUIElement 26 | 27 | NSHumanReadableCopyright 28 | Copyright © 2016. Milan Toth. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Mac Activity Indicator/appicon.idraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/Mac Activity Indicator/appicon.idraw -------------------------------------------------------------------------------- /Mac Activity Indicator/icon.idraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/Mac Activity Indicator/icon.idraw -------------------------------------------------------------------------------- /Mac Activity Indicator/icondim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/Mac Activity Indicator/icondim.png -------------------------------------------------------------------------------- /Mac Activity Indicator/icondim@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/Mac Activity Indicator/icondim@2x.png -------------------------------------------------------------------------------- /Mac Activity Indicator/iconlit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/Mac Activity Indicator/iconlit.png -------------------------------------------------------------------------------- /Mac Activity Indicator/iconlit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/Mac Activity Indicator/iconlit@2x.png -------------------------------------------------------------------------------- /Mac Activity Indicator/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MacOS Activity Indicator 4 | // 5 | // Created by Milan Toth on 2016. 12. 19.. 6 | // Copyright © 2016. Milan Toth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /MenuIcon.idraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/milgra/macactivityindicator/8b8ed4e5b912e4e9186488e1ef7bc5bae654fe66/MenuIcon.idraw -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mac Activity Indicator 2 | 3 | Mac Activity Indicator 4 | 5 | --- 6 | 7 | Do you have a super silent MacBook and sometimes you have no idea whether it is working or not? 8 | Or you just interested what tasks MacOS does in the background? 9 | Or you are a developer and you need to see what your application is doing in the background? 10 | 11 | Mac Activity Indicator puts an icon in your menubar that switches it's led between green and red when activity happens. 12 | If you click on the icon a window appears where you can see the last 100 files touched by the operating system. 13 | 14 | Download the compiled application from my [homepage](http://milgra.com/mac-activity-indicator.html) 15 | 16 | --- 17 | 18 | What's new in version 1.2 : 19 | 20 | - blinking behaviour is now more responsive 21 | 22 | What's new in version 1.1 : 23 | 24 | - new icons 25 | - new menu for icon 26 | - closing files window now won't close the app 27 | - developer id signed, its a trusted app now 28 | 29 | --------------------------------------------------------------------------------