├── .gitignore ├── AppearancesSwitcher.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── AppearancesSwitcher.xcscheme │ └── Today.xcscheme ├── AppearancesSwitcher ├── AppDelegate.swift ├── AppearancesSwitcher.entitlements ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── All1.png │ │ ├── All2-1.png │ │ ├── All2.png │ │ ├── All3.png │ │ ├── All4.png │ │ ├── All5-1.png │ │ ├── All5.png │ │ ├── All6-1.png │ │ ├── All6.png │ │ ├── All7.png │ │ └── Contents.json │ └── Contents.json ├── Info.plist ├── ViewController.swift └── main.swift ├── LICENSE ├── README.md ├── Today ├── Assets.xcassets │ ├── AppearanceAutoNoColor_Normal.imageset │ │ ├── AppearanceAutoNoColor_Normal.png │ │ ├── AppearanceAutoNoColor_Normal@2x.png │ │ └── Contents.json │ ├── AppearanceAuto_Normal.imageset │ │ ├── AppearanceAuto_Normal.png │ │ ├── AppearanceAuto_Normal@2x.png │ │ └── Contents.json │ ├── AppearanceDarkNoColor_Normal.imageset │ │ ├── AppearanceDarkNoColor_Normal.png │ │ ├── AppearanceDarkNoColor_Normal@2x.png │ │ └── Contents.json │ ├── AppearanceDark_Normal.imageset │ │ ├── AppearanceDark_Normal.png │ │ ├── AppearanceDark_Normal@2x.png │ │ └── Contents.json │ ├── AppearanceLightNoColor_Normal.imageset │ │ ├── AppearanceLightNoColor_Normal.png │ │ ├── AppearanceLightNoColor_Normal@2x.png │ │ └── Contents.json │ ├── AppearanceLight_Normal.imageset │ │ ├── AppearanceLight_Normal.png │ │ ├── AppearanceLight_Normal@2x.png │ │ └── Contents.json │ ├── Contents.json │ ├── selectionColor_mask-auto_Normal.imageset │ │ ├── Contents.json │ │ ├── selectionColor_mask-auto_Normal.png │ │ └── selectionColor_mask-auto_Normal@2x.png │ └── selectionColor_mask_Normal.imageset │ │ ├── Contents.json │ │ ├── selectionColor_mask_Normal.png │ │ └── selectionColor_mask_Normal@2x.png ├── Classes │ ├── Cells │ │ └── SwitchCell.swift │ ├── Extensions │ │ ├── NSColorExtension.swift │ │ ├── NSImageExtension.swift │ │ └── NSViewExtension.swift │ ├── TodayViewController.swift │ └── Views │ │ ├── ImageButton.swift │ │ └── ToggleView.swift ├── Frameworks │ ├── README.txt │ └── SkyLight.framework │ │ ├── Resources │ │ ├── SkyLight │ │ └── Versions │ │ ├── A │ │ ├── Resources │ │ │ ├── AquaAppearanceHelper.app │ │ │ │ └── Contents │ │ │ │ │ ├── Info.plist │ │ │ │ │ ├── MacOS │ │ │ │ │ └── AquaAppearanceHelper │ │ │ │ │ ├── PkgInfo │ │ │ │ │ ├── _CodeSignature │ │ │ │ │ └── CodeResources │ │ │ │ │ └── version.plist │ │ │ ├── Configuration.plist │ │ │ ├── CursorAsset │ │ │ ├── CursorAsset_base │ │ │ ├── Info.plist │ │ │ ├── SkyLightShaders.air64.metallib │ │ │ ├── WSInfo │ │ │ ├── WindowServer │ │ │ └── version.plist │ │ ├── SkyLight │ │ └── _CodeSignature │ │ │ └── CodeResources │ │ └── Current ├── Info.plist ├── Today-Bridging-Header.h ├── Today.entitlements └── en.lproj │ └── InfoPlist.strings └── screenshot └── preview.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by Gaoming 2 | 3 | ## Build generated 4 | build/ 5 | DerivedData/ 6 | 7 | ## Various settings 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata/ 17 | 18 | ## Other 19 | *.moved-aside 20 | *.xccheckout 21 | *.xcscmblueprint 22 | ### OSX template 23 | *.DS_Store 24 | .AppleDouble 25 | .LSOverride 26 | *.hmap 27 | *.ipa 28 | 29 | # Icon must end with two \r 30 | Icon 31 | 32 | # Thumbnails 33 | ._* 34 | 35 | # Files that might appear in the root of a volume 36 | .DocumentRevisions-V100 37 | .fseventsd 38 | .Spotlight-V100 39 | .TemporaryItems 40 | .Trashes 41 | .VolumeIcon.icns 42 | .com.apple.timemachine.donotpresent 43 | 44 | # Directories potentially created on remote AFP share 45 | .AppleDB 46 | .AppleDesktop 47 | Network Trash Folder 48 | Temporary Items 49 | .apdisk 50 | 51 | # IntelliJ project files 52 | .idea 53 | *.iml 54 | out 55 | gen### Objective-C template 56 | # Xcode 57 | # 58 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 59 | 60 | 61 | ## Other 62 | *.xcuserstate 63 | 64 | ## Obj-C/Swift specific 65 | *.hmap 66 | *.ipa 67 | *.dSYM.zip 68 | *.dSYM 69 | 70 | # CocoaPods 71 | Pods/ 72 | 73 | # Carthage 74 | # 75 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 76 | # Carthage/Checkouts 77 | 78 | Carthage/Build 79 | 80 | # fastlane 81 | fastlane/report.xml 82 | fastlane/screenshots 83 | 84 | #Code Injection 85 | # 86 | # After new code Injection tools there's a generated folder /iOSInjectionProject 87 | # https://github.com/johnno1962/injectionforxcode 88 | 89 | iOSInjectionProject/ -------------------------------------------------------------------------------- /AppearancesSwitcher.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8758654922E39E810084CFED /* ToggleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8758654822E39E810084CFED /* ToggleView.swift */; }; 11 | 875B310C22EAA8170000F291 /* NSImageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 875B310B22EAA8160000F291 /* NSImageExtension.swift */; }; 12 | 877A566E22DCE35F00396936 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 877A566D22DCE35F00396936 /* AppDelegate.swift */; }; 13 | 877A567022DCE36100396936 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 877A566F22DCE36100396936 /* Assets.xcassets */; }; 14 | 877A567D22DCE39100396936 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 877A567B22DCE39000396936 /* ViewController.swift */; }; 15 | 877A567E22DCE39100396936 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 877A567C22DCE39100396936 /* main.swift */; }; 16 | 877A569C22DCE49C00396936 /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 877A569B22DCE49C00396936 /* NotificationCenter.framework */; }; 17 | 877A569F22DCE49C00396936 /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 877A569E22DCE49C00396936 /* TodayViewController.swift */; }; 18 | 877A56A622DCE49C00396936 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 877A56A422DCE49C00396936 /* InfoPlist.strings */; }; 19 | 877A56AA22DCE49C00396936 /* Today.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 877A569922DCE49C00396936 /* Today.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 20 | 87BA644D22DDA710003A3282 /* NSViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87BA644C22DDA710003A3282 /* NSViewExtension.swift */; }; 21 | 87BA647922DEECE9003A3282 /* SkyLight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87BA647822DEECE9003A3282 /* SkyLight.framework */; }; 22 | 87F5B90922E954BB009CF28D /* SwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87F5B90822E954BB009CF28D /* SwitchCell.swift */; }; 23 | 87F5B90B22E994B8009CF28D /* ImageButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87F5B90A22E994B8009CF28D /* ImageButton.swift */; }; 24 | 87FA857B22EEEA1900646BD1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 87FA857A22EEEA1800646BD1 /* Assets.xcassets */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 877A56A822DCE49C00396936 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 877A566222DCE35F00396936 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 877A569822DCE49C00396936; 33 | remoteInfo = Today; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXCopyFilesBuildPhase section */ 38 | 877A56AE22DCE49C00396936 /* Embed App Extensions */ = { 39 | isa = PBXCopyFilesBuildPhase; 40 | buildActionMask = 2147483647; 41 | dstPath = ""; 42 | dstSubfolderSpec = 13; 43 | files = ( 44 | 877A56AA22DCE49C00396936 /* Today.appex in Embed App Extensions */, 45 | ); 46 | name = "Embed App Extensions"; 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | /* End PBXCopyFilesBuildPhase section */ 50 | 51 | /* Begin PBXFileReference section */ 52 | 8758654822E39E810084CFED /* ToggleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ToggleView.swift; path = ../../../../../../../System/Volumes/Data/Users/gm/PROJECT/AppearancesSwitcher/Today/Classes/Views/ToggleView.swift; sourceTree = ""; }; 53 | 875B310B22EAA8160000F291 /* NSImageExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSImageExtension.swift; sourceTree = ""; }; 54 | 877A566A22DCE35F00396936 /* AppearancesSwitcher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AppearancesSwitcher.app; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 877A566D22DCE35F00396936 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 56 | 877A566F22DCE36100396936 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 877A567422DCE36100396936 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 877A567522DCE36100396936 /* AppearancesSwitcher.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AppearancesSwitcher.entitlements; sourceTree = ""; }; 59 | 877A567B22DCE39000396936 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 60 | 877A567C22DCE39100396936 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 61 | 877A569922DCE49C00396936 /* Today.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Today.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 877A569B22DCE49C00396936 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; 63 | 877A569E22DCE49C00396936 /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = ""; }; 64 | 877A56A322DCE49C00396936 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 65 | 877A56A522DCE49C00396936 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 66 | 877A56A722DCE49C00396936 /* Today.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Today.entitlements; sourceTree = ""; }; 67 | 87BA644C22DDA710003A3282 /* NSViewExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSViewExtension.swift; sourceTree = ""; }; 68 | 87BA645222DDD9E1003A3282 /* Today-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Today-Bridging-Header.h"; sourceTree = ""; }; 69 | 87BA647822DEECE9003A3282 /* SkyLight.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SkyLight.framework; path = ../../../../System/Library/PrivateFrameworks/SkyLight.framework; sourceTree = ""; }; 70 | 87F5B90822E954BB009CF28D /* SwitchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchCell.swift; sourceTree = ""; }; 71 | 87F5B90A22E994B8009CF28D /* ImageButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ImageButton.swift; path = ../../../../../../../System/Volumes/Data/Users/gm/PROJECT/AppearancesSwitcher/Today/Classes/Views/ImageButton.swift; sourceTree = ""; }; 72 | 87FA857A22EEEA1800646BD1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 73 | /* End PBXFileReference section */ 74 | 75 | /* Begin PBXFrameworksBuildPhase section */ 76 | 877A566722DCE35F00396936 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | 877A569622DCE49C00396936 /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | 87BA647922DEECE9003A3282 /* SkyLight.framework in Frameworks */, 88 | 877A569C22DCE49C00396936 /* NotificationCenter.framework in Frameworks */, 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | /* End PBXFrameworksBuildPhase section */ 93 | 94 | /* Begin PBXGroup section */ 95 | 8758654722E39DE90084CFED /* Views */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 8758654822E39E810084CFED /* ToggleView.swift */, 99 | 87F5B90A22E994B8009CF28D /* ImageButton.swift */, 100 | ); 101 | path = Views; 102 | sourceTree = ""; 103 | }; 104 | 877A566122DCE35F00396936 = { 105 | isa = PBXGroup; 106 | children = ( 107 | 877A566C22DCE35F00396936 /* AppearancesSwitcher */, 108 | 877A569D22DCE49C00396936 /* Today */, 109 | 877A569A22DCE49C00396936 /* Frameworks */, 110 | 877A566B22DCE35F00396936 /* Products */, 111 | ); 112 | sourceTree = ""; 113 | }; 114 | 877A566B22DCE35F00396936 /* Products */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 877A566A22DCE35F00396936 /* AppearancesSwitcher.app */, 118 | 877A569922DCE49C00396936 /* Today.appex */, 119 | ); 120 | name = Products; 121 | sourceTree = ""; 122 | }; 123 | 877A566C22DCE35F00396936 /* AppearancesSwitcher */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 877A566D22DCE35F00396936 /* AppDelegate.swift */, 127 | 877A567C22DCE39100396936 /* main.swift */, 128 | 877A567B22DCE39000396936 /* ViewController.swift */, 129 | 877A566F22DCE36100396936 /* Assets.xcassets */, 130 | 877A567422DCE36100396936 /* Info.plist */, 131 | 877A567522DCE36100396936 /* AppearancesSwitcher.entitlements */, 132 | ); 133 | path = AppearancesSwitcher; 134 | sourceTree = ""; 135 | }; 136 | 877A569A22DCE49C00396936 /* Frameworks */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 87BA647822DEECE9003A3282 /* SkyLight.framework */, 140 | 877A569B22DCE49C00396936 /* NotificationCenter.framework */, 141 | ); 142 | name = Frameworks; 143 | sourceTree = ""; 144 | }; 145 | 877A569D22DCE49C00396936 /* Today */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 87FA857A22EEEA1800646BD1 /* Assets.xcassets */, 149 | 8784CE0A22DF0ED0009815A5 /* Classes */, 150 | 877A56A322DCE49C00396936 /* Info.plist */, 151 | 877A56A422DCE49C00396936 /* InfoPlist.strings */, 152 | 87BA645222DDD9E1003A3282 /* Today-Bridging-Header.h */, 153 | 877A56A722DCE49C00396936 /* Today.entitlements */, 154 | ); 155 | path = Today; 156 | sourceTree = ""; 157 | }; 158 | 8784CE0A22DF0ED0009815A5 /* Classes */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | 87F5B90722E954BB009CF28D /* Cells */, 162 | 8758654722E39DE90084CFED /* Views */, 163 | 8784CE0B22DF1DD6009815A5 /* Extensions */, 164 | 877A569E22DCE49C00396936 /* TodayViewController.swift */, 165 | ); 166 | path = Classes; 167 | sourceTree = ""; 168 | }; 169 | 8784CE0B22DF1DD6009815A5 /* Extensions */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 875B310B22EAA8160000F291 /* NSImageExtension.swift */, 173 | 87BA644C22DDA710003A3282 /* NSViewExtension.swift */, 174 | ); 175 | path = Extensions; 176 | sourceTree = ""; 177 | }; 178 | 87F5B90722E954BB009CF28D /* Cells */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 87F5B90822E954BB009CF28D /* SwitchCell.swift */, 182 | ); 183 | path = Cells; 184 | sourceTree = ""; 185 | }; 186 | /* End PBXGroup section */ 187 | 188 | /* Begin PBXNativeTarget section */ 189 | 877A566922DCE35F00396936 /* AppearancesSwitcher */ = { 190 | isa = PBXNativeTarget; 191 | buildConfigurationList = 877A567822DCE36100396936 /* Build configuration list for PBXNativeTarget "AppearancesSwitcher" */; 192 | buildPhases = ( 193 | 877A566622DCE35F00396936 /* Sources */, 194 | 877A566722DCE35F00396936 /* Frameworks */, 195 | 877A566822DCE35F00396936 /* Resources */, 196 | 877A56AE22DCE49C00396936 /* Embed App Extensions */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | 877A56A922DCE49C00396936 /* PBXTargetDependency */, 202 | ); 203 | name = AppearancesSwitcher; 204 | productName = AppearancesSwitcher; 205 | productReference = 877A566A22DCE35F00396936 /* AppearancesSwitcher.app */; 206 | productType = "com.apple.product-type.application"; 207 | }; 208 | 877A569822DCE49C00396936 /* Today */ = { 209 | isa = PBXNativeTarget; 210 | buildConfigurationList = 877A56AB22DCE49C00396936 /* Build configuration list for PBXNativeTarget "Today" */; 211 | buildPhases = ( 212 | 877A569522DCE49C00396936 /* Sources */, 213 | 877A569622DCE49C00396936 /* Frameworks */, 214 | 877A569722DCE49C00396936 /* Resources */, 215 | ); 216 | buildRules = ( 217 | ); 218 | dependencies = ( 219 | ); 220 | name = Today; 221 | productName = Today; 222 | productReference = 877A569922DCE49C00396936 /* Today.appex */; 223 | productType = "com.apple.product-type.app-extension"; 224 | }; 225 | /* End PBXNativeTarget section */ 226 | 227 | /* Begin PBXProject section */ 228 | 877A566222DCE35F00396936 /* Project object */ = { 229 | isa = PBXProject; 230 | attributes = { 231 | LastSwiftUpdateCheck = 1020; 232 | LastUpgradeCheck = 1100; 233 | ORGANIZATIONNAME = GMWorkStudio; 234 | TargetAttributes = { 235 | 877A566922DCE35F00396936 = { 236 | CreatedOnToolsVersion = 10.2.1; 237 | }; 238 | 877A569822DCE49C00396936 = { 239 | CreatedOnToolsVersion = 10.2.1; 240 | }; 241 | }; 242 | }; 243 | buildConfigurationList = 877A566522DCE35F00396936 /* Build configuration list for PBXProject "AppearancesSwitcher" */; 244 | compatibilityVersion = "Xcode 9.3"; 245 | developmentRegion = en; 246 | hasScannedForEncodings = 0; 247 | knownRegions = ( 248 | en, 249 | Base, 250 | ); 251 | mainGroup = 877A566122DCE35F00396936; 252 | productRefGroup = 877A566B22DCE35F00396936 /* Products */; 253 | projectDirPath = ""; 254 | projectRoot = ""; 255 | targets = ( 256 | 877A566922DCE35F00396936 /* AppearancesSwitcher */, 257 | 877A569822DCE49C00396936 /* Today */, 258 | ); 259 | }; 260 | /* End PBXProject section */ 261 | 262 | /* Begin PBXResourcesBuildPhase section */ 263 | 877A566822DCE35F00396936 /* Resources */ = { 264 | isa = PBXResourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | 877A567022DCE36100396936 /* Assets.xcassets in Resources */, 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | 877A569722DCE49C00396936 /* Resources */ = { 272 | isa = PBXResourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | 87FA857B22EEEA1900646BD1 /* Assets.xcassets in Resources */, 276 | 877A56A622DCE49C00396936 /* InfoPlist.strings in Resources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | /* End PBXResourcesBuildPhase section */ 281 | 282 | /* Begin PBXSourcesBuildPhase section */ 283 | 877A566622DCE35F00396936 /* Sources */ = { 284 | isa = PBXSourcesBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | 877A567D22DCE39100396936 /* ViewController.swift in Sources */, 288 | 877A566E22DCE35F00396936 /* AppDelegate.swift in Sources */, 289 | 877A567E22DCE39100396936 /* main.swift in Sources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | 877A569522DCE49C00396936 /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | 877A569F22DCE49C00396936 /* TodayViewController.swift in Sources */, 298 | 87F5B90B22E994B8009CF28D /* ImageButton.swift in Sources */, 299 | 875B310C22EAA8170000F291 /* NSImageExtension.swift in Sources */, 300 | 87BA644D22DDA710003A3282 /* NSViewExtension.swift in Sources */, 301 | 8758654922E39E810084CFED /* ToggleView.swift in Sources */, 302 | 87F5B90922E954BB009CF28D /* SwitchCell.swift in Sources */, 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | }; 306 | /* End PBXSourcesBuildPhase section */ 307 | 308 | /* Begin PBXTargetDependency section */ 309 | 877A56A922DCE49C00396936 /* PBXTargetDependency */ = { 310 | isa = PBXTargetDependency; 311 | target = 877A569822DCE49C00396936 /* Today */; 312 | targetProxy = 877A56A822DCE49C00396936 /* PBXContainerItemProxy */; 313 | }; 314 | /* End PBXTargetDependency section */ 315 | 316 | /* Begin PBXVariantGroup section */ 317 | 877A56A422DCE49C00396936 /* InfoPlist.strings */ = { 318 | isa = PBXVariantGroup; 319 | children = ( 320 | 877A56A522DCE49C00396936 /* en */, 321 | ); 322 | name = InfoPlist.strings; 323 | sourceTree = ""; 324 | }; 325 | /* End PBXVariantGroup section */ 326 | 327 | /* Begin XCBuildConfiguration section */ 328 | 877A567622DCE36100396936 /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_ANALYZER_NONNULL = YES; 333 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 335 | CLANG_CXX_LIBRARY = "libc++"; 336 | CLANG_ENABLE_MODULES = YES; 337 | CLANG_ENABLE_OBJC_ARC = YES; 338 | CLANG_ENABLE_OBJC_WEAK = YES; 339 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 340 | CLANG_WARN_BOOL_CONVERSION = YES; 341 | CLANG_WARN_COMMA = YES; 342 | CLANG_WARN_CONSTANT_CONVERSION = YES; 343 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 344 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 345 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 346 | CLANG_WARN_EMPTY_BODY = YES; 347 | CLANG_WARN_ENUM_CONVERSION = YES; 348 | CLANG_WARN_INFINITE_RECURSION = YES; 349 | CLANG_WARN_INT_CONVERSION = YES; 350 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 351 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 352 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 354 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 355 | CLANG_WARN_STRICT_PROTOTYPES = YES; 356 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 357 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | CODE_SIGN_IDENTITY = "Mac Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = dwarf; 363 | ENABLE_STRICT_OBJC_MSGSEND = YES; 364 | ENABLE_TESTABILITY = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu11; 366 | GCC_DYNAMIC_NO_PIC = NO; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_OPTIMIZATION_LEVEL = 0; 369 | GCC_PREPROCESSOR_DEFINITIONS = ( 370 | "DEBUG=1", 371 | "$(inherited)", 372 | ); 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | MACOSX_DEPLOYMENT_TARGET = 10.14; 380 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 381 | MTL_FAST_MATH = YES; 382 | ONLY_ACTIVE_ARCH = YES; 383 | SDKROOT = macosx; 384 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 385 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 386 | }; 387 | name = Debug; 388 | }; 389 | 877A567722DCE36100396936 /* Release */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_ANALYZER_NONNULL = YES; 394 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 395 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 396 | CLANG_CXX_LIBRARY = "libc++"; 397 | CLANG_ENABLE_MODULES = YES; 398 | CLANG_ENABLE_OBJC_ARC = YES; 399 | CLANG_ENABLE_OBJC_WEAK = YES; 400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 401 | CLANG_WARN_BOOL_CONVERSION = YES; 402 | CLANG_WARN_COMMA = YES; 403 | CLANG_WARN_CONSTANT_CONVERSION = YES; 404 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 406 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 407 | CLANG_WARN_EMPTY_BODY = YES; 408 | CLANG_WARN_ENUM_CONVERSION = YES; 409 | CLANG_WARN_INFINITE_RECURSION = YES; 410 | CLANG_WARN_INT_CONVERSION = YES; 411 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 412 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 413 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 414 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 415 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 416 | CLANG_WARN_STRICT_PROTOTYPES = YES; 417 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 418 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 419 | CLANG_WARN_UNREACHABLE_CODE = YES; 420 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 421 | CODE_SIGN_IDENTITY = "Mac Developer"; 422 | COPY_PHASE_STRIP = NO; 423 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 424 | ENABLE_NS_ASSERTIONS = NO; 425 | ENABLE_STRICT_OBJC_MSGSEND = YES; 426 | GCC_C_LANGUAGE_STANDARD = gnu11; 427 | GCC_NO_COMMON_BLOCKS = YES; 428 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 429 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 430 | GCC_WARN_UNDECLARED_SELECTOR = YES; 431 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 432 | GCC_WARN_UNUSED_FUNCTION = YES; 433 | GCC_WARN_UNUSED_VARIABLE = YES; 434 | MACOSX_DEPLOYMENT_TARGET = 10.14; 435 | MTL_ENABLE_DEBUG_INFO = NO; 436 | MTL_FAST_MATH = YES; 437 | SDKROOT = macosx; 438 | SWIFT_COMPILATION_MODE = wholemodule; 439 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 440 | }; 441 | name = Release; 442 | }; 443 | 877A567922DCE36100396936 /* Debug */ = { 444 | isa = XCBuildConfiguration; 445 | buildSettings = { 446 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 448 | CODE_SIGN_ENTITLEMENTS = AppearancesSwitcher/AppearancesSwitcher.entitlements; 449 | CODE_SIGN_IDENTITY = "-"; 450 | CODE_SIGN_STYLE = Automatic; 451 | COMBINE_HIDPI_IMAGES = YES; 452 | DEVELOPMENT_TEAM = 2JHKJE6G5B; 453 | INFOPLIST_FILE = AppearancesSwitcher/Info.plist; 454 | LD_RUNPATH_SEARCH_PATHS = ( 455 | "$(inherited)", 456 | "@executable_path/../Frameworks", 457 | ); 458 | MACOSX_DEPLOYMENT_TARGET = 10.14; 459 | MARKETING_VERSION = 1.0.0; 460 | PRODUCT_BUNDLE_IDENTIFIER = com.corehell.appearancesswitcher; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | SWIFT_OBJC_BRIDGING_HEADER = ""; 463 | SWIFT_VERSION = 5.0; 464 | SYSTEM_FRAMEWORK_SEARCH_PATHS = ( 465 | "$(inherited)", 466 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 467 | ); 468 | }; 469 | name = Debug; 470 | }; 471 | 877A567A22DCE36100396936 /* Release */ = { 472 | isa = XCBuildConfiguration; 473 | buildSettings = { 474 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 475 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 476 | CODE_SIGN_ENTITLEMENTS = AppearancesSwitcher/AppearancesSwitcher.entitlements; 477 | CODE_SIGN_IDENTITY = "-"; 478 | CODE_SIGN_STYLE = Automatic; 479 | COMBINE_HIDPI_IMAGES = YES; 480 | DEVELOPMENT_TEAM = 2JHKJE6G5B; 481 | INFOPLIST_FILE = AppearancesSwitcher/Info.plist; 482 | LD_RUNPATH_SEARCH_PATHS = ( 483 | "$(inherited)", 484 | "@executable_path/../Frameworks", 485 | ); 486 | MACOSX_DEPLOYMENT_TARGET = 10.14; 487 | MARKETING_VERSION = 1.0.0; 488 | PRODUCT_BUNDLE_IDENTIFIER = com.corehell.appearancesswitcher; 489 | PRODUCT_NAME = "$(TARGET_NAME)"; 490 | SWIFT_OBJC_BRIDGING_HEADER = ""; 491 | SWIFT_VERSION = 5.0; 492 | SYSTEM_FRAMEWORK_SEARCH_PATHS = ( 493 | "$(inherited)", 494 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 495 | ); 496 | }; 497 | name = Release; 498 | }; 499 | 877A56AC22DCE49C00396936 /* Debug */ = { 500 | isa = XCBuildConfiguration; 501 | buildSettings = { 502 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 503 | CODE_SIGN_ENTITLEMENTS = Today/Today.entitlements; 504 | CODE_SIGN_IDENTITY = "-"; 505 | CODE_SIGN_STYLE = Automatic; 506 | COMBINE_HIDPI_IMAGES = YES; 507 | DEVELOPMENT_TEAM = 2JHKJE6G5B; 508 | INFOPLIST_FILE = Today/Info.plist; 509 | LD_RUNPATH_SEARCH_PATHS = ( 510 | "$(inherited)", 511 | "@executable_path/../Frameworks", 512 | "@executable_path/../../../../Frameworks", 513 | ); 514 | MACOSX_DEPLOYMENT_TARGET = 10.14; 515 | MARKETING_VERSION = 1.0.0; 516 | PRODUCT_BUNDLE_IDENTIFIER = com.corehell.appearancesswitcher.today; 517 | PRODUCT_NAME = "$(TARGET_NAME)"; 518 | SKIP_INSTALL = YES; 519 | SWIFT_OBJC_BRIDGING_HEADER = "Today/Today-Bridging-Header.h"; 520 | SWIFT_VERSION = 5.0; 521 | SYSTEM_FRAMEWORK_SEARCH_PATHS = ( 522 | "$(inherited)", 523 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 524 | ); 525 | }; 526 | name = Debug; 527 | }; 528 | 877A56AD22DCE49C00396936 /* Release */ = { 529 | isa = XCBuildConfiguration; 530 | buildSettings = { 531 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 532 | CODE_SIGN_ENTITLEMENTS = Today/Today.entitlements; 533 | CODE_SIGN_IDENTITY = "-"; 534 | CODE_SIGN_STYLE = Automatic; 535 | COMBINE_HIDPI_IMAGES = YES; 536 | DEVELOPMENT_TEAM = 2JHKJE6G5B; 537 | INFOPLIST_FILE = Today/Info.plist; 538 | LD_RUNPATH_SEARCH_PATHS = ( 539 | "$(inherited)", 540 | "@executable_path/../Frameworks", 541 | "@executable_path/../../../../Frameworks", 542 | ); 543 | MACOSX_DEPLOYMENT_TARGET = 10.14; 544 | MARKETING_VERSION = 1.0.0; 545 | PRODUCT_BUNDLE_IDENTIFIER = com.corehell.appearancesswitcher.today; 546 | PRODUCT_NAME = "$(TARGET_NAME)"; 547 | SKIP_INSTALL = YES; 548 | SWIFT_OBJC_BRIDGING_HEADER = "Today/Today-Bridging-Header.h"; 549 | SWIFT_VERSION = 5.0; 550 | SYSTEM_FRAMEWORK_SEARCH_PATHS = ( 551 | "$(inherited)", 552 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 553 | ); 554 | }; 555 | name = Release; 556 | }; 557 | /* End XCBuildConfiguration section */ 558 | 559 | /* Begin XCConfigurationList section */ 560 | 877A566522DCE35F00396936 /* Build configuration list for PBXProject "AppearancesSwitcher" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | 877A567622DCE36100396936 /* Debug */, 564 | 877A567722DCE36100396936 /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | 877A567822DCE36100396936 /* Build configuration list for PBXNativeTarget "AppearancesSwitcher" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | 877A567922DCE36100396936 /* Debug */, 573 | 877A567A22DCE36100396936 /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | 877A56AB22DCE49C00396936 /* Build configuration list for PBXNativeTarget "Today" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | 877A56AC22DCE49C00396936 /* Debug */, 582 | 877A56AD22DCE49C00396936 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | /* End XCConfigurationList section */ 588 | }; 589 | rootObject = 877A566222DCE35F00396936 /* Project object */; 590 | } 591 | -------------------------------------------------------------------------------- /AppearancesSwitcher.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AppearancesSwitcher.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AppearancesSwitcher.xcodeproj/xcshareddata/xcschemes/AppearancesSwitcher.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /AppearancesSwitcher.xcodeproj/xcshareddata/xcschemes/Today.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 60 | 62 | 68 | 69 | 70 | 71 | 78 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /AppearancesSwitcher/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Apperance 4 | // 5 | // Created by gm on 2019/7/15. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class AppDelegate: NSObject, NSApplicationDelegate { 12 | let window: NSWindow = { 13 | let width:CGFloat = 350 14 | let height:CGFloat = 200 15 | let x = (NSScreen.main!.frame.width - width) / 2 16 | let y = ( NSScreen.main!.frame.height - height) / 2 17 | let rect = NSRect(x: x, y: y, width: width, height: height) 18 | let w = NSWindow(contentRect: rect, 19 | styleMask: [.closable, .titled], 20 | backing: .buffered, 21 | defer: false) 22 | return w 23 | }() 24 | 25 | // MARK: NSApplicationDelegate 26 | 27 | func applicationDidFinishLaunching(_ notification: Notification) { 28 | self.window.title = "AppearancesSwitcher" 29 | self.window.makeKeyAndOrderFront(self) 30 | let viewController = ViewController() 31 | let content = self.window.contentView! 32 | content.addSubview(viewController.view) 33 | } 34 | 35 | func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 36 | return true 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /AppearancesSwitcher/AppearancesSwitcher.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 | -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All1.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All2-1.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All2.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All3.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All4.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All5-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All5-1.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All5.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All6-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All6-1.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All6.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/All7.png -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "All1.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "All2-1.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "All2.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "All3.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "All4.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "All5-1.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "All5.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "All6-1.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "All6.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "All7.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /AppearancesSwitcher/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AppearancesSwitcher/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.utilities 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2019 GMWorkStudio. All rights reserved. 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /AppearancesSwitcher/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Apperance 4 | // 5 | // Created by gm on 2019/7/15. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | let alertLabel: NSTextField = { 13 | let field = NSTextField() 14 | field.alignment = .center 15 | field.backgroundColor = .clear 16 | field.isEditable = false 17 | field.isBezeled = false 18 | field.font = NSFont.systemFont(ofSize: 12) 19 | field.stringValue = "Register finished, Now you can close the app" 20 | field.translatesAutoresizingMaskIntoConstraints = false 21 | return field 22 | }() 23 | 24 | override func loadView() { 25 | 26 | let view = NSView.init(frame: NSMakeRect(0, 0, 320, 300)) 27 | self.view = view 28 | } 29 | 30 | override func viewDidLoad() { 31 | super.viewDidLoad() 32 | self.view.translatesAutoresizingMaskIntoConstraints = false 33 | self.view.addSubview(self.alertLabel) 34 | 35 | self.alertLabel.frame = NSMakeRect(0, 0, 300, 20) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /AppearancesSwitcher/main.swift: -------------------------------------------------------------------------------- 1 | // 2 | // main.swift 3 | // Apperance 4 | // 5 | // Created by gm on 2019/7/15. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | let delegate = AppDelegate() 12 | NSApplication.shared.delegate = delegate 13 | _ = NSApplicationMain(CommandLine.argc, CommandLine.unsafeArgv) 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Gaoming Zhang 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AppearancesSwitcher 2 | 3 | ## Preview 4 | ![image](https://raw.githubusercontent.com/GMWorkStudio/AppearancesSwitcher/master/screenshot/preview.png) 5 | ## Install 6 | 1. Open the "Base App" to "register" today extension. 7 | 2. Close Base App, manual add today extension to you Today panel. 8 | 9 | ## Uninstall 10 | 1. Delete the "Base App". 11 | 2. Manual remove today extension. 12 | 13 | 14 | -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceAutoNoColor_Normal.imageset/AppearanceAutoNoColor_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceAutoNoColor_Normal.imageset/AppearanceAutoNoColor_Normal.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceAutoNoColor_Normal.imageset/AppearanceAutoNoColor_Normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceAutoNoColor_Normal.imageset/AppearanceAutoNoColor_Normal@2x.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceAutoNoColor_Normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "AppearanceAutoNoColor_Normal.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "AppearanceAutoNoColor_Normal@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceAuto_Normal.imageset/AppearanceAuto_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceAuto_Normal.imageset/AppearanceAuto_Normal.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceAuto_Normal.imageset/AppearanceAuto_Normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceAuto_Normal.imageset/AppearanceAuto_Normal@2x.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceAuto_Normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "AppearanceAuto_Normal.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "AppearanceAuto_Normal@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceDarkNoColor_Normal.imageset/AppearanceDarkNoColor_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceDarkNoColor_Normal.imageset/AppearanceDarkNoColor_Normal.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceDarkNoColor_Normal.imageset/AppearanceDarkNoColor_Normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceDarkNoColor_Normal.imageset/AppearanceDarkNoColor_Normal@2x.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceDarkNoColor_Normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "AppearanceDarkNoColor_Normal.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "AppearanceDarkNoColor_Normal@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceDark_Normal.imageset/AppearanceDark_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceDark_Normal.imageset/AppearanceDark_Normal.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceDark_Normal.imageset/AppearanceDark_Normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceDark_Normal.imageset/AppearanceDark_Normal@2x.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceDark_Normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "AppearanceDark_Normal.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "AppearanceDark_Normal@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceLightNoColor_Normal.imageset/AppearanceLightNoColor_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceLightNoColor_Normal.imageset/AppearanceLightNoColor_Normal.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceLightNoColor_Normal.imageset/AppearanceLightNoColor_Normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceLightNoColor_Normal.imageset/AppearanceLightNoColor_Normal@2x.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceLightNoColor_Normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "AppearanceLightNoColor_Normal.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "AppearanceLightNoColor_Normal@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceLight_Normal.imageset/AppearanceLight_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceLight_Normal.imageset/AppearanceLight_Normal.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceLight_Normal.imageset/AppearanceLight_Normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/AppearanceLight_Normal.imageset/AppearanceLight_Normal@2x.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/AppearanceLight_Normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "AppearanceLight_Normal.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "AppearanceLight_Normal@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/selectionColor_mask-auto_Normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "selectionColor_mask-auto_Normal.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "selectionColor_mask-auto_Normal@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | }, 22 | "properties" : { 23 | "template-rendering-intent" : "template" 24 | } 25 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/selectionColor_mask-auto_Normal.imageset/selectionColor_mask-auto_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/selectionColor_mask-auto_Normal.imageset/selectionColor_mask-auto_Normal.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/selectionColor_mask-auto_Normal.imageset/selectionColor_mask-auto_Normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/selectionColor_mask-auto_Normal.imageset/selectionColor_mask-auto_Normal@2x.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/selectionColor_mask_Normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "selectionColor_mask_Normal.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "selectionColor_mask_Normal@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | }, 22 | "properties" : { 23 | "template-rendering-intent" : "template" 24 | } 25 | } -------------------------------------------------------------------------------- /Today/Assets.xcassets/selectionColor_mask_Normal.imageset/selectionColor_mask_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/selectionColor_mask_Normal.imageset/selectionColor_mask_Normal.png -------------------------------------------------------------------------------- /Today/Assets.xcassets/selectionColor_mask_Normal.imageset/selectionColor_mask_Normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Assets.xcassets/selectionColor_mask_Normal.imageset/selectionColor_mask_Normal@2x.png -------------------------------------------------------------------------------- /Today/Classes/Cells/SwitchCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwitchCell.swift 3 | // Today 4 | // 5 | // Created by gm on 2019/7/25. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class SwitchCell: NSButtonCell { 12 | 13 | override func highlight(_ flag: Bool, withFrame cellFrame: NSRect, in controlView: NSView) { 14 | if let isSelected = (controlView as? ImageButton)?.isSelected, let borderWidth = (controlView as? ImageButton)?.borderWidth{ 15 | if isSelected { 16 | controlView.layer?.borderWidth = (flag ? 0 : borderWidth) 17 | } else { 18 | controlView.layer?.borderWidth = (flag ? borderWidth : 0) 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Today/Classes/Extensions/NSColorExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSColorExtension.swift 3 | // Today 4 | // 5 | // Created by gm on 2019/7/25. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | extension NSColor { 12 | func accentColor(_ accentColorType: AccentColorType) -> NSColor { 13 | switch accentColorType { 14 | case .graphite: 15 | return #colorLiteral(red: 0.5960312486, green: 0.5961049795, blue: 0.5960062742, alpha: 1) 16 | case .red: 17 | return #colorLiteral(red: 0.8796771169, green: 0.2202554047, blue: 0.2417787015, alpha: 1) 18 | case .orange: 19 | return #colorLiteral(red: 0.976829946, green: 0.7215282321, blue: 0.1510422826, alpha: 1) 20 | case .yellow: 21 | return #colorLiteral(red: 0.976829946, green: 0.7215282321, blue: 0.1510422826, alpha: 1) 22 | case .green: 23 | return #colorLiteral(red: 0.3826935887, green: 0.7282084823, blue: 0.2740759254, alpha: 1) 24 | case .blue: 25 | return #colorLiteral(red: 0.1853429377, green: 0.4802953601, blue: 1, alpha: 1) 26 | case .purple: 27 | return #colorLiteral(red: 0.5826681256, green: 0.2384409308, blue: 0.5862762928, alpha: 1) 28 | case .pink: 29 | return #colorLiteral(red: 0.9658088088, green: 0.310759306, blue: 0.6188690066, alpha: 1) 30 | default: 31 | return #colorLiteral(red: 0.1853429377, green: 0.4802953601, blue: 1, alpha: 1) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Today/Classes/Extensions/NSImageExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSImageExtension.swift 3 | // Today 4 | // 5 | // Created by gm on 2019/7/16. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | extension NSImage { 12 | class func tint(color: NSColor) -> NSImage { 13 | let image = self.copy() as! NSImage 14 | image.lockFocus() 15 | let imageRect = NSRect(origin: NSZeroPoint, size: image.size) 16 | color.drawSwatch(in: imageRect) 17 | image.unlockFocus() 18 | return image 19 | } 20 | 21 | /// Generate button image with current accent color mask. 22 | /// - Parameter origin: button image. 23 | /// - Parameter mask: the mask image. 24 | class func combinImage(origin:NSImage, mask:NSImage) -> NSImage { 25 | let accentColor = NSColor.controlAccentColor 26 | let image = NSImage.init(size: origin.size, flipped: false) { (frameRect) -> Bool in 27 | origin.draw(in: frameRect) 28 | mask.lockFocus() 29 | accentColor.set() 30 | frameRect.fill(using: .sourceAtop) 31 | mask.unlockFocus() 32 | mask.draw(in: frameRect) 33 | return true 34 | } 35 | return image 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Today/Classes/Extensions/NSViewExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSViewExtension.swift 3 | // Today 4 | // 5 | // Created by gm on 2019/7/16. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | extension NSView { 12 | 13 | /// Set NSView background color. 14 | /// Private method may occur exception. 15 | /// - Parameter color: NSColor 16 | func setBackground(color: NSColor) { 17 | self.setValue(color, forKey: "backgroundColor") 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Today/Classes/TodayViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TodayViewController.swift 3 | // Today 4 | // 5 | // Created by gm on 2019/7/16. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import NotificationCenter 11 | 12 | class TodayViewController: NSViewController, NCWidgetProviding { 13 | 14 | // MARK: - Properties 15 | 16 | let lightView:ToggleView = { 17 | 18 | // TODO: Use 'NSColor.currentControlTint' to set correct origin image. 19 | 20 | let lightImage = NSImage.combinImage(origin: NSImage(named: "AppearanceLight_Normal")!, mask: NSImage(named: "selectionColor_mask_Normal")!) 21 | return ToggleView(title: "Light", image: lightImage, target: nil, action: nil) 22 | }() 23 | 24 | let darkView: ToggleView = { 25 | let darkImage = NSImage.combinImage(origin: NSImage(named: "AppearanceDark_Normal")!, mask: NSImage(named: "selectionColor_mask_Normal")!) 26 | return ToggleView(title: "Dark", image: darkImage, target: nil, action: nil) 27 | }() 28 | 29 | let containerStackView: NSStackView = { 30 | let stackView = NSStackView() 31 | stackView.alignment = .centerX 32 | stackView.orientation = .horizontal 33 | stackView.distribution = .equalSpacing 34 | stackView.spacing = 18 35 | stackView.translatesAutoresizingMaskIntoConstraints = false 36 | return stackView 37 | }() 38 | 39 | // MARK: - Life cycle 40 | 41 | override func loadView() { 42 | self.view = NSView() 43 | } 44 | 45 | override func viewDidLoad() { 46 | super.viewDidLoad() 47 | 48 | self.view.translatesAutoresizingMaskIntoConstraints = false 49 | self.view.heightAnchor.constraint(equalToConstant: 90).isActive = true; 50 | 51 | self.lightView.imageButton.target = self 52 | self.lightView.imageButton.action = #selector(TodayViewController.lightButtonClicked) 53 | 54 | self.darkView.imageButton.target = self 55 | self.darkView.imageButton.action = #selector(TodayViewController.darkButtonClicked) 56 | 57 | self.containerStackView.addView(lightView, in: .center) 58 | self.containerStackView.addView(darkView, in: .center) 59 | self.view.addSubview(self.containerStackView) 60 | 61 | let margin: CGFloat = 8 62 | 63 | self.containerStackView.topAnchor.constraint(equalTo: self.view.topAnchor, constant: margin).isActive = true 64 | self.containerStackView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -margin).isActive = true; 65 | self.containerStackView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true 66 | } 67 | 68 | override func viewDidLayout() { 69 | super.viewDidLayout() 70 | self.syncAppearanceType() 71 | } 72 | 73 | // MARK: - Internal methods 74 | 75 | func syncAppearanceType() { 76 | let currentTheme = SLSGetAppearanceThemeLegacy() 77 | switch currentTheme { 78 | case .light: 79 | self.lightView.imageButton.isSelected = true 80 | self.darkView.imageButton.isSelected = false 81 | case .dark: 82 | self.lightView.imageButton.isSelected = false 83 | self.darkView.imageButton.isSelected = true 84 | default: 85 | self.lightView.imageButton.isSelected = false 86 | self.darkView.imageButton.isSelected = false 87 | } 88 | } 89 | 90 | // MARK: Button Action 91 | 92 | @objc func lightButtonClicked() { 93 | //#if DEBUG 94 | // self.lightView.imageButton.isSelected = true 95 | // self.darkView.imageButton.isSelected = false 96 | //#else 97 | let currentTheme = SLSGetAppearanceThemeLegacy() 98 | if currentTheme != AppearanceType.light { 99 | SLSSetAppearanceThemeLegacy(.light) 100 | } 101 | syncAppearanceType() 102 | //#endif 103 | } 104 | 105 | @objc func darkButtonClicked() { 106 | //#if DEBUG 107 | // self.lightView.imageButton.isSelected = false 108 | // self.darkView.imageButton.isSelected = true 109 | //#else 110 | let currentTheme = SLSGetAppearanceThemeLegacy() 111 | if currentTheme != AppearanceType.dark { 112 | SLSSetAppearanceThemeLegacy(.dark) 113 | } 114 | syncAppearanceType() 115 | //#endif 116 | } 117 | 118 | // MARK: - NotificationCenter 119 | 120 | func widgetPerformUpdate(completionHandler: (@escaping (NCUpdateResult) -> Void)) { 121 | completionHandler(.noData) 122 | } 123 | 124 | func widgetMarginInsets(forProposedMarginInsets defaultMarginInset: NSEdgeInsets) -> NSEdgeInsets { 125 | return NSEdgeInsetsZero 126 | } 127 | } 128 | 129 | // FIXME: TodayViewController's appearance not change when user change the appearance by system. 130 | -------------------------------------------------------------------------------- /Today/Classes/Views/ImageButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageButton.swift 3 | // Today 4 | // 5 | // Created by gm on 2019/7/25. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ImageButton:NSButton { 12 | 13 | public let borderWidth: CGFloat = 2 14 | 15 | public var isSelected: Bool = false { 16 | didSet { 17 | if self.isSelected { 18 | self.layer?.borderWidth = 2 19 | } else { 20 | self.layer?.borderWidth = 0 21 | } 22 | } 23 | } 24 | 25 | override init(frame frameRect: NSRect) { 26 | 27 | super.init(frame: frameRect) 28 | 29 | self.cell = SwitchCell() 30 | self.wantsLayer = true 31 | self.bezelStyle = .disclosure 32 | self.wantsLayer = true 33 | self.isBordered = false 34 | self.imagePosition = .imageOnly 35 | self.layer?.cornerRadius = 7 36 | self.layer?.masksToBounds = true 37 | self.layer?.borderColor = NSColor.controlAccentColor.cgColor 38 | (self.cell as? NSButtonCell)?.highlightsBy = .contentsCellMask 39 | self.translatesAutoresizingMaskIntoConstraints = false 40 | } 41 | 42 | required init?(coder: NSCoder) { 43 | super.init(coder: coder) 44 | } 45 | 46 | override func viewDidChangeEffectiveAppearance() { 47 | super.viewDidChangeEffectiveAppearance() 48 | 49 | // layout() or viewDidChangeEffectiveAppearance() 50 | // https://developer.apple.com/documentation/appkit/supporting_dark_mode_in_your_interface 51 | self.layer?.borderColor = NSColor.controlAccentColor.cgColor 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /Today/Classes/Views/ToggleView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageButton.swift 3 | // Today 4 | // 5 | // Created by gm on 2019/7/21. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ToggleView: NSView { 12 | 13 | public let imageButton: ImageButton = ImageButton() 14 | 15 | public let titleField: NSTextField = { 16 | let field = NSTextField() 17 | field.alignment = .center 18 | field.backgroundColor = .clear 19 | field.isEditable = false 20 | field.isBezeled = false 21 | field.font = NSFont.systemFont(ofSize: 12) 22 | field.translatesAutoresizingMaskIntoConstraints = false 23 | return field 24 | }() 25 | 26 | required init?(coder: NSCoder) { 27 | super.init(coder: coder) 28 | } 29 | 30 | public init (title: String, image: NSImage, target: AnyObject?, action: Selector?) { 31 | super.init(frame: NSZeroRect) 32 | 33 | self.translatesAutoresizingMaskIntoConstraints = false 34 | self.titleField.stringValue = title 35 | self.imageButton.image = image 36 | self.imageButton.target = target 37 | self.imageButton.action = action 38 | 39 | self.addSubview(self.imageButton) 40 | self.addSubview(self.titleField) 41 | 42 | let margin: CGFloat = 10 43 | self.imageButton.topAnchor.constraint(equalTo: self.topAnchor, constant: margin).isActive = true 44 | self.imageButton.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true 45 | self.imageButton.leftAnchor.constraint(equalTo: self.leftAnchor).isActive = true 46 | self.imageButton.rightAnchor.constraint(equalTo: self.rightAnchor).isActive = true 47 | self.titleField.topAnchor.constraint(equalTo: self.imageButton.bottomAnchor, constant: 6).isActive = true 48 | self.titleField.leftAnchor.constraint(equalTo: self.imageButton.leftAnchor).isActive = true 49 | self.titleField.rightAnchor.constraint(equalTo: self.imageButton.rightAnchor).isActive = true 50 | self.updateConstraints() 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Today/Frameworks/README.txt: -------------------------------------------------------------------------------- 1 | /System/Library/PrivateFrameworks/SkyLight.framework -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/SkyLight: -------------------------------------------------------------------------------- 1 | Versions/Current/SkyLight -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/AquaAppearanceHelper.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 18A391011 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | AquaAppearanceHelper 11 | CFBundleIdentifier 12 | com.apple.AquaAppearanceHelper 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | AquaAppearanceHelper 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | CFBundleVersion 26 | 1 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 11M335w 31 | DTPlatformName 32 | macosx 33 | DTPlatformVersion 34 | 10.15 35 | DTSDKBuild 36 | 19A500z 37 | DTSDKName 38 | macosx10.15internal 39 | DTXcode 40 | 1100 41 | DTXcodeBuild 42 | 11M335w 43 | LSMinimumSystemVersion 44 | 10.15 45 | LSUIElement 46 | 47 | NSHumanReadableCopyright 48 | Copyright © 2019 com.apple.SkyLight. All rights reserved. 49 | NSPrincipalClass 50 | NSApplication 51 | 52 | 53 | -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/AquaAppearanceHelper.app/Contents/MacOS/AquaAppearanceHelper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Frameworks/SkyLight.framework/Versions/A/Resources/AquaAppearanceHelper.app/Contents/MacOS/AquaAppearanceHelper -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/AquaAppearanceHelper.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/AquaAppearanceHelper.app/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | version.plist 8 | 9 | RH91+t5ES3CYpwrNYaYFUiU+vxE= 10 | 11 | 12 | files2 13 | 14 | version.plist 15 | 16 | hash2 17 | 18 | 58OCUteuhXGc9jQzZNQ29Qc5Ukj/02cIEd8PzJQmlHw= 19 | 20 | 21 | 22 | rules 23 | 24 | ^Resources/ 25 | 26 | ^Resources/.*\.lproj/ 27 | 28 | optional 29 | 30 | weight 31 | 1000 32 | 33 | ^Resources/.*\.lproj/locversion.plist$ 34 | 35 | omit 36 | 37 | weight 38 | 1100 39 | 40 | ^Resources/Base\.lproj/ 41 | 42 | weight 43 | 1010 44 | 45 | ^version.plist$ 46 | 47 | 48 | rules2 49 | 50 | .*\.dSYM($|/) 51 | 52 | weight 53 | 11 54 | 55 | ^(.*/)?\.DS_Store$ 56 | 57 | omit 58 | 59 | weight 60 | 2000 61 | 62 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 63 | 64 | nested 65 | 66 | weight 67 | 10 68 | 69 | ^.* 70 | 71 | ^Info\.plist$ 72 | 73 | omit 74 | 75 | weight 76 | 20 77 | 78 | ^PkgInfo$ 79 | 80 | omit 81 | 82 | weight 83 | 20 84 | 85 | ^Resources/ 86 | 87 | weight 88 | 20 89 | 90 | ^Resources/.*\.lproj/ 91 | 92 | optional 93 | 94 | weight 95 | 1000 96 | 97 | ^Resources/.*\.lproj/locversion.plist$ 98 | 99 | omit 100 | 101 | weight 102 | 1100 103 | 104 | ^Resources/Base\.lproj/ 105 | 106 | weight 107 | 1010 108 | 109 | ^[^/]+$ 110 | 111 | nested 112 | 113 | weight 114 | 10 115 | 116 | ^embedded\.provisionprofile$ 117 | 118 | weight 119 | 20 120 | 121 | ^version\.plist$ 122 | 123 | weight 124 | 20 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/AquaAppearanceHelper.app/Contents/version.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildAliasOf 6 | SkyLight 7 | BuildVersion 8 | 13 9 | CFBundleShortVersionString 10 | 1.0 11 | CFBundleVersion 12 | 1 13 | ProjectName 14 | SkyLight_Tools 15 | SourceVersion 16 | 427000000000000 17 | 18 | 19 | -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/Configuration.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Frameworks/SkyLight.framework/Versions/A/Resources/Configuration.plist -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/CursorAsset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Frameworks/SkyLight.framework/Versions/A/Resources/CursorAsset -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/CursorAsset_base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Frameworks/SkyLight.framework/Versions/A/Resources/CursorAsset_base -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 18A391011 7 | CFBundleExecutable 8 | SkyLight 9 | CFBundleIdentifier 10 | com.apple.SkyLight 11 | CFBundleName 12 | SkyLight 13 | CFBundleShortVersionString 14 | 1.600.0 15 | CFBundleSupportedPlatforms 16 | 17 | MacOSX 18 | 19 | DTCompiler 20 | com.apple.compilers.llvm.clang.1_0 21 | DTPlatformBuild 22 | 11M335w 23 | DTPlatformName 24 | macosx 25 | DTPlatformVersion 26 | 10.15 27 | DTSDKBuild 28 | 19A500z 29 | DTSDKName 30 | macosx10.15internal 31 | DTXcode 32 | 1100 33 | DTXcodeBuild 34 | 11M335w 35 | LSMinimumSystemVersion 36 | 10.15 37 | 38 | 39 | -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/SkyLightShaders.air64.metallib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Frameworks/SkyLight.framework/Versions/A/Resources/SkyLightShaders.air64.metallib -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/WSInfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Frameworks/SkyLight.framework/Versions/A/Resources/WSInfo -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/WindowServer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Frameworks/SkyLight.framework/Versions/A/Resources/WindowServer -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/Resources/version.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildAliasOf 6 | SkyLight 7 | BuildVersion 8 | 13 9 | CFBundleShortVersionString 10 | 1.600.0 11 | ProjectName 12 | SkyLight 13 | SourceVersion 14 | 427000000000000 15 | 16 | 17 | -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/SkyLight: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/Today/Frameworks/SkyLight.framework/Versions/A/SkyLight -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/A/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/AquaAppearanceHelper.app/Contents/Info.plist 8 | 9 | ZdKhLODDitPYKHAdXzPpkvBrGgQ= 10 | 11 | Resources/AquaAppearanceHelper.app/Contents/MacOS/AquaAppearanceHelper 12 | 13 | mrbNUxBFcCNqJQbgf4eCiTbE9XE= 14 | 15 | Resources/AquaAppearanceHelper.app/Contents/PkgInfo 16 | 17 | n57qDP4tZfLD1rCS43W0B4LQjzE= 18 | 19 | Resources/AquaAppearanceHelper.app/Contents/_CodeSignature/CodeResources 20 | 21 | Pdd72bSRGweEUG/w8DtMNAf4Jw8= 22 | 23 | Resources/AquaAppearanceHelper.app/Contents/version.plist 24 | 25 | RH91+t5ES3CYpwrNYaYFUiU+vxE= 26 | 27 | Resources/Configuration.plist 28 | 29 | jcI2+NL+zCsynBNHYorxvixc9pE= 30 | 31 | Resources/CursorAsset 32 | 33 | 1rPsBFsLy3C2NcaSXtEqp8TXQEg= 34 | 35 | Resources/CursorAsset_base 36 | 37 | 0Q68CUjoRoj/GlOmYu1LMWYkbc8= 38 | 39 | Resources/Info.plist 40 | 41 | 7OUdOJorJxdXAAkvdEsJOKiFByw= 42 | 43 | Resources/SkyLightShaders.air64.metallib 44 | 45 | l3F/vx21SUr6Zg27CZZMmCPCmYs= 46 | 47 | Resources/WSInfo 48 | 49 | hkJeh5/aheS3uYoC7n6M1GbTwJg= 50 | 51 | Resources/WindowServer 52 | 53 | jZBSAZh/WzOMxjzfowMDaLs+IZo= 54 | 55 | Resources/version.plist 56 | 57 | k1NUOEeQbbcUmRzOFxo6zZQrknY= 58 | 59 | 60 | files2 61 | 62 | Resources/AquaAppearanceHelper.app/Contents/Info.plist 63 | 64 | hash2 65 | 66 | BmaYcDRkplJXOJZjRxhbhXW+k8DxKutwMUtP88qjEkg= 67 | 68 | 69 | Resources/AquaAppearanceHelper.app/Contents/MacOS/AquaAppearanceHelper 70 | 71 | hash2 72 | 73 | EQ+iPV/Uj+Fco552JFsQmoxnbH03ga9glecQiSW7ts0= 74 | 75 | 76 | Resources/AquaAppearanceHelper.app/Contents/PkgInfo 77 | 78 | hash2 79 | 80 | glAhkclISwTWhTdPmHmgBmBpxJuKyuegSwHTjQfo7KA= 81 | 82 | 83 | Resources/AquaAppearanceHelper.app/Contents/_CodeSignature/CodeResources 84 | 85 | hash2 86 | 87 | 7d10nEc3Ub80KT4EBNHN6ZhGbB+7yWik7i6PdpdIRog= 88 | 89 | 90 | Resources/AquaAppearanceHelper.app/Contents/version.plist 91 | 92 | hash2 93 | 94 | 58OCUteuhXGc9jQzZNQ29Qc5Ukj/02cIEd8PzJQmlHw= 95 | 96 | 97 | Resources/Configuration.plist 98 | 99 | hash2 100 | 101 | l4g521VLX8g9Eo8/voNyPOhlFvrPlqD/m3uL0TyB950= 102 | 103 | 104 | Resources/CursorAsset 105 | 106 | hash2 107 | 108 | DX88vyck+cybZhIolYOurNNWIJg9A4Iv4pVDbI8sYNU= 109 | 110 | 111 | Resources/CursorAsset_base 112 | 113 | hash2 114 | 115 | pMcIYDOqkOZJVNS6TEQv0znbRLNTuWLPGmI5b1YUbqw= 116 | 117 | 118 | Resources/Info.plist 119 | 120 | hash2 121 | 122 | uSBKIIo9Ml7vXFeLDg826oxIkzeknd/vOm97Whk3LjI= 123 | 124 | 125 | Resources/SkyLightShaders.air64.metallib 126 | 127 | hash2 128 | 129 | AeEnjADESKhHphD621jk2nWJXPQr90+cx5zXg6NQ9RQ= 130 | 131 | 132 | Resources/WSInfo 133 | 134 | hash2 135 | 136 | UcuBpa7mvszfIq/oiA0sU4P/ElmMP7B0T8bQ+aEbQHc= 137 | 138 | 139 | Resources/WindowServer 140 | 141 | hash2 142 | 143 | OD+ivtG4n7ILweN4a1MEo5DGj2WF7GD9LIZ/wjQ38Ms= 144 | 145 | 146 | Resources/version.plist 147 | 148 | hash2 149 | 150 | 6euSL4HWSwtw/DdNlVTpi3XGu/ETMe/my0SHPhBvwRw= 151 | 152 | 153 | 154 | rules 155 | 156 | ^Resources/ 157 | 158 | ^Resources/.*\.lproj/ 159 | 160 | optional 161 | 162 | weight 163 | 1000 164 | 165 | ^Resources/.*\.lproj/locversion.plist$ 166 | 167 | omit 168 | 169 | weight 170 | 1100 171 | 172 | ^Resources/Base\.lproj/ 173 | 174 | weight 175 | 1010 176 | 177 | ^version.plist$ 178 | 179 | 180 | rules2 181 | 182 | .*\.dSYM($|/) 183 | 184 | weight 185 | 11 186 | 187 | ^(.*/)?\.DS_Store$ 188 | 189 | omit 190 | 191 | weight 192 | 2000 193 | 194 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 195 | 196 | nested 197 | 198 | weight 199 | 10 200 | 201 | ^.* 202 | 203 | ^Info\.plist$ 204 | 205 | omit 206 | 207 | weight 208 | 20 209 | 210 | ^PkgInfo$ 211 | 212 | omit 213 | 214 | weight 215 | 20 216 | 217 | ^Resources/ 218 | 219 | weight 220 | 20 221 | 222 | ^Resources/.*\.lproj/ 223 | 224 | optional 225 | 226 | weight 227 | 1000 228 | 229 | ^Resources/.*\.lproj/locversion.plist$ 230 | 231 | omit 232 | 233 | weight 234 | 1100 235 | 236 | ^Resources/Base\.lproj/ 237 | 238 | weight 239 | 1010 240 | 241 | ^[^/]+$ 242 | 243 | nested 244 | 245 | weight 246 | 10 247 | 248 | ^embedded\.provisionprofile$ 249 | 250 | weight 251 | 20 252 | 253 | ^version\.plist$ 254 | 255 | weight 256 | 20 257 | 258 | 259 | 260 | 261 | -------------------------------------------------------------------------------- /Today/Frameworks/SkyLight.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /Today/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Today 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | NSExtensionPointVersion 30 | 3.0 31 | 32 | NSExtensionPointIdentifier 33 | com.apple.widget-extension 34 | NSExtensionPrincipalClass 35 | $(PRODUCT_MODULE_NAME).TodayViewController 36 | com.apple.notificationcenter.widget.description 37 | Today 38 | 39 | NSHumanReadableCopyright 40 | Copyright © 2019 GMWorkStudio. All rights reserved. 41 | 42 | 43 | -------------------------------------------------------------------------------- /Today/Today-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // BridgeHeaders.h 3 | // AppearancesSwitcher 4 | // 5 | // Created by gm on 2019/7/16. 6 | // Copyright © 2019 GMWorkStudio. All rights reserved. 7 | // 8 | 9 | #ifndef BridgeHeaders_h 10 | #define BridgeHeaders_h 11 | 12 | #import 13 | 14 | typedef NS_ENUM(NSInteger, AppearanceType) { 15 | AppearanceTypeLight = 0, 16 | AppearanceTypeDark = 1, 17 | }; 18 | 19 | //typedef NS_ENUM(NSInteger, AccentColorType) { 20 | // AccentColorTypeGraphite = -1, 21 | // AccentColorTypeRed = 0, 22 | // AccentColorTypeOrange = 1, 23 | // AccentColorTypeYellow = 2, 24 | // AccentColorTypeGreen = 3, 25 | // AccentColorTypeBlue = 4, 26 | // AccentColorTypePurple = 5, 27 | // AccentColorTypePink = 6, 28 | //}; 29 | 30 | /** 31 | Change theme 32 | Private Interface 33 | Will post "ApplePrivateInterfaceThemeChangedNotification" 34 | @param AppearanceType 35 | */ 36 | void SLSSetAppearanceThemeLegacy(AppearanceType); 37 | 38 | 39 | /// Obtain current system appearance. 40 | AppearanceType SLSGetAppearanceThemeLegacy(); 41 | 42 | /* 43 | Need outside sandbox access entitlement: 'user-preference-write' or 'file-write-data'. 44 | Write 'AppleInterfaceStyleSwitchesAutomatically' in CFPrefsPlistSource. 45 | (Domain: kCFPreferencesAnyApplication, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) 46 | */ 47 | NSInteger SLSSetAppearanceThemeSwitchesAutomatically(NSInteger a1); 48 | 49 | /// Obtain current system accent color. 50 | //AccentColorType NSColorGetUserAccentColor(); 51 | 52 | #endif /* BridgeHeaders_h */ 53 | 54 | 55 | -------------------------------------------------------------------------------- /Today/Today.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 | -------------------------------------------------------------------------------- /Today/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Display name and description for this extension. */ 2 | "CFBundleDisplayName" = "Today"; 3 | "com.apple.notificationcenter.widget.description" = "Sample description"; 4 | 5 | -------------------------------------------------------------------------------- /screenshot/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoringApp/AppearancesSwitcher/e7e17c7a279981ccffdf0346498176062c71f786/screenshot/preview.png --------------------------------------------------------------------------------