├── .gitignore ├── LICENSE ├── README.md ├── disableQuarantine.sh ├── img ├── icon_prev.png └── popover_prev.png ├── wledQuickControl.app └── Contents │ ├── Info.plist │ ├── Library │ └── LoginItems │ │ └── LaunchAtLoginHelper.app │ │ └── Contents │ │ ├── Info.plist │ │ ├── MacOS │ │ └── LaunchAtLoginHelper │ │ ├── PkgInfo │ │ └── _CodeSignature │ │ └── CodeResources │ ├── MacOS │ └── wledQuickControl │ ├── PkgInfo │ ├── Resources │ ├── Assets.car │ └── Base.lproj │ │ └── Main.storyboardc │ │ ├── Info.plist │ │ ├── MainMenu.nib │ │ ├── MainViewController.nib │ │ └── iwo-M9-wDL-view-p7o-0e-OsN.nib │ └── _CodeSignature │ └── CodeResources └── wledQuickControl ├── wledQuickControl.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ │ └── Package.resolved │ └── xcuserdata │ │ ├── c5289575.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ ├── satrik.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── warrenburton.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcshareddata │ └── xcschemes │ │ └── wledQuickControl.xcscheme └── xcuserdata │ ├── c5289575.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ └── xcschememanagement.plist │ ├── satrik.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ └── xcschememanagement.plist │ └── warrenburton.xcuserdatad │ └── xcschemes │ ├── Quotes.xcscheme │ └── xcschememanagement.plist └── wledQuickControl ├── AppDelegate.swift ├── Assets.xcassets ├── AppIcon.appiconset │ ├── Contents.json │ └── icon.png ├── Contents.json ├── github_icon.imageset │ ├── Contents.json │ └── github_icon.png ├── wled_off.imageset │ ├── Contents.json │ └── wled_off.png └── wled_on.imageset │ ├── Contents.json │ └── wled_on.png ├── Base.lproj └── Main.storyboard ├── EventMonitor.swift ├── Info.plist └── MainViewController.swift /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 satrik 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## wledQuickControl 2 | 3 | ### functions 4 | - Left click on the Menubar icon will toggle the WLED device On/Off 5 | - Right click on the Menubar icon: 6 | - will update the icon/slider with the current states 7 | - will show the Brightness slider 8 | - click on the little gear symbol will show the settings 9 | 10 | ### install 11 | - download or clone the repo 12 | - open a terminal and cd into the downloaded folder 13 | - run `sh disableQuarantine.sh` 14 | - move the _wledQuickControl.app_ file to the Applications directory 15 | - start the App the first time via right click > open and "Trust me" :wink: 16 | 17 | Icon On/Off Preview: 18 | 19 | ![icon_prev](/img/icon_prev.png) 20 | 21 | Popover/Settings Preview: 22 | 23 | ![popover_prev](/img/popover_prev.png) -------------------------------------------------------------------------------- /disableQuarantine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CURRENTDIR=$PWD 4 | APP="wledQuickControl.app" 5 | 6 | cd ${CURRENTDIR} 7 | 8 | if [ -d $APP ]; then 9 | 10 | xattr -cr $CURRENTDIR/$APP 11 | 12 | echo "$APP should work now :)" 13 | 14 | else 15 | 16 | echo "$APP not found. Make sure to execute this script in the same folder as the app" 17 | 18 | fi 19 | 20 | exit 0 -------------------------------------------------------------------------------- /img/icon_prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/img/icon_prev.png -------------------------------------------------------------------------------- /img/popover_prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/img/popover_prev.png -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 21F79 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | wledQuickControl 11 | CFBundleIconName 12 | AppIcon 13 | CFBundleIdentifier 14 | com.satrik.wledQuickControl 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | wledQuickControl 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.1 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | DTCompiler 30 | com.apple.compilers.llvm.clang.1_0 31 | DTPlatformBuild 32 | 13F17a 33 | DTPlatformName 34 | macosx 35 | DTPlatformVersion 36 | 12.3 37 | DTSDKBuild 38 | 21E226 39 | DTSDKName 40 | macosx12.3 41 | DTXcode 42 | 1340 43 | DTXcodeBuild 44 | 13F17a 45 | LSApplicationCategoryType 46 | public.app-category.productivity 47 | LSMinimumSystemVersion 48 | 11.0 49 | LSUIElement 50 | 51 | NSAppTransportSecurity 52 | 53 | NSAllowsArbitraryLoads 54 | 55 | 56 | NSHumanReadableCopyright 57 | Copyright © 2022 Sascha Petrik 58 | NSMainStoryboardFile 59 | Main 60 | NSPrincipalClass 61 | NSApplication 62 | 63 | 64 | -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/Info.plist -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | files2 8 | 9 | rules 10 | 11 | ^Resources/ 12 | 13 | ^Resources/.*\.lproj/ 14 | 15 | optional 16 | 17 | weight 18 | 1000 19 | 20 | ^Resources/.*\.lproj/locversion.plist$ 21 | 22 | omit 23 | 24 | weight 25 | 1100 26 | 27 | ^Resources/Base\.lproj/ 28 | 29 | weight 30 | 1010 31 | 32 | ^version.plist$ 33 | 34 | 35 | rules2 36 | 37 | .*\.dSYM($|/) 38 | 39 | weight 40 | 11 41 | 42 | ^(.*/)?\.DS_Store$ 43 | 44 | omit 45 | 46 | weight 47 | 2000 48 | 49 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 50 | 51 | nested 52 | 53 | weight 54 | 10 55 | 56 | ^.* 57 | 58 | ^Info\.plist$ 59 | 60 | omit 61 | 62 | weight 63 | 20 64 | 65 | ^PkgInfo$ 66 | 67 | omit 68 | 69 | weight 70 | 20 71 | 72 | ^Resources/ 73 | 74 | weight 75 | 20 76 | 77 | ^Resources/.*\.lproj/ 78 | 79 | optional 80 | 81 | weight 82 | 1000 83 | 84 | ^Resources/.*\.lproj/locversion.plist$ 85 | 86 | omit 87 | 88 | weight 89 | 1100 90 | 91 | ^Resources/Base\.lproj/ 92 | 93 | weight 94 | 1010 95 | 96 | ^[^/]+$ 97 | 98 | nested 99 | 100 | weight 101 | 10 102 | 103 | ^embedded\.provisionprofile$ 104 | 105 | weight 106 | 20 107 | 108 | ^version\.plist$ 109 | 110 | weight 111 | 20 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/MacOS/wledQuickControl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl.app/Contents/MacOS/wledQuickControl -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Resources/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl.app/Contents/Resources/Assets.car -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Resources/Base.lproj/Main.storyboardc/MainViewController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl.app/Contents/Resources/Base.lproj/Main.storyboardc/MainViewController.nib -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/Resources/Base.lproj/Main.storyboardc/iwo-M9-wDL-view-p7o-0e-OsN.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl.app/Contents/Resources/Base.lproj/Main.storyboardc/iwo-M9-wDL-view-p7o-0e-OsN.nib -------------------------------------------------------------------------------- /wledQuickControl.app/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/Assets.car 8 | 9 | WXOv2DAJMXADXsIa3gLWRRBl4yM= 10 | 11 | Resources/Base.lproj/Main.storyboardc/Info.plist 12 | 13 | OCd8driUwlCn/Y256P8uVqTQU4k= 14 | 15 | Resources/Base.lproj/Main.storyboardc/MainMenu.nib 16 | 17 | IbMfRfWwnP0dT9fzlc79A7V/8To= 18 | 19 | Resources/Base.lproj/Main.storyboardc/MainViewController.nib 20 | 21 | /J125liR+pJrxsf8gdcSiJa1ETs= 22 | 23 | Resources/Base.lproj/Main.storyboardc/iwo-M9-wDL-view-p7o-0e-OsN.nib 24 | 25 | Bip4e/CavE6aIFb1VugQ3y1S3Yc= 26 | 27 | 28 | files2 29 | 30 | Library/LoginItems/LaunchAtLoginHelper.app 31 | 32 | cdhash 33 | 34 | Z3P6y7T73JXtDMMzGOFXTSJdFjI= 35 | 36 | requirement 37 | cdhash H"6773facbb4fbdc95ed0cc33318e1574d225d1632" or cdhash H"bea71aa012f393cfe6698d1bd48bf7da54fbd7c0" 38 | 39 | Resources/Assets.car 40 | 41 | hash2 42 | 43 | f6VdMv2FOSG8zF7m+2CTEEv8f3kMI+b0nbmD2uQjuo0= 44 | 45 | 46 | Resources/Base.lproj/Main.storyboardc/Info.plist 47 | 48 | hash2 49 | 50 | 1iYQJ41SmuTBkWU7pbmDtsnmqM9U3+1xL9iR6le/k7Q= 51 | 52 | 53 | Resources/Base.lproj/Main.storyboardc/MainMenu.nib 54 | 55 | hash2 56 | 57 | j+hV44zLE7CL0YoGLAypxZQrc2YOy8G9RjnmxKBqRO8= 58 | 59 | 60 | Resources/Base.lproj/Main.storyboardc/MainViewController.nib 61 | 62 | hash2 63 | 64 | hrnBXT5LW849hFSkztuc1XbA6K2nJdVYUWBnpbdd8nA= 65 | 66 | 67 | Resources/Base.lproj/Main.storyboardc/iwo-M9-wDL-view-p7o-0e-OsN.nib 68 | 69 | hash2 70 | 71 | YAE+MkJ9NNKjNNXvl4YsOVPrgvt1/oSdyId8zcRJRAA= 72 | 73 | 74 | 75 | rules 76 | 77 | ^Resources/ 78 | 79 | ^Resources/.*\.lproj/ 80 | 81 | optional 82 | 83 | weight 84 | 1000 85 | 86 | ^Resources/.*\.lproj/locversion.plist$ 87 | 88 | omit 89 | 90 | weight 91 | 1100 92 | 93 | ^Resources/Base\.lproj/ 94 | 95 | weight 96 | 1010 97 | 98 | ^version.plist$ 99 | 100 | 101 | rules2 102 | 103 | .*\.dSYM($|/) 104 | 105 | weight 106 | 11 107 | 108 | ^(.*/)?\.DS_Store$ 109 | 110 | omit 111 | 112 | weight 113 | 2000 114 | 115 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 116 | 117 | nested 118 | 119 | weight 120 | 10 121 | 122 | ^.* 123 | 124 | ^Info\.plist$ 125 | 126 | omit 127 | 128 | weight 129 | 20 130 | 131 | ^PkgInfo$ 132 | 133 | omit 134 | 135 | weight 136 | 20 137 | 138 | ^Resources/ 139 | 140 | weight 141 | 20 142 | 143 | ^Resources/.*\.lproj/ 144 | 145 | optional 146 | 147 | weight 148 | 1000 149 | 150 | ^Resources/.*\.lproj/locversion.plist$ 151 | 152 | omit 153 | 154 | weight 155 | 1100 156 | 157 | ^Resources/Base\.lproj/ 158 | 159 | weight 160 | 1010 161 | 162 | ^[^/]+$ 163 | 164 | nested 165 | 166 | weight 167 | 10 168 | 169 | ^embedded\.provisionprofile$ 170 | 171 | weight 172 | 20 173 | 174 | ^version\.plist$ 175 | 176 | weight 177 | 20 178 | 179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4219F2B126D1482A0074616A /* LaunchAtLogin in Frameworks */ = {isa = PBXBuildFile; productRef = 4219F2B026D1482A0074616A /* LaunchAtLogin */; }; 11 | 422C41412881574500F873F9 /* LaunchAtLogin in Frameworks */ = {isa = PBXBuildFile; productRef = 422C41402881574500F873F9 /* LaunchAtLogin */; }; 12 | AD988B841F1D23CB002C6B61 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD988B831F1D23CB002C6B61 /* AppDelegate.swift */; }; 13 | AD988B881F1D23CB002C6B61 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AD988B871F1D23CB002C6B61 /* Assets.xcassets */; }; 14 | AD988B8B1F1D23CB002C6B61 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AD988B891F1D23CB002C6B61 /* Main.storyboard */; }; 15 | AD988B941F1EB50C002C6B61 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD988B931F1EB50C002C6B61 /* MainViewController.swift */; }; 16 | AD988B9C1F20DA37002C6B61 /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD988B9B1F20DA37002C6B61 /* EventMonitor.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | AD988B801F1D23CB002C6B61 /* wledQuickControl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = wledQuickControl.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | AD988B831F1D23CB002C6B61 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | AD988B871F1D23CB002C6B61 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 23 | AD988B8A1F1D23CB002C6B61 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | AD988B8C1F1D23CB002C6B61 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 25 | AD988B931F1EB50C002C6B61 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; 26 | AD988B9B1F20DA37002C6B61 /* EventMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventMonitor.swift; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | AD988B7D1F1D23CB002C6B61 /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | 422C41412881574500F873F9 /* LaunchAtLogin in Frameworks */, 35 | 4219F2B126D1482A0074616A /* LaunchAtLogin in Frameworks */, 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | AD988B771F1D23CB002C6B61 = { 43 | isa = PBXGroup; 44 | children = ( 45 | AD988B821F1D23CB002C6B61 /* wledQuickControl */, 46 | AD988B811F1D23CB002C6B61 /* Products */, 47 | ); 48 | indentWidth = 2; 49 | sourceTree = ""; 50 | tabWidth = 2; 51 | }; 52 | AD988B811F1D23CB002C6B61 /* Products */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | AD988B801F1D23CB002C6B61 /* wledQuickControl.app */, 56 | ); 57 | name = Products; 58 | sourceTree = ""; 59 | }; 60 | AD988B821F1D23CB002C6B61 /* wledQuickControl */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | AD988B8C1F1D23CB002C6B61 /* Info.plist */, 64 | AD988B831F1D23CB002C6B61 /* AppDelegate.swift */, 65 | AD988B9B1F20DA37002C6B61 /* EventMonitor.swift */, 66 | AD988B931F1EB50C002C6B61 /* MainViewController.swift */, 67 | AD988B871F1D23CB002C6B61 /* Assets.xcassets */, 68 | AD988B891F1D23CB002C6B61 /* Main.storyboard */, 69 | ); 70 | path = wledQuickControl; 71 | sourceTree = ""; 72 | }; 73 | /* End PBXGroup section */ 74 | 75 | /* Begin PBXNativeTarget section */ 76 | AD988B7F1F1D23CB002C6B61 /* wledQuickControl */ = { 77 | isa = PBXNativeTarget; 78 | buildConfigurationList = AD988B901F1D23CB002C6B61 /* Build configuration list for PBXNativeTarget "wledQuickControl" */; 79 | buildPhases = ( 80 | AD988B7C1F1D23CB002C6B61 /* Sources */, 81 | AD988B7D1F1D23CB002C6B61 /* Frameworks */, 82 | AD988B7E1F1D23CB002C6B61 /* Resources */, 83 | 4219F2B226D1489C0074616A /* ShellScript */, 84 | ); 85 | buildRules = ( 86 | ); 87 | dependencies = ( 88 | ); 89 | name = wledQuickControl; 90 | packageProductDependencies = ( 91 | 4219F2B026D1482A0074616A /* LaunchAtLogin */, 92 | 422C41402881574500F873F9 /* LaunchAtLogin */, 93 | ); 94 | productName = Quotes; 95 | productReference = AD988B801F1D23CB002C6B61 /* wledQuickControl.app */; 96 | productType = "com.apple.product-type.application"; 97 | }; 98 | /* End PBXNativeTarget section */ 99 | 100 | /* Begin PBXProject section */ 101 | AD988B781F1D23CB002C6B61 /* Project object */ = { 102 | isa = PBXProject; 103 | attributes = { 104 | LastSwiftUpdateCheck = 0900; 105 | LastUpgradeCheck = 1250; 106 | ORGANIZATIONNAME = "Razeware LLC"; 107 | TargetAttributes = { 108 | AD988B7F1F1D23CB002C6B61 = { 109 | CreatedOnToolsVersion = 9.0; 110 | LastSwiftMigration = 1250; 111 | SystemCapabilities = { 112 | com.apple.Sandbox = { 113 | enabled = 0; 114 | }; 115 | }; 116 | }; 117 | }; 118 | }; 119 | buildConfigurationList = AD988B7B1F1D23CB002C6B61 /* Build configuration list for PBXProject "wledQuickControl" */; 120 | compatibilityVersion = "Xcode 8.0"; 121 | developmentRegion = en; 122 | hasScannedForEncodings = 0; 123 | knownRegions = ( 124 | en, 125 | Base, 126 | ); 127 | mainGroup = AD988B771F1D23CB002C6B61; 128 | packageReferences = ( 129 | 4219F2AF26D1482A0074616A /* XCRemoteSwiftPackageReference "LaunchAtLogin" */, 130 | 422C413F2881574500F873F9 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */, 131 | ); 132 | productRefGroup = AD988B811F1D23CB002C6B61 /* Products */; 133 | projectDirPath = ""; 134 | projectRoot = ""; 135 | targets = ( 136 | AD988B7F1F1D23CB002C6B61 /* wledQuickControl */, 137 | ); 138 | }; 139 | /* End PBXProject section */ 140 | 141 | /* Begin PBXResourcesBuildPhase section */ 142 | AD988B7E1F1D23CB002C6B61 /* Resources */ = { 143 | isa = PBXResourcesBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | AD988B881F1D23CB002C6B61 /* Assets.xcassets in Resources */, 147 | AD988B8B1F1D23CB002C6B61 /* Main.storyboard in Resources */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | /* End PBXResourcesBuildPhase section */ 152 | 153 | /* Begin PBXShellScriptBuildPhase section */ 154 | 4219F2B226D1489C0074616A /* ShellScript */ = { 155 | isa = PBXShellScriptBuildPhase; 156 | buildActionMask = 2147483647; 157 | files = ( 158 | ); 159 | inputFileListPaths = ( 160 | ); 161 | inputPaths = ( 162 | ); 163 | outputFileListPaths = ( 164 | ); 165 | outputPaths = ( 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | shellPath = /bin/sh; 169 | shellScript = "${BUILT_PRODUCTS_DIR}/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/copy-helper-swiftpm.sh\n"; 170 | }; 171 | /* End PBXShellScriptBuildPhase section */ 172 | 173 | /* Begin PBXSourcesBuildPhase section */ 174 | AD988B7C1F1D23CB002C6B61 /* Sources */ = { 175 | isa = PBXSourcesBuildPhase; 176 | buildActionMask = 2147483647; 177 | files = ( 178 | AD988B841F1D23CB002C6B61 /* AppDelegate.swift in Sources */, 179 | AD988B941F1EB50C002C6B61 /* MainViewController.swift in Sources */, 180 | AD988B9C1F20DA37002C6B61 /* EventMonitor.swift in Sources */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | /* End PBXSourcesBuildPhase section */ 185 | 186 | /* Begin PBXVariantGroup section */ 187 | AD988B891F1D23CB002C6B61 /* Main.storyboard */ = { 188 | isa = PBXVariantGroup; 189 | children = ( 190 | AD988B8A1F1D23CB002C6B61 /* Base */, 191 | ); 192 | name = Main.storyboard; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXVariantGroup section */ 196 | 197 | /* Begin XCBuildConfiguration section */ 198 | AD988B8E1F1D23CB002C6B61 /* Debug */ = { 199 | isa = XCBuildConfiguration; 200 | buildSettings = { 201 | ALWAYS_SEARCH_USER_PATHS = NO; 202 | CLANG_ANALYZER_NONNULL = YES; 203 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 204 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 205 | CLANG_CXX_LIBRARY = "libc++"; 206 | CLANG_ENABLE_MODULES = YES; 207 | CLANG_ENABLE_OBJC_ARC = YES; 208 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 209 | CLANG_WARN_BOOL_CONVERSION = YES; 210 | CLANG_WARN_COMMA = YES; 211 | CLANG_WARN_CONSTANT_CONVERSION = YES; 212 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 213 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 214 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 215 | CLANG_WARN_EMPTY_BODY = YES; 216 | CLANG_WARN_ENUM_CONVERSION = YES; 217 | CLANG_WARN_INFINITE_RECURSION = YES; 218 | CLANG_WARN_INT_CONVERSION = YES; 219 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 220 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 221 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 222 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 223 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 224 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 225 | CLANG_WARN_STRICT_PROTOTYPES = YES; 226 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 227 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 228 | CLANG_WARN_UNREACHABLE_CODE = YES; 229 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 230 | CODE_SIGN_IDENTITY = "-"; 231 | COPY_PHASE_STRIP = NO; 232 | DEBUG_INFORMATION_FORMAT = dwarf; 233 | ENABLE_STRICT_OBJC_MSGSEND = YES; 234 | ENABLE_TESTABILITY = YES; 235 | GCC_C_LANGUAGE_STANDARD = gnu11; 236 | GCC_DYNAMIC_NO_PIC = NO; 237 | GCC_NO_COMMON_BLOCKS = YES; 238 | GCC_OPTIMIZATION_LEVEL = 0; 239 | GCC_PREPROCESSOR_DEFINITIONS = ( 240 | "DEBUG=1", 241 | "$(inherited)", 242 | ); 243 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 244 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 245 | GCC_WARN_UNDECLARED_SELECTOR = YES; 246 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 247 | GCC_WARN_UNUSED_FUNCTION = YES; 248 | GCC_WARN_UNUSED_VARIABLE = YES; 249 | MACOSX_DEPLOYMENT_TARGET = 11.0; 250 | MTL_ENABLE_DEBUG_INFO = YES; 251 | ONLY_ACTIVE_ARCH = YES; 252 | SDKROOT = macosx; 253 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 254 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 255 | }; 256 | name = Debug; 257 | }; 258 | AD988B8F1F1D23CB002C6B61 /* Release */ = { 259 | isa = XCBuildConfiguration; 260 | buildSettings = { 261 | ALWAYS_SEARCH_USER_PATHS = NO; 262 | CLANG_ANALYZER_NONNULL = YES; 263 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 264 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 265 | CLANG_CXX_LIBRARY = "libc++"; 266 | CLANG_ENABLE_MODULES = YES; 267 | CLANG_ENABLE_OBJC_ARC = YES; 268 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 269 | CLANG_WARN_BOOL_CONVERSION = YES; 270 | CLANG_WARN_COMMA = YES; 271 | CLANG_WARN_CONSTANT_CONVERSION = YES; 272 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 273 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 274 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 275 | CLANG_WARN_EMPTY_BODY = YES; 276 | CLANG_WARN_ENUM_CONVERSION = YES; 277 | CLANG_WARN_INFINITE_RECURSION = YES; 278 | CLANG_WARN_INT_CONVERSION = YES; 279 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 280 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 281 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 282 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 283 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 284 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 285 | CLANG_WARN_STRICT_PROTOTYPES = YES; 286 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 287 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 288 | CLANG_WARN_UNREACHABLE_CODE = YES; 289 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 290 | CODE_SIGN_IDENTITY = "-"; 291 | COPY_PHASE_STRIP = NO; 292 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 293 | ENABLE_NS_ASSERTIONS = NO; 294 | ENABLE_STRICT_OBJC_MSGSEND = YES; 295 | GCC_C_LANGUAGE_STANDARD = gnu11; 296 | GCC_NO_COMMON_BLOCKS = YES; 297 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 298 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 299 | GCC_WARN_UNDECLARED_SELECTOR = YES; 300 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 301 | GCC_WARN_UNUSED_FUNCTION = YES; 302 | GCC_WARN_UNUSED_VARIABLE = YES; 303 | MACOSX_DEPLOYMENT_TARGET = 11.0; 304 | MTL_ENABLE_DEBUG_INFO = NO; 305 | SDKROOT = macosx; 306 | SWIFT_COMPILATION_MODE = wholemodule; 307 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 308 | }; 309 | name = Release; 310 | }; 311 | AD988B911F1D23CB002C6B61 /* Debug */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 315 | CODE_SIGN_IDENTITY = "-"; 316 | CODE_SIGN_STYLE = Automatic; 317 | COMBINE_HIDPI_IMAGES = YES; 318 | DEVELOPMENT_TEAM = ""; 319 | INFOPLIST_FILE = wledQuickControl/Info.plist; 320 | LD_RUNPATH_SEARCH_PATHS = ( 321 | "$(inherited)", 322 | "@executable_path/../Frameworks", 323 | ); 324 | MACOSX_DEPLOYMENT_TARGET = 11.0; 325 | MARKETING_VERSION = 1.1; 326 | PRODUCT_BUNDLE_IDENTIFIER = com.satrik.wledQuickControl; 327 | PRODUCT_NAME = "$(TARGET_NAME)"; 328 | PROVISIONING_PROFILE_SPECIFIER = ""; 329 | SWIFT_VERSION = 5.0; 330 | }; 331 | name = Debug; 332 | }; 333 | AD988B921F1D23CB002C6B61 /* Release */ = { 334 | isa = XCBuildConfiguration; 335 | buildSettings = { 336 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 337 | CODE_SIGN_IDENTITY = "-"; 338 | CODE_SIGN_STYLE = Automatic; 339 | COMBINE_HIDPI_IMAGES = YES; 340 | DEVELOPMENT_TEAM = ""; 341 | INFOPLIST_FILE = wledQuickControl/Info.plist; 342 | LD_RUNPATH_SEARCH_PATHS = ( 343 | "$(inherited)", 344 | "@executable_path/../Frameworks", 345 | ); 346 | MACOSX_DEPLOYMENT_TARGET = 11.0; 347 | MARKETING_VERSION = 1.1; 348 | PRODUCT_BUNDLE_IDENTIFIER = com.satrik.wledQuickControl; 349 | PRODUCT_NAME = "$(TARGET_NAME)"; 350 | PROVISIONING_PROFILE_SPECIFIER = ""; 351 | SWIFT_VERSION = 5.0; 352 | }; 353 | name = Release; 354 | }; 355 | /* End XCBuildConfiguration section */ 356 | 357 | /* Begin XCConfigurationList section */ 358 | AD988B7B1F1D23CB002C6B61 /* Build configuration list for PBXProject "wledQuickControl" */ = { 359 | isa = XCConfigurationList; 360 | buildConfigurations = ( 361 | AD988B8E1F1D23CB002C6B61 /* Debug */, 362 | AD988B8F1F1D23CB002C6B61 /* Release */, 363 | ); 364 | defaultConfigurationIsVisible = 0; 365 | defaultConfigurationName = Release; 366 | }; 367 | AD988B901F1D23CB002C6B61 /* Build configuration list for PBXNativeTarget "wledQuickControl" */ = { 368 | isa = XCConfigurationList; 369 | buildConfigurations = ( 370 | AD988B911F1D23CB002C6B61 /* Debug */, 371 | AD988B921F1D23CB002C6B61 /* Release */, 372 | ); 373 | defaultConfigurationIsVisible = 0; 374 | defaultConfigurationName = Release; 375 | }; 376 | /* End XCConfigurationList section */ 377 | 378 | /* Begin XCRemoteSwiftPackageReference section */ 379 | 4219F2AF26D1482A0074616A /* XCRemoteSwiftPackageReference "LaunchAtLogin" */ = { 380 | isa = XCRemoteSwiftPackageReference; 381 | repositoryURL = "https://github.com/sindresorhus/LaunchAtLogin"; 382 | requirement = { 383 | kind = upToNextMajorVersion; 384 | minimumVersion = 4.1.0; 385 | }; 386 | }; 387 | 422C413F2881574500F873F9 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */ = { 388 | isa = XCRemoteSwiftPackageReference; 389 | repositoryURL = "https://github.com/sindresorhus/LaunchAtLogin"; 390 | requirement = { 391 | branch = main; 392 | kind = branch; 393 | }; 394 | }; 395 | /* End XCRemoteSwiftPackageReference section */ 396 | 397 | /* Begin XCSwiftPackageProductDependency section */ 398 | 4219F2B026D1482A0074616A /* LaunchAtLogin */ = { 399 | isa = XCSwiftPackageProductDependency; 400 | package = 4219F2AF26D1482A0074616A /* XCRemoteSwiftPackageReference "LaunchAtLogin" */; 401 | productName = LaunchAtLogin; 402 | }; 403 | 422C41402881574500F873F9 /* LaunchAtLogin */ = { 404 | isa = XCSwiftPackageProductDependency; 405 | package = 422C413F2881574500F873F9 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */; 406 | productName = LaunchAtLogin; 407 | }; 408 | /* End XCSwiftPackageProductDependency section */ 409 | }; 410 | rootObject = AD988B781F1D23CB002C6B61 /* Project object */; 411 | } 412 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "launchatlogin", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/sindresorhus/LaunchAtLogin", 7 | "state" : { 8 | "branch" : "main", 9 | "revision" : "e8171b3e38a2816f579f58f3dac1522aa39efe41" 10 | } 11 | } 12 | ], 13 | "version" : 2 14 | } 15 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/xcuserdata/c5289575.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/xcuserdata/c5289575.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/xcuserdata/satrik.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/xcuserdata/satrik.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/xcuserdata/warrenburton.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl/wledQuickControl.xcodeproj/project.xcworkspace/xcuserdata/warrenburton.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/xcshareddata/xcschemes/wledQuickControl.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 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/xcuserdata/c5289575.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 21 | 22 | 23 | 25 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/xcuserdata/c5289575.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | wledQuickControl.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | AD988B7F1F1D23CB002C6B61 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/xcuserdata/satrik.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/xcuserdata/satrik.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Quotes.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/xcuserdata/warrenburton.xcuserdatad/xcschemes/Quotes.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 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl.xcodeproj/xcuserdata/warrenburton.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Quotes.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | AD988B7F1F1D23CB002C6B61 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // Author: Sascha Petrik 2 | 3 | import Cocoa 4 | 5 | @NSApplicationMain 6 | class AppDelegate: NSObject, NSApplicationDelegate { 7 | 8 | var mainView = MainViewController() 9 | var eventMonitor: EventMonitor? 10 | let statusItem = NSStatusBar.system.statusItem(withLength:NSStatusItem.variableLength) 11 | let popover = NSPopover() 12 | let menuIconOn = NSImage(named:"wled_on") 13 | let menuIconOff = NSImage(named:"wled_off") 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | 18 | if let button = statusItem.button { 19 | 20 | button.image = menuIconOn 21 | button.action = #selector(AppDelegate.togglePopover(_:)) 22 | button.sendAction(on: [.leftMouseUp, .rightMouseUp]) 23 | 24 | } 25 | 26 | popover.contentViewController = MainViewController.createController() 27 | 28 | eventMonitor = EventMonitor(mask: [.leftMouseDown, .rightMouseDown]) { [weak self] event in 29 | 30 | if let strongSelf = self, strongSelf.popover.isShown { 31 | 32 | strongSelf.closePopover(sender: event) 33 | 34 | } 35 | 36 | } 37 | 38 | } 39 | 40 | 41 | @objc func togglePopover(_ sender: Any?) { 42 | 43 | let event = NSApp.currentEvent! 44 | 45 | if event.type == NSEvent.EventType.rightMouseUp { 46 | 47 | if popover.isShown { 48 | 49 | closePopover(sender: sender) 50 | 51 | } else { 52 | 53 | showPopover(sender: sender) 54 | self.popover.contentViewController?.view.window?.becomeKey() 55 | 56 | } 57 | 58 | } else { 59 | 60 | if let button = self.statusItem.button { 61 | 62 | if(mainView.isKeyPresentInUserDefaults(key: "wledIp")){ 63 | 64 | if (button.image == menuIconOn){ 65 | 66 | button.image = menuIconOff 67 | mainView.postValues(sendOnOff: true, on: false, sendBri: false, bri: 0) 68 | 69 | } else { 70 | 71 | button.image = menuIconOn 72 | mainView.postValues(sendOnOff: true, on: true, sendBri: false, bri: 0) 73 | 74 | } 75 | 76 | } else { 77 | 78 | button.layer?.backgroundColor = CGColor(red: 0.75, green: 0, blue: 0 , alpha: 0.75) 79 | 80 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(800)) { 81 | 82 | button.layer?.backgroundColor = CGColor(red: 0, green: 0, blue: 0 , alpha: 0) 83 | 84 | } 85 | 86 | } 87 | 88 | } 89 | 90 | } 91 | 92 | } 93 | 94 | 95 | func showPopover(sender: Any?) { 96 | 97 | if let button = statusItem.button { 98 | 99 | popover.show(relativeTo: button.bounds, of: button, preferredEdge: NSRectEdge.minY) 100 | eventMonitor?.start() 101 | 102 | } 103 | 104 | } 105 | 106 | 107 | func closePopover(sender: Any?) { 108 | 109 | popover.performClose(sender) 110 | eventMonitor?.stop() 111 | 112 | } 113 | 114 | 115 | } 116 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "scale" : "1x", 6 | "size" : "16x16" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "scale" : "2x", 11 | "size" : "16x16" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "scale" : "1x", 16 | "size" : "32x32" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "scale" : "2x", 21 | "size" : "32x32" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "scale" : "1x", 26 | "size" : "128x128" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "scale" : "2x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "scale" : "1x", 36 | "size" : "256x256" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "scale" : "2x", 41 | "size" : "256x256" 42 | }, 43 | { 44 | "filename" : "icon.png", 45 | "idiom" : "mac", 46 | "scale" : "1x", 47 | "size" : "512x512" 48 | }, 49 | { 50 | "idiom" : "mac", 51 | "scale" : "2x", 52 | "size" : "512x512" 53 | } 54 | ], 55 | "info" : { 56 | "author" : "xcode", 57 | "version" : 1 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/AppIcon.appiconset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl/wledQuickControl/Assets.xcassets/AppIcon.appiconset/icon.png -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/github_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "github_icon.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/github_icon.imageset/github_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl/wledQuickControl/Assets.xcassets/github_icon.imageset/github_icon.png -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/wled_off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "wled_off.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/wled_off.imageset/wled_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl/wledQuickControl/Assets.xcassets/wled_off.imageset/wled_off.png -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/wled_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "wled_on.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Assets.xcassets/wled_on.imageset/wled_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satrik/wledQuickControl/cf0fe8060f03e2aeb9f234ca77b1753d4a0b8669/wledQuickControl/wledQuickControl/Assets.xcassets/wled_on.imageset/wled_on.png -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 139 | 150 | 161 | 162 | 163 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/EventMonitor.swift: -------------------------------------------------------------------------------- 1 | // Author: Sascha Petrik 2 | 3 | import Cocoa 4 | 5 | public class EventMonitor { 6 | 7 | private var monitor: Any? 8 | private let mask: NSEvent.EventTypeMask 9 | private let handler: (NSEvent?) -> Void 10 | 11 | 12 | public init(mask: NSEvent.EventTypeMask, handler: @escaping (NSEvent?) -> Void) { 13 | 14 | self.mask = mask 15 | self.handler = handler 16 | 17 | } 18 | 19 | 20 | deinit { 21 | 22 | stop() 23 | 24 | } 25 | 26 | 27 | public func start() { 28 | 29 | monitor = NSEvent.addGlobalMonitorForEvents(matching: mask, handler: handler) 30 | 31 | } 32 | 33 | 34 | public func stop() { 35 | 36 | if monitor != nil { 37 | 38 | NSEvent.removeMonitor(monitor!) 39 | monitor = nil 40 | 41 | } 42 | 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/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.productivity 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSAppTransportSecurity 30 | 31 | NSAllowsArbitraryLoads 32 | 33 | 34 | NSHumanReadableCopyright 35 | Copyright © 2022 Sascha Petrik 36 | NSMainStoryboardFile 37 | Main 38 | NSPrincipalClass 39 | NSApplication 40 | 41 | 42 | -------------------------------------------------------------------------------- /wledQuickControl/wledQuickControl/MainViewController.swift: -------------------------------------------------------------------------------- 1 | // Author: Sascha Petrik 2 | 3 | import Cocoa 4 | import LaunchAtLogin 5 | 6 | class MainViewController: NSViewController { 7 | 8 | @objc dynamic var launchAtLogin = LaunchAtLogin.kvo 9 | 10 | @IBOutlet var mainView: NSView! 11 | @IBOutlet weak var customViewDefault: NSView! 12 | @IBOutlet weak var customViewSettings: NSView! 13 | @IBOutlet weak var brightnessSlider: NSSlider! 14 | @IBOutlet weak var brightnessSliderLabel: NSTextField! 15 | @IBOutlet weak var settingsButton: NSButtonCell! 16 | @IBOutlet weak var textfieldWledHost: NSTextField! 17 | @IBOutlet weak var saveButton: NSButton! 18 | 19 | let defaults = UserDefaults.standard 20 | let appDelegate: AppDelegate? = NSApplication.shared.delegate as? AppDelegate 21 | 22 | var wledIp = "" 23 | 24 | override func viewDidLoad() { 25 | 26 | super.viewDidLoad() 27 | 28 | mainView.frame.size.width = 320 29 | brightnessSlider.isContinuous = true 30 | 31 | } 32 | 33 | 34 | override func viewDidAppear() { 35 | 36 | super.viewDidAppear() 37 | 38 | initViews() 39 | updateStates() 40 | 41 | } 42 | 43 | 44 | override func viewDidDisappear() { 45 | 46 | updateStates() 47 | 48 | } 49 | 50 | 51 | func initViews() { 52 | 53 | if(isKeyPresentInUserDefaults(key: "wledIp")){ 54 | 55 | wledIp = defaults.value(forKey: "wledIp") as! String 56 | 57 | } 58 | 59 | if(wledIp != ""){ 60 | 61 | textfieldWledHost.stringValue = wledIp 62 | brightnessSlider.isEnabled = true 63 | 64 | } else { 65 | 66 | brightnessSlider.isEnabled = false 67 | 68 | } 69 | 70 | customViewDefault.frame.origin.x = 0 71 | customViewSettings.frame.origin.x = -350 72 | settingsButton.controlView?.frame.origin.x = 0 73 | settingsButton.controlView?.toolTip = "Show config" 74 | settingsButton.image = NSImage(systemSymbolName: "gearshape", accessibilityDescription: nil)?.withSymbolConfiguration(NSImage.SymbolConfiguration.init(pointSize: 0, weight: .regular, scale: .large)) 75 | 76 | } 77 | 78 | 79 | func isKeyPresentInUserDefaults(key: String) -> Bool { 80 | 81 | return UserDefaults.standard.object(forKey: key) != nil 82 | 83 | } 84 | 85 | 86 | func moveView(position: CGFloat) { 87 | 88 | NSAnimationContext.runAnimationGroup({ context in 89 | 90 | context.duration = 1 91 | 92 | customViewDefault.animator().frame.origin.x = position 93 | customViewSettings.animator().frame.origin.x = position - 350 94 | settingsButton.controlView?.animator().frame.origin.x = position == 0 ? 0 : 270 95 | settingsButton.controlView?.toolTip = position == 0 ? "Show config" : "Go back" 96 | 97 | }){} 98 | 99 | } 100 | 101 | 102 | func postValues(sendOnOff: Bool, on: Bool, sendBri: Bool, bri: Int) { 103 | 104 | if(isKeyPresentInUserDefaults(key: "wledIp")){ 105 | 106 | wledIp = defaults.value(forKey: "wledIp") as! String 107 | 108 | let url = URL(string: "http://\(wledIp)/json/state")! 109 | var jsonData: Any = [] 110 | 111 | if(sendOnOff) { 112 | 113 | jsonData = ["on": on] 114 | 115 | } else if(sendBri) { 116 | 117 | jsonData = ["bri": round(Double(bri) * 2.55)] 118 | 119 | } 120 | 121 | let bodyData = try? JSONSerialization.data(withJSONObject: jsonData) 122 | 123 | var request = URLRequest(url: url) 124 | request.httpMethod = "POST" 125 | request.httpBody = bodyData 126 | request.addValue("application/json", forHTTPHeaderField: "Content-Type") 127 | request.addValue("application/json", forHTTPHeaderField: "Accept") 128 | 129 | URLSession.shared.dataTask(with: request) { _,_,_ in }.resume() 130 | 131 | } 132 | 133 | } 134 | 135 | 136 | func updateStates() { 137 | 138 | struct currentStates: Decodable { 139 | 140 | let on: Bool 141 | let bri: Int 142 | 143 | } 144 | 145 | if(isKeyPresentInUserDefaults(key: "wledIp")){ 146 | 147 | if let url = URL(string: "http://\(wledIp)/json/state") { 148 | 149 | URLSession.shared.dataTask(with: url) { data,_,_ in 150 | 151 | if let data = data { 152 | 153 | do { 154 | 155 | let res = try JSONDecoder().decode(currentStates.self, from: data) 156 | 157 | DispatchQueue.main.async { 158 | 159 | self.appDelegate?.statusItem.button?.image = res.on ? self.appDelegate?.menuIconOn : self.appDelegate?.menuIconOff 160 | let mappedBri = Int(round(Double(res.bri) / 2.55)) 161 | self.brightnessSliderLabel.stringValue = "\(mappedBri)%" 162 | self.brightnessSlider.integerValue = mappedBri 163 | 164 | } 165 | 166 | } catch _ { 167 | // no error handling currently -> maybe in a later version... 168 | } 169 | 170 | } 171 | 172 | }.resume() 173 | 174 | } 175 | 176 | } 177 | 178 | } 179 | 180 | 181 | 182 | @IBAction func clickOpenWled(_ sender: Any) { 183 | 184 | if(isKeyPresentInUserDefaults(key: "wledIp")){ 185 | 186 | wledIp = defaults.value(forKey: "wledIp") as! String 187 | 188 | let url = "http://\(wledIp)" 189 | NSWorkspace.shared.open(URL(string: url)!) 190 | 191 | } 192 | 193 | } 194 | 195 | 196 | @IBAction func clickOpenGithubRepo(_ sender: Any) { 197 | 198 | let url = "https://github.com/satrik/wledQuickControl" 199 | NSWorkspace.shared.open(URL(string: url)!) 200 | 201 | } 202 | 203 | 204 | @IBAction func clickSettingsBtn(_ sender: Any) { 205 | 206 | let pos = customViewDefault.frame.origin.x 207 | let moveTo = CGFloat(pos == 0 ? 350 : 0) 208 | let btnImage = (pos == 0 ? NSImage(systemSymbolName: "chevron.forward", accessibilityDescription: nil) : NSImage(systemSymbolName: "gearshape", accessibilityDescription: nil)) 209 | settingsButton.image = btnImage?.withSymbolConfiguration(NSImage.SymbolConfiguration.init(pointSize: 0, weight: .regular, scale: .large)) 210 | moveView(position: moveTo) 211 | textfieldWledHost.isEnabled = false 212 | textfieldWledHost.isEnabled = true 213 | 214 | } 215 | 216 | 217 | @IBAction func changeBrightnessSlider(_ sender: Any) { 218 | 219 | let event = NSApp.currentEvent! 220 | 221 | let val = brightnessSlider.integerValue 222 | 223 | switch event.type { 224 | 225 | case .leftMouseDragged, .rightMouseDragged: 226 | brightnessSliderLabel.stringValue = "\(val)%" 227 | case .leftMouseUp, .rightMouseUp: 228 | brightnessSliderLabel.stringValue = "\(val)%" 229 | postValues(sendOnOff: false, on: false, sendBri: true, bri: val) 230 | default: 231 | break 232 | 233 | } 234 | 235 | 236 | } 237 | 238 | 239 | @IBAction func clickedSaveButton(_ sender: Any) { 240 | 241 | defaults.set(textfieldWledHost.stringValue, forKey: "wledIp") 242 | 243 | saveButton.title = "" 244 | saveButton.image = NSImage(systemSymbolName: "checkmark.circle", accessibilityDescription: nil) 245 | 246 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(800)) { 247 | 248 | self.saveButton.image = nil 249 | self.saveButton.title = "Save" 250 | self.moveView(position: 0) 251 | 252 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(400)) { 253 | 254 | self.initViews() 255 | 256 | } 257 | 258 | } 259 | 260 | } 261 | 262 | 263 | @IBAction func clickedQuitButton(_ sender: Any) { 264 | 265 | NSApplication.shared.terminate(nil) 266 | 267 | } 268 | 269 | } 270 | 271 | 272 | extension MainViewController { 273 | 274 | static func createController() -> MainViewController { 275 | 276 | let storyboard = NSStoryboard(name: "Main", bundle: nil) 277 | let identifier = "MainViewController" 278 | 279 | guard let viewcontroller = storyboard.instantiateController(withIdentifier: identifier) as? MainViewController else { 280 | 281 | fatalError("Why cant i find MainViewController? - Check Main.storyboard") 282 | 283 | } 284 | 285 | return viewcontroller 286 | 287 | } 288 | 289 | } 290 | --------------------------------------------------------------------------------