├── .gitignore ├── Cartfile ├── Cartfile.resolved ├── Images └── Quickeys.png ├── LICENSE ├── Podfile ├── Podfile.lock ├── Quickeys.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── swiftpm │ └── Package.resolved ├── Quickeys.xcworkspace └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── swiftpm │ └── Package.resolved ├── Quickeys ├── AppDelegate.swift ├── Base.lproj │ └── MainMenu.xib ├── Bridging-Header.h ├── EventMonitor.swift ├── Notes Views and Controllers │ ├── NotesTextViewController.swift │ ├── NotesViewController.swift │ └── NotesViewController.xib ├── Pastebin │ ├── PastebinAPI.swift │ └── Reachability.swift ├── Resources │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── statusIcon.imageset │ │ │ ├── Contents.json │ │ │ └── statusIcon@2x.png │ ├── Funk.aiff │ ├── Info.plist │ └── Urls.plist └── Utility.swift └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | ## Build generated 2 | build/ 3 | DerivedData/ 4 | 5 | ## Various settings 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *xcworkspacedata 16 | 17 | ## Other 18 | *.moved-aside 19 | *.xccheckout 20 | *.xcscmblueprint 21 | .DS_STORE 22 | ApiKeys.plist 23 | 24 | ## Pods 25 | 26 | Pods* 27 | 28 | ## Carthage 29 | 30 | Carthage/ 31 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "sindresorhus/LaunchAtLogin" 2 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "sindresorhus/LaunchAtLogin" "v3.0.0" 2 | -------------------------------------------------------------------------------- /Images/Quickeys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexrosenfeld10/Quickeys/daf53028aa2f27862e1d6d19e202420458334fe7/Images/Quickeys.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, Alexander Rosenfeld 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | 8 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | 10 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'Quickeys' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | # Pods for Quickeys 9 | pod 'MASShortcut' 10 | end 11 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MASShortcut (2.4.0) 3 | 4 | DEPENDENCIES: 5 | - MASShortcut 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - MASShortcut 10 | 11 | SPEC CHECKSUMS: 12 | MASShortcut: d9e4909e878661cc42877cc9d6efbe638273ab57 13 | 14 | PODFILE CHECKSUM: 84873acf0087185828bdd6c8df8f5a6ca86cab5c 15 | 16 | COCOAPODS: 1.10.0 17 | -------------------------------------------------------------------------------- /Quickeys.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5B94628125204FBD00FF2278 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; productRef = 5B94628025204FBD00FF2278 /* SwiftPackageProductDependency */; }; 11 | EB16DA751E03472900CB7883 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = EB16DA741E03472900CB7883 /* LICENSE */; }; 12 | EB1AE14C1DFC586E00D3BE26 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB1AE1441DFC586E00D3BE26 /* AppDelegate.swift */; }; 13 | EB1AE14F1DFC586E00D3BE26 /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB1AE1471DFC586E00D3BE26 /* EventMonitor.swift */; }; 14 | EB1AE15E1DFC59D100D3BE26 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = EB1AE15C1DFC59D100D3BE26 /* MainMenu.xib */; }; 15 | EB27926A1DFDC07D00B92AFE /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = EB2792691DFDC07D00B92AFE /* README.md */; }; 16 | EB2959AC1E04F19B00F7B045 /* ApiKeys.plist in Resources */ = {isa = PBXBuildFile; fileRef = EBDFA9131E04ED1600C28385 /* ApiKeys.plist */; }; 17 | EB7944401E1D9D2000851B62 /* Urls.plist in Resources */ = {isa = PBXBuildFile; fileRef = EB79443F1E1D9D2000851B62 /* Urls.plist */; }; 18 | EB7944421E1D9F5D00851B62 /* Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB7944411E1D9F5D00851B62 /* Utility.swift */; }; 19 | EBDFA90B1E04ECF700C28385 /* PastebinAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBDFA9091E04ECF700C28385 /* PastebinAPI.swift */; }; 20 | EBDFA90C1E04ECF700C28385 /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBDFA90A1E04ECF700C28385 /* Reachability.swift */; }; 21 | EBDFA9101E04ED0A00C28385 /* NotesTextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBDFA90D1E04ED0A00C28385 /* NotesTextViewController.swift */; }; 22 | EBDFA9111E04ED0A00C28385 /* NotesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBDFA90E1E04ED0A00C28385 /* NotesViewController.swift */; }; 23 | EBDFA9121E04ED0A00C28385 /* NotesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EBDFA90F1E04ED0A00C28385 /* NotesViewController.xib */; }; 24 | EBDFA9181E04ED1600C28385 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EBDFA9141E04ED1600C28385 /* Assets.xcassets */; }; 25 | EBDFA9191E04ED1600C28385 /* Funk.aiff in Resources */ = {isa = PBXBuildFile; fileRef = EBDFA9151E04ED1600C28385 /* Funk.aiff */; }; 26 | F68A66674902918E60789A4F /* libPods-Quickeys.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3300B88882BF8A09B9DAD4E6 /* libPods-Quickeys.a */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXCopyFilesBuildPhase section */ 30 | EB97BA1E245D2DDC0002778F /* CopyFiles */ = { 31 | isa = PBXCopyFilesBuildPhase; 32 | buildActionMask = 2147483647; 33 | dstPath = ""; 34 | dstSubfolderSpec = 10; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 3300B88882BF8A09B9DAD4E6 /* libPods-Quickeys.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Quickeys.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 90DE795853D365A48256C3DA /* Pods-Quickeys.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Quickeys.release.xcconfig"; path = "Pods/Target Support Files/Pods-Quickeys/Pods-Quickeys.release.xcconfig"; sourceTree = ""; }; 44 | 9A1E950051398524EDACA9F2 /* Pods-Quickeys.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Quickeys.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Quickeys/Pods-Quickeys.debug.xcconfig"; sourceTree = ""; }; 45 | EB16DA741E03472900CB7883 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 46 | EB1AE1441DFC586E00D3BE26 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = Quickeys/AppDelegate.swift; sourceTree = SOURCE_ROOT; }; 47 | EB1AE1471DFC586E00D3BE26 /* EventMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = EventMonitor.swift; path = Quickeys/EventMonitor.swift; sourceTree = SOURCE_ROOT; }; 48 | EB1AE15D1DFC59D100D3BE26 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Quickeys/Base.lproj/MainMenu.xib; sourceTree = SOURCE_ROOT; }; 49 | EB2792691DFDC07D00B92AFE /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 50 | EB3A46F91E19D04300812099 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Bridging-Header.h"; path = "Quickeys/Bridging-Header.h"; sourceTree = SOURCE_ROOT; }; 51 | EB66DA651DF497B30009DEE2 /* Quickeys.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Quickeys.app; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | EB79443F1E1D9D2000851B62 /* Urls.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Urls.plist; path = Quickeys/Resources/Urls.plist; sourceTree = SOURCE_ROOT; }; 53 | EB7944411E1D9F5D00851B62 /* Utility.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Utility.swift; path = Quickeys/Utility.swift; sourceTree = SOURCE_ROOT; }; 54 | EBDFA9091E04ECF700C28385 /* PastebinAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PastebinAPI.swift; path = Quickeys/Pastebin/PastebinAPI.swift; sourceTree = SOURCE_ROOT; }; 55 | EBDFA90A1E04ECF700C28385 /* Reachability.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Reachability.swift; path = Quickeys/Pastebin/Reachability.swift; sourceTree = SOURCE_ROOT; }; 56 | EBDFA90D1E04ED0A00C28385 /* NotesTextViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NotesTextViewController.swift; path = "Quickeys/Notes Views and Controllers/NotesTextViewController.swift"; sourceTree = SOURCE_ROOT; }; 57 | EBDFA90E1E04ED0A00C28385 /* NotesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NotesViewController.swift; path = "Quickeys/Notes Views and Controllers/NotesViewController.swift"; sourceTree = SOURCE_ROOT; }; 58 | EBDFA90F1E04ED0A00C28385 /* NotesViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = NotesViewController.xib; path = "Quickeys/Notes Views and Controllers/NotesViewController.xib"; sourceTree = SOURCE_ROOT; }; 59 | EBDFA9131E04ED1600C28385 /* ApiKeys.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = ApiKeys.plist; path = Quickeys/Resources/ApiKeys.plist; sourceTree = SOURCE_ROOT; }; 60 | EBDFA9141E04ED1600C28385 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Quickeys/Resources/Assets.xcassets; sourceTree = SOURCE_ROOT; }; 61 | EBDFA9151E04ED1600C28385 /* Funk.aiff */ = {isa = PBXFileReference; lastKnownFileType = audio.aiff; name = Funk.aiff; path = Quickeys/Resources/Funk.aiff; sourceTree = SOURCE_ROOT; }; 62 | EBDFA9161E04ED1600C28385 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Quickeys/Resources/Info.plist; sourceTree = SOURCE_ROOT; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | EB66DA621DF497B30009DEE2 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | 5B94628125204FBD00FF2278 /* BuildFile in Frameworks */, 71 | F68A66674902918E60789A4F /* libPods-Quickeys.a in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 9EB7E517C1E91E6A16B3A620 /* Frameworks */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 3300B88882BF8A09B9DAD4E6 /* libPods-Quickeys.a */, 82 | ); 83 | name = Frameworks; 84 | sourceTree = ""; 85 | }; 86 | C671D5FF82BDD8E4CB6E151A /* Pods */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 9A1E950051398524EDACA9F2 /* Pods-Quickeys.debug.xcconfig */, 90 | 90DE795853D365A48256C3DA /* Pods-Quickeys.release.xcconfig */, 91 | ); 92 | name = Pods; 93 | sourceTree = ""; 94 | }; 95 | EB16DA761E03474500CB7883 /* Notes Views and Controllers */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | EBDFA90D1E04ED0A00C28385 /* NotesTextViewController.swift */, 99 | EBDFA90E1E04ED0A00C28385 /* NotesViewController.swift */, 100 | EBDFA90F1E04ED0A00C28385 /* NotesViewController.xib */, 101 | ); 102 | name = "Notes Views and Controllers"; 103 | sourceTree = ""; 104 | }; 105 | EB16DA771E03488A00CB7883 /* Resources */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | EBDFA9131E04ED1600C28385 /* ApiKeys.plist */, 109 | EBDFA9141E04ED1600C28385 /* Assets.xcassets */, 110 | EBDFA9151E04ED1600C28385 /* Funk.aiff */, 111 | EBDFA9161E04ED1600C28385 /* Info.plist */, 112 | EB79443F1E1D9D2000851B62 /* Urls.plist */, 113 | ); 114 | name = Resources; 115 | sourceTree = ""; 116 | }; 117 | EB66DA5C1DF497B30009DEE2 = { 118 | isa = PBXGroup; 119 | children = ( 120 | EB2792691DFDC07D00B92AFE /* README.md */, 121 | EB16DA741E03472900CB7883 /* LICENSE */, 122 | C671D5FF82BDD8E4CB6E151A /* Pods */, 123 | EB66DA671DF497B30009DEE2 /* Quickeys */, 124 | EB66DA661DF497B30009DEE2 /* Products */, 125 | 9EB7E517C1E91E6A16B3A620 /* Frameworks */, 126 | ); 127 | sourceTree = ""; 128 | }; 129 | EB66DA661DF497B30009DEE2 /* Products */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | EB66DA651DF497B30009DEE2 /* Quickeys.app */, 133 | ); 134 | name = Products; 135 | sourceTree = ""; 136 | }; 137 | EB66DA671DF497B30009DEE2 /* Quickeys */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | EB1AE15C1DFC59D100D3BE26 /* MainMenu.xib */, 141 | EB1AE1441DFC586E00D3BE26 /* AppDelegate.swift */, 142 | EB1AE1471DFC586E00D3BE26 /* EventMonitor.swift */, 143 | EB3A46F91E19D04300812099 /* Bridging-Header.h */, 144 | EB7944411E1D9F5D00851B62 /* Utility.swift */, 145 | EBDFA8FA1E04DAF900C28385 /* Pastebin */, 146 | EB16DA761E03474500CB7883 /* Notes Views and Controllers */, 147 | EB16DA771E03488A00CB7883 /* Resources */, 148 | ); 149 | name = Quickeys; 150 | path = Quotes; 151 | sourceTree = ""; 152 | }; 153 | EBDFA8FA1E04DAF900C28385 /* Pastebin */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | EBDFA9091E04ECF700C28385 /* PastebinAPI.swift */, 157 | EBDFA90A1E04ECF700C28385 /* Reachability.swift */, 158 | ); 159 | name = Pastebin; 160 | sourceTree = ""; 161 | }; 162 | /* End PBXGroup section */ 163 | 164 | /* Begin PBXNativeTarget section */ 165 | EB66DA641DF497B30009DEE2 /* Quickeys */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = EB66DA881DF497B40009DEE2 /* Build configuration list for PBXNativeTarget "Quickeys" */; 168 | buildPhases = ( 169 | 9149B34862435BDED8901DBD /* [CP] Check Pods Manifest.lock */, 170 | EB66DA611DF497B30009DEE2 /* Sources */, 171 | EB66DA621DF497B30009DEE2 /* Frameworks */, 172 | EB66DA631DF497B30009DEE2 /* Resources */, 173 | 2EE5DA6D3F3E0B2A6C3A65E7 /* [CP] Copy Pods Resources */, 174 | EB97BA1E245D2DDC0002778F /* CopyFiles */, 175 | 5B9462822520505200FF2278 /* ShellScript */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | ); 181 | name = Quickeys; 182 | packageProductDependencies = ( 183 | 5B94628025204FBD00FF2278 /* SwiftPackageProductDependency */, 184 | ); 185 | productName = Quotes; 186 | productReference = EB66DA651DF497B30009DEE2 /* Quickeys.app */; 187 | productType = "com.apple.product-type.application"; 188 | }; 189 | /* End PBXNativeTarget section */ 190 | 191 | /* Begin PBXProject section */ 192 | EB66DA5D1DF497B30009DEE2 /* Project object */ = { 193 | isa = PBXProject; 194 | attributes = { 195 | LastSwiftUpdateCheck = 0810; 196 | LastUpgradeCheck = 1200; 197 | ORGANIZATIONNAME = "Alex Rosenfeld"; 198 | TargetAttributes = { 199 | EB66DA641DF497B30009DEE2 = { 200 | CreatedOnToolsVersion = 8.1; 201 | LastSwiftMigration = 1130; 202 | ProvisioningStyle = Automatic; 203 | }; 204 | }; 205 | }; 206 | buildConfigurationList = EB66DA601DF497B30009DEE2 /* Build configuration list for PBXProject "Quickeys" */; 207 | compatibilityVersion = "Xcode 3.2"; 208 | developmentRegion = en; 209 | hasScannedForEncodings = 0; 210 | knownRegions = ( 211 | en, 212 | Base, 213 | ); 214 | mainGroup = EB66DA5C1DF497B30009DEE2; 215 | packageReferences = ( 216 | 5B94627F25204FBD00FF2278 /* RemoteSwiftPackageReference */, 217 | ); 218 | productRefGroup = EB66DA661DF497B30009DEE2 /* Products */; 219 | projectDirPath = ""; 220 | projectRoot = ""; 221 | targets = ( 222 | EB66DA641DF497B30009DEE2 /* Quickeys */, 223 | ); 224 | }; 225 | /* End PBXProject section */ 226 | 227 | /* Begin PBXResourcesBuildPhase section */ 228 | EB66DA631DF497B30009DEE2 /* Resources */ = { 229 | isa = PBXResourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | EB2959AC1E04F19B00F7B045 /* ApiKeys.plist in Resources */, 233 | EB1AE15E1DFC59D100D3BE26 /* MainMenu.xib in Resources */, 234 | EB7944401E1D9D2000851B62 /* Urls.plist in Resources */, 235 | EBDFA9181E04ED1600C28385 /* Assets.xcassets in Resources */, 236 | EBDFA9121E04ED0A00C28385 /* NotesViewController.xib in Resources */, 237 | EBDFA9191E04ED1600C28385 /* Funk.aiff in Resources */, 238 | EB27926A1DFDC07D00B92AFE /* README.md in Resources */, 239 | EB16DA751E03472900CB7883 /* LICENSE in Resources */, 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | }; 243 | /* End PBXResourcesBuildPhase section */ 244 | 245 | /* Begin PBXShellScriptBuildPhase section */ 246 | 2EE5DA6D3F3E0B2A6C3A65E7 /* [CP] Copy Pods Resources */ = { 247 | isa = PBXShellScriptBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | ); 251 | inputPaths = ( 252 | "${PODS_ROOT}/Target Support Files/Pods-Quickeys/Pods-Quickeys-resources.sh", 253 | "${PODS_CONFIGURATION_BUILD_DIR}/MASShortcut/MASShortcut.bundle", 254 | ); 255 | name = "[CP] Copy Pods Resources"; 256 | outputPaths = ( 257 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MASShortcut.bundle", 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | shellPath = /bin/sh; 261 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Quickeys/Pods-Quickeys-resources.sh\"\n"; 262 | showEnvVarsInLog = 0; 263 | }; 264 | 5B9462822520505200FF2278 /* ShellScript */ = { 265 | isa = PBXShellScriptBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | ); 269 | inputFileListPaths = ( 270 | ); 271 | inputPaths = ( 272 | ); 273 | outputFileListPaths = ( 274 | ); 275 | outputPaths = ( 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | shellPath = /bin/sh; 279 | shellScript = "\"${BUILT_PRODUCTS_DIR}/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/copy-helper-swiftpm.sh\"\n"; 280 | }; 281 | 9149B34862435BDED8901DBD /* [CP] Check Pods Manifest.lock */ = { 282 | isa = PBXShellScriptBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | ); 286 | inputPaths = ( 287 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 288 | "${PODS_ROOT}/Manifest.lock", 289 | ); 290 | name = "[CP] Check Pods Manifest.lock"; 291 | outputPaths = ( 292 | "$(DERIVED_FILE_DIR)/Pods-Quickeys-checkManifestLockResult.txt", 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | shellPath = /bin/sh; 296 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 297 | showEnvVarsInLog = 0; 298 | }; 299 | /* End PBXShellScriptBuildPhase section */ 300 | 301 | /* Begin PBXSourcesBuildPhase section */ 302 | EB66DA611DF497B30009DEE2 /* Sources */ = { 303 | isa = PBXSourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | EB7944421E1D9F5D00851B62 /* Utility.swift in Sources */, 307 | EBDFA9101E04ED0A00C28385 /* NotesTextViewController.swift in Sources */, 308 | EBDFA9111E04ED0A00C28385 /* NotesViewController.swift in Sources */, 309 | EBDFA90B1E04ECF700C28385 /* PastebinAPI.swift in Sources */, 310 | EB1AE14F1DFC586E00D3BE26 /* EventMonitor.swift in Sources */, 311 | EBDFA90C1E04ECF700C28385 /* Reachability.swift in Sources */, 312 | EB1AE14C1DFC586E00D3BE26 /* AppDelegate.swift in Sources */, 313 | ); 314 | runOnlyForDeploymentPostprocessing = 0; 315 | }; 316 | /* End PBXSourcesBuildPhase section */ 317 | 318 | /* Begin PBXVariantGroup section */ 319 | EB1AE15C1DFC59D100D3BE26 /* MainMenu.xib */ = { 320 | isa = PBXVariantGroup; 321 | children = ( 322 | EB1AE15D1DFC59D100D3BE26 /* Base */, 323 | ); 324 | name = MainMenu.xib; 325 | sourceTree = ""; 326 | }; 327 | /* End PBXVariantGroup section */ 328 | 329 | /* Begin XCBuildConfiguration section */ 330 | EB66DA861DF497B40009DEE2 /* Debug */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ALWAYS_SEARCH_USER_PATHS = NO; 334 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 335 | CLANG_ANALYZER_NONNULL = YES; 336 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 337 | CLANG_CXX_LIBRARY = "libc++"; 338 | CLANG_ENABLE_MODULES = YES; 339 | CLANG_ENABLE_OBJC_ARC = YES; 340 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 341 | CLANG_WARN_BOOL_CONVERSION = YES; 342 | CLANG_WARN_COMMA = YES; 343 | CLANG_WARN_CONSTANT_CONVERSION = YES; 344 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 345 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 346 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 357 | CLANG_WARN_STRICT_PROTOTYPES = YES; 358 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 359 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 360 | CLANG_WARN_UNREACHABLE_CODE = YES; 361 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 362 | CODE_SIGN_IDENTITY = "-"; 363 | COPY_PHASE_STRIP = NO; 364 | DEBUG_INFORMATION_FORMAT = dwarf; 365 | ENABLE_STRICT_OBJC_MSGSEND = YES; 366 | ENABLE_TESTABILITY = YES; 367 | FRAMEWORK_SEARCH_PATHS = ""; 368 | GCC_C_LANGUAGE_STANDARD = gnu99; 369 | GCC_DYNAMIC_NO_PIC = NO; 370 | GCC_NO_COMMON_BLOCKS = YES; 371 | GCC_OPTIMIZATION_LEVEL = 0; 372 | GCC_PREPROCESSOR_DEFINITIONS = ( 373 | "DEBUG=1", 374 | "$(inherited)", 375 | ); 376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 378 | GCC_WARN_UNDECLARED_SELECTOR = YES; 379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_VARIABLE = YES; 382 | MACOSX_DEPLOYMENT_TARGET = 10.12; 383 | MTL_ENABLE_DEBUG_INFO = YES; 384 | ONLY_ACTIVE_ARCH = YES; 385 | SDKROOT = macosx; 386 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 387 | SWIFT_OBJC_BRIDGING_HEADER = "Quickeys/Bridging-Header.h"; 388 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 389 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 390 | USER_HEADER_SEARCH_PATHS = "Pods/**"; 391 | }; 392 | name = Debug; 393 | }; 394 | EB66DA871DF497B40009DEE2 /* Release */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | ALWAYS_SEARCH_USER_PATHS = NO; 398 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 399 | CLANG_ANALYZER_NONNULL = YES; 400 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 401 | CLANG_CXX_LIBRARY = "libc++"; 402 | CLANG_ENABLE_MODULES = YES; 403 | CLANG_ENABLE_OBJC_ARC = YES; 404 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 405 | CLANG_WARN_BOOL_CONVERSION = YES; 406 | CLANG_WARN_COMMA = YES; 407 | CLANG_WARN_CONSTANT_CONVERSION = YES; 408 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 409 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 410 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 411 | CLANG_WARN_EMPTY_BODY = YES; 412 | CLANG_WARN_ENUM_CONVERSION = YES; 413 | CLANG_WARN_INFINITE_RECURSION = YES; 414 | CLANG_WARN_INT_CONVERSION = YES; 415 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 416 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 417 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 418 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 419 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 420 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 421 | CLANG_WARN_STRICT_PROTOTYPES = YES; 422 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 423 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 424 | CLANG_WARN_UNREACHABLE_CODE = YES; 425 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 426 | CODE_SIGN_IDENTITY = "-"; 427 | COPY_PHASE_STRIP = NO; 428 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 429 | ENABLE_NS_ASSERTIONS = NO; 430 | ENABLE_STRICT_OBJC_MSGSEND = YES; 431 | FRAMEWORK_SEARCH_PATHS = ""; 432 | GCC_C_LANGUAGE_STANDARD = gnu99; 433 | GCC_NO_COMMON_BLOCKS = YES; 434 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 435 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 436 | GCC_WARN_UNDECLARED_SELECTOR = YES; 437 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 438 | GCC_WARN_UNUSED_FUNCTION = YES; 439 | GCC_WARN_UNUSED_VARIABLE = YES; 440 | MACOSX_DEPLOYMENT_TARGET = 10.12; 441 | MTL_ENABLE_DEBUG_INFO = NO; 442 | SDKROOT = macosx; 443 | SWIFT_COMPILATION_MODE = wholemodule; 444 | SWIFT_OBJC_BRIDGING_HEADER = "Quickeys/Bridging-Header.h"; 445 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 446 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 447 | USER_HEADER_SEARCH_PATHS = "Pods/**"; 448 | }; 449 | name = Release; 450 | }; 451 | EB66DA891DF497B40009DEE2 /* Debug */ = { 452 | isa = XCBuildConfiguration; 453 | baseConfigurationReference = 9A1E950051398524EDACA9F2 /* Pods-Quickeys.debug.xcconfig */; 454 | buildSettings = { 455 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 456 | CODE_SIGN_IDENTITY = "-"; 457 | COMBINE_HIDPI_IMAGES = YES; 458 | FRAMEWORK_SEARCH_PATHS = ( 459 | "$(inherited)", 460 | "$(PROJECT_DIR)/Carthage/Build/Mac", 461 | ); 462 | INFOPLIST_FILE = "$(SRCROOT)/Quickeys/Resources/Info.plist"; 463 | LD_RUNPATH_SEARCH_PATHS = ( 464 | "$(inherited)", 465 | "@executable_path/../Frameworks", 466 | ); 467 | MACOSX_DEPLOYMENT_TARGET = 10.12; 468 | PRODUCT_BUNDLE_IDENTIFIER = alexrosenfeld.Quickeys; 469 | PRODUCT_NAME = "$(TARGET_NAME)"; 470 | SWIFT_OBJC_BRIDGING_HEADER = "Quickeys/Bridging-Header.h"; 471 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 472 | SWIFT_VERSION = 5.0; 473 | USER_HEADER_SEARCH_PATHS = "Pods/**"; 474 | }; 475 | name = Debug; 476 | }; 477 | EB66DA8A1DF497B40009DEE2 /* Release */ = { 478 | isa = XCBuildConfiguration; 479 | baseConfigurationReference = 90DE795853D365A48256C3DA /* Pods-Quickeys.release.xcconfig */; 480 | buildSettings = { 481 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 482 | CODE_SIGN_IDENTITY = "-"; 483 | COMBINE_HIDPI_IMAGES = YES; 484 | FRAMEWORK_SEARCH_PATHS = ( 485 | "$(inherited)", 486 | "$(PROJECT_DIR)/Carthage/Build/Mac", 487 | ); 488 | INFOPLIST_FILE = "$(SRCROOT)/Quickeys/Resources/Info.plist"; 489 | LD_RUNPATH_SEARCH_PATHS = ( 490 | "$(inherited)", 491 | "@executable_path/../Frameworks", 492 | ); 493 | MACOSX_DEPLOYMENT_TARGET = 10.12; 494 | PRODUCT_BUNDLE_IDENTIFIER = alexrosenfeld.Quickeys; 495 | PRODUCT_NAME = "$(TARGET_NAME)"; 496 | SWIFT_OBJC_BRIDGING_HEADER = "Quickeys/Bridging-Header.h"; 497 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 498 | SWIFT_VERSION = 5.0; 499 | USER_HEADER_SEARCH_PATHS = "Pods/**"; 500 | }; 501 | name = Release; 502 | }; 503 | /* End XCBuildConfiguration section */ 504 | 505 | /* Begin XCConfigurationList section */ 506 | EB66DA601DF497B30009DEE2 /* Build configuration list for PBXProject "Quickeys" */ = { 507 | isa = XCConfigurationList; 508 | buildConfigurations = ( 509 | EB66DA861DF497B40009DEE2 /* Debug */, 510 | EB66DA871DF497B40009DEE2 /* Release */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | EB66DA881DF497B40009DEE2 /* Build configuration list for PBXNativeTarget "Quickeys" */ = { 516 | isa = XCConfigurationList; 517 | buildConfigurations = ( 518 | EB66DA891DF497B40009DEE2 /* Debug */, 519 | EB66DA8A1DF497B40009DEE2 /* Release */, 520 | ); 521 | defaultConfigurationIsVisible = 0; 522 | defaultConfigurationName = Release; 523 | }; 524 | /* End XCConfigurationList section */ 525 | 526 | /* Begin XCRemoteSwiftPackageReference section */ 527 | 5B94627F25204FBD00FF2278 /* RemoteSwiftPackageReference */ = { 528 | isa = XCRemoteSwiftPackageReference; 529 | repositoryURL = "https://github.com/sindresorhus/LaunchAtLogin/"; 530 | requirement = { 531 | kind = upToNextMajorVersion; 532 | minimumVersion = 4.0.0; 533 | }; 534 | }; 535 | /* End XCRemoteSwiftPackageReference section */ 536 | 537 | /* Begin XCSwiftPackageProductDependency section */ 538 | 5B94628025204FBD00FF2278 /* SwiftPackageProductDependency */ = { 539 | isa = XCSwiftPackageProductDependency; 540 | package = 5B94627F25204FBD00FF2278 /* RemoteSwiftPackageReference */; 541 | productName = LaunchAtLogin; 542 | }; 543 | /* End XCSwiftPackageProductDependency section */ 544 | }; 545 | rootObject = EB66DA5D1DF497B30009DEE2 /* Project object */; 546 | } 547 | -------------------------------------------------------------------------------- /Quickeys.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Quickeys.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "LaunchAtLogin", 6 | "repositoryURL": "https://github.com/sindresorhus/LaunchAtLogin/", 7 | "state": { 8 | "branch": null, 9 | "revision": "0f39982b9d6993eef253b81219d3c39ba1e680f3", 10 | "version": "4.0.0" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /Quickeys.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Quickeys.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "LaunchAtLogin", 6 | "repositoryURL": "https://github.com/sindresorhus/LaunchAtLogin/", 7 | "state": { 8 | "branch": null, 9 | "revision": "0f39982b9d6993eef253b81219d3c39ba1e680f3", 10 | "version": "4.0.0" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /Quickeys/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Quickies 4 | // 5 | // Created by Alex Rosenfeld on 12/4/16. 6 | // Copyright © 2016 Alex Rosenfeld. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) 15 | let popover = NSPopover() 16 | 17 | var eventMonitor: EventMonitor? 18 | 19 | // Launch function 20 | 21 | func applicationDidFinishLaunching(_ aNotification: Notification) { 22 | NSApp.activate(ignoringOtherApps: true) 23 | 24 | if let button = statusItem.button { 25 | button.image = NSImage(named: "statusIcon") 26 | button.image?.isTemplate = true // best for dark mode 27 | button.action = #selector(AppDelegate.togglePopover(sender:)) 28 | } 29 | 30 | statusItem.highlightMode = false 31 | 32 | popover.contentViewController = NotesViewController(nibName: "NotesViewController", bundle: nil) 33 | popover.behavior = .transient 34 | 35 | eventMonitor = EventMonitor(mask: [NSEvent.EventTypeMask.leftMouseDown, NSEvent.EventTypeMask.rightMouseDown]) { [unowned self] event in 36 | if self.popover.isShown { 37 | self.closePopover(sender: event) 38 | } 39 | } 40 | eventMonitor?.start() 41 | 42 | let shortcut = MASShortcut.init(keyCode: kVK_ANSI_8, modifierFlags: NSEvent.ModifierFlags(rawValue: UInt(NSEvent.ModifierFlags.command.rawValue + NSEvent.ModifierFlags.shift.rawValue))) 43 | 44 | MASShortcutMonitor.shared().register(shortcut, withAction: { 45 | self.togglePopover(sender: self) 46 | }) 47 | } 48 | 49 | // Termination function 50 | 51 | func applicationWillTerminate(_ aNotification: Notification) { 52 | MASShortcutMonitor.shared().unregisterAllShortcuts() 53 | } 54 | 55 | 56 | // Helper functions 57 | 58 | @objc func togglePopover(sender: AnyObject?) { 59 | if popover.isShown { 60 | closePopover(sender: sender) 61 | } else { 62 | showPopover(sender: sender) 63 | } 64 | } 65 | 66 | func showPopover(sender: AnyObject?){ 67 | eventMonitor?.start() 68 | if let button = statusItem.button { 69 | popover.show(relativeTo: button.bounds, of: button, preferredEdge: NSRectEdge.minY) 70 | } 71 | } 72 | 73 | func closePopover(sender: AnyObject?) { 74 | popover.performClose(sender) 75 | eventMonitor?.stop() 76 | } 77 | 78 | } 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Quickeys/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | Default 481 | 482 | 483 | 484 | 485 | 486 | 487 | Left to Right 488 | 489 | 490 | 491 | 492 | 493 | 494 | Right to Left 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | Default 506 | 507 | 508 | 509 | 510 | 511 | 512 | Left to Right 513 | 514 | 515 | 516 | 517 | 518 | 519 | Right to Left 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | -------------------------------------------------------------------------------- /Quickeys/Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Bridging-Header.h 3 | // Quickeys 4 | // 5 | // Created by Alex Rosenfeld on 1/1/17. 6 | // Copyright © 2017 Alex Rosenfeld. All rights reserved. 7 | // 8 | 9 | #ifndef Bridging_Header_h 10 | #define Bridging_Header_h 11 | 12 | #import 13 | 14 | #endif /* Bridging_Header_h */ 15 | -------------------------------------------------------------------------------- /Quickeys/EventMonitor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EventMonitor.swift 3 | // Quotes 4 | // 5 | // Created by Alex Rosenfeld on 12/8/16. 6 | // Copyright © 2016 Alex Rosenfeld. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | public class EventMonitor { 12 | private var monitor: AnyObject? 13 | private let mask: NSEvent.EventTypeMask 14 | private let handler: (NSEvent?) -> () 15 | 16 | public init(mask: NSEvent.EventTypeMask, handler: @escaping (NSEvent?) -> ()) { 17 | self.mask = mask 18 | self.handler = handler 19 | } 20 | 21 | deinit { 22 | stop() 23 | } 24 | 25 | public func start() { 26 | monitor = NSEvent.addGlobalMonitorForEvents(matching: mask, handler: handler) as AnyObject? 27 | } 28 | 29 | public func stop() { 30 | if monitor != nil { 31 | NSEvent.removeMonitor(monitor!) 32 | monitor = nil 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Quickeys/Notes Views and Controllers/NotesTextViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotesTextViewController.swift 3 | // Quickeys 4 | // 5 | // Created by Alex Rosenfeld on 12/12/16. 6 | // Copyright © 2016 Alex Rosenfeld. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | protocol NotesTextViewControllerDelegate { 12 | func NotesTextViewiewControllerCommandEnterPressed() 13 | func NotesTextViewiewControllerAltOptionEnterPressed() 14 | } 15 | 16 | class NotesTextViewController: NSTextView { 17 | 18 | let appDelegate = NSApplication.shared.delegate as! AppDelegate 19 | var notesTextViewControllerDelegate: NotesTextViewControllerDelegate? 20 | 21 | override open func keyDown(with event: NSEvent) { 22 | if (event.keyCode == 53){ 23 | appDelegate.togglePopover(sender: nil) 24 | } else if (event.keyCode == 36 && event.modifierFlags.contains(NSEvent.ModifierFlags.command)) { 25 | NSLog("Command enter pressed") 26 | self.notesTextViewControllerDelegate?.NotesTextViewiewControllerCommandEnterPressed() 27 | } else if (event.keyCode == 36 && event.modifierFlags.contains(NSEvent.ModifierFlags.option)) { 28 | NSLog("alt/option enter pressed") 29 | self.notesTextViewControllerDelegate?.NotesTextViewiewControllerAltOptionEnterPressed() 30 | } else { 31 | super.keyDown(with: event) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Quickeys/Notes Views and Controllers/NotesViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotesViewController.swift 3 | // Quickies 4 | // 5 | // Created by Alex Rosenfeld on 12/8/16. 6 | // Copyright © 2016 Alex Rosenfeld. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import LaunchAtLogin 11 | 12 | // Notes View Controller class 13 | 14 | class NotesViewController: NSViewController, NotesTextViewControllerDelegate { 15 | 16 | // Lets and vars 17 | 18 | let pastebinAPI = PastebinAPI() 19 | 20 | let defaults = UserDefaults.standard 21 | var preferencesActive = false 22 | 23 | let FIXED_WIDTH = CGFloat(372) 24 | let MIN_HEIGHT = CGFloat(169) 25 | let MAX_HEIGHT = CGFloat(500) 26 | 27 | // Outlets 28 | 29 | @IBOutlet var inputText: NotesTextViewController! 30 | @IBOutlet weak var preferencesView: NSView! 31 | @IBOutlet weak var notesContainer: NSScrollView! 32 | 33 | @IBOutlet weak var searchButton: NSButton! 34 | @IBOutlet weak var searchTarget: NSPopUpButton! 35 | @IBOutlet weak var searchWithMenuButton: NSPopUpButton! 36 | @IBOutlet weak var searchWithMenu: NSMenu! 37 | 38 | @IBOutlet weak var pastebinButton: NSButton! 39 | @IBOutlet weak var pastebinProgressIndicator: NSProgressIndicator! 40 | 41 | @IBOutlet weak var runAtLoginButton: NSButton! 42 | 43 | // Overrides 44 | 45 | override func awakeFromNib() { 46 | inputText.notesTextViewControllerDelegate = self 47 | populateMenuItems() 48 | self.notesContainer.horizontalScrollElasticity = .none 49 | self.notesContainer.hasHorizontalScroller = false 50 | } 51 | 52 | override func viewDidLoad() { 53 | // Receive previous sessions data 54 | if let savedUserInputTextData = defaults.string(forKey: "userInputTextData") 55 | { 56 | inputText.insertText(savedUserInputTextData, replacementRange: inputText.rangeForUserTextChange) 57 | } 58 | 59 | runAtLoginButton.state = LaunchAtLogin.isEnabled ? .on : .off 60 | } 61 | 62 | override func viewDidDisappear() { 63 | // Save the user input data. This occurs on leaving the view or on closing the app. 64 | defaults.set(getAllTextFromView(), forKey: "userInputTextData") 65 | if let savedUserInputTextData = defaults.string(forKey: "userInputTextData") 66 | { 67 | NSLog("Saved " + savedUserInputTextData) 68 | } 69 | } 70 | 71 | override func mouseDragged(with theEvent: NSEvent) { 72 | let currentLocation = NSEvent.mouseLocation 73 | let screenFrame = NSScreen.main?.frame 74 | 75 | var newY = screenFrame!.size.height - currentLocation.y 76 | 77 | if newY < MIN_HEIGHT { 78 | newY = MIN_HEIGHT 79 | } 80 | 81 | if newY > MAX_HEIGHT { 82 | newY = MAX_HEIGHT 83 | } 84 | 85 | let appDelegate : AppDelegate = NSApplication.shared.delegate as! AppDelegate 86 | appDelegate.popover.contentSize = NSSize(width: FIXED_WIDTH, height: newY) 87 | } 88 | 89 | // Delegate functions 90 | 91 | func NotesTextViewiewControllerCommandEnterPressed() { 92 | searchClicked(self) 93 | } 94 | 95 | func NotesTextViewiewControllerAltOptionEnterPressed() { 96 | pastebinClicked(self) 97 | } 98 | 99 | // Functions 100 | 101 | func getAllTextFromView() -> String { 102 | return inputText.attributedString().string 103 | } 104 | 105 | func getHighlightedOrAllTextFromView() -> String { 106 | if let selectedText = inputText.attributedSubstring(forProposedRange: inputText.selectedRange(), actualRange: nil)?.string { 107 | return selectedText 108 | } else { 109 | return getAllTextFromView() 110 | } 111 | } 112 | 113 | func urlEscapeText(txt: String) -> String { 114 | let unreserved = "-._~/?" 115 | let allowed = NSMutableCharacterSet.alphanumeric() 116 | allowed.addCharacters(in: unreserved) 117 | return txt.addingPercentEncoding(withAllowedCharacters: allowed as CharacterSet)! 118 | } 119 | 120 | func searchTextOnWebsite(website: String) { 121 | // Set our destination url 122 | let urlText = urlEscapeText(txt: getHighlightedOrAllTextFromView()) 123 | 124 | if let url = URL(string: website + urlText), NSWorkspace.shared.open(url) { 125 | NSLog("browser opened successfully") 126 | } else { 127 | NSLog("browser failed to open") 128 | } 129 | } 130 | 131 | func populateMenuItems() { 132 | let lastSelectedItem = searchWithMenuButton.selectedItem 133 | 134 | searchWithMenu.removeAllItems() 135 | if let menuItems = Utility.arrayFromSource(from: "Urls") { 136 | for case let menuItem as NSDictionary in menuItems { 137 | if (menuItem.value(forKey: "isEnabled") as! Bool) { 138 | let title = menuItem.value(forKey: "site") as! String 139 | let newItem = NSMenuItem( 140 | title: title, 141 | action: nil, 142 | keyEquivalent: "") 143 | 144 | newItem.representedObject = menuItem.value(forKey: "url") 145 | 146 | searchWithMenu.addItem(newItem) 147 | } 148 | } 149 | } 150 | 151 | if let title = lastSelectedItem?.title, searchWithMenuButton.itemTitles.contains(title) { 152 | searchWithMenuButton.selectItem(withTitle: title) 153 | } 154 | else { 155 | searchWithMenuButton.selectItem(at: 0) 156 | } 157 | } 158 | 159 | func togglePreferencesView() { 160 | self.preferencesActive = !self.preferencesActive 161 | 162 | if (pastebinButton.title == "Pastebin") { 163 | pastebinButton.isEnabled = !pastebinButton.isEnabled 164 | } 165 | 166 | preferencesView.isHidden = !preferencesView.isHidden 167 | notesContainer.isHidden = !notesContainer.isHidden 168 | searchWithMenuButton.isEnabled = !searchWithMenuButton.isEnabled 169 | searchButton.isEnabled = !searchButton.isEnabled 170 | } 171 | } 172 | 173 | // Actions extension 174 | 175 | extension NotesViewController { 176 | // Actions 177 | 178 | @IBAction func quit(_ sender: NSButton) { 179 | NSApplication.shared.terminate(sender) 180 | } 181 | 182 | @IBAction func searchClicked(_ sender: AnyObject) { 183 | if let target = searchTarget.selectedItem { 184 | searchTextOnWebsite(website: (target.representedObject as! String)) 185 | } else { 186 | NSLog("No search targets in searchTarget menu") 187 | } 188 | } 189 | 190 | @IBAction func pastebinClicked(_ sender: AnyObject) { 191 | if Reachability.isInternetAvailable() { 192 | let text = getHighlightedOrAllTextFromView() 193 | if !text.trimmingCharacters(in: NSCharacterSet.whitespacesAndNewlines).isEmpty { 194 | 195 | self.pastebinButton.isEnabled = false 196 | self.pastebinButton.title = "" 197 | self.pastebinProgressIndicator.startAnimation(nil) 198 | 199 | pastebinAPI.postPasteRequest(urlEscapedContent: urlEscapeText(txt: text)) { pasteResponse in 200 | 201 | DispatchQueue.main.async { 202 | self.pastebinProgressIndicator.stopAnimation(nil) 203 | if pasteResponse.isEmpty { 204 | self.pastebinButton.title = "Error" 205 | } else { 206 | self.pastebinButton.title = "Copied!" 207 | } 208 | } 209 | 210 | DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2), execute: { 211 | self.pastebinButton.title = "Pastebin" 212 | if (!self.preferencesActive) { 213 | self.pastebinButton.isEnabled = true 214 | } 215 | }) 216 | } 217 | } else { 218 | Utility.playFunkSound() 219 | } 220 | } else { 221 | NSLog("No internet connection") 222 | Utility.playFunkSound() 223 | } 224 | } 225 | 226 | @IBAction func preferencesClicked(_ sender: Any) { 227 | togglePreferencesView() 228 | } 229 | 230 | @IBAction func runAtLoginClicked(_ sender: Any) { 231 | LaunchAtLogin.isEnabled = runAtLoginButton.state.rawValue == 1 232 | } 233 | } 234 | -------------------------------------------------------------------------------- /Quickeys/Notes Views and Controllers/NotesViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 62 | 66 | 67 | 81 | 91 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 172 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /Quickeys/Pastebin/PastebinAPI.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PastebinAPI.swift 3 | // Quickeys 4 | // 5 | // Created by Alex Rosenfeld on 12/14/16. 6 | // Copyright © 2016 Alex Rosenfeld. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Cocoa 11 | 12 | class PastebinAPI { 13 | 14 | var API_KEY = "" 15 | 16 | init() { 17 | API_KEY = Utility.valueForKey(from: "ApiKeys", named: "API_KEY")! 18 | } 19 | 20 | let url = NSURL(string: "http://pastebin.com/api/api_post.php") 21 | 22 | func postPasteRequest(urlEscapedContent: String, callback: @escaping (String) -> ()) { 23 | var request = URLRequest(url: URL(string: "http://pastebin.com/api/api_post.php")!) 24 | request.httpMethod = "POST" 25 | let postString = "api_paste_code=\(urlEscapedContent)&api_dev_key=\(API_KEY)&api_option=paste&api_paste_private=1&api_paste_expire_date=N" 26 | request.httpBody = postString.data(using: .utf8) 27 | let task = URLSession.shared.dataTask(with: request) { data, response, error in 28 | guard let data = data, error == nil 29 | // check for fundamental networking error 30 | else { 31 | NSLog("error=\(String(describing: error))") 32 | return 33 | } 34 | 35 | if let httpStatus = response as? HTTPURLResponse, httpStatus.statusCode != 200 { // check for http errors 36 | NSLog("statusCode should be 200, but is \(httpStatus.statusCode)") 37 | NSLog("response = \(String(describing: response))") 38 | } 39 | 40 | let responseString = String(data: data, encoding: .utf8) 41 | 42 | let pasteBoard = NSPasteboard.general 43 | if (responseString?.contains("pastebin.com"))! { 44 | NSLog(responseString!) 45 | pasteBoard.clearContents() 46 | pasteBoard.setString(responseString!, forType: NSPasteboard.PasteboardType.string) 47 | callback(responseString!) 48 | } else if (responseString?.contains("maximum"))! { 49 | Utility.playFunkSound() 50 | NSLog(responseString!) 51 | callback("") 52 | } else { 53 | Utility.playFunkSound() 54 | NSLog(responseString!) 55 | callback("") 56 | } 57 | } 58 | task.resume() 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Quickeys/Pastebin/Reachability.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Reachability.swift 3 | // Quickeys 4 | // 5 | // Created by Alex Rosenfeld on 12/16/16. 6 | // Copyright © 2016 Alex Rosenfeld. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SystemConfiguration 11 | 12 | public class Reachability { 13 | 14 | class func isInternetAvailable() -> Bool { 15 | var zeroAddress = sockaddr_in() 16 | zeroAddress.sin_len = UInt8(MemoryLayout.size) 17 | zeroAddress.sin_family = sa_family_t(AF_INET) 18 | 19 | guard let defaultRouteReachability = withUnsafePointer(to: &zeroAddress, { 20 | $0.withMemoryRebound(to: sockaddr.self, capacity: 1) { 21 | SCNetworkReachabilityCreateWithAddress(nil, $0) 22 | } 23 | }) else { 24 | return false 25 | } 26 | 27 | var flags: SCNetworkReachabilityFlags = [] 28 | if !SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags) { 29 | return false 30 | } 31 | 32 | let isReachable = flags.contains(.reachable) 33 | let needsConnection = flags.contains(.connectionRequired) 34 | 35 | return (isReachable && !needsConnection) 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /Quickeys/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Quickeys/Resources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Quickeys/Resources/Assets.xcassets/statusIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "mac", 9 | "filename" : "statusIcon@2x.png", 10 | "scale" : "2x" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | }, 17 | "properties" : { 18 | "template-rendering-intent" : "template" 19 | } 20 | } -------------------------------------------------------------------------------- /Quickeys/Resources/Assets.xcassets/statusIcon.imageset/statusIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexrosenfeld10/Quickeys/daf53028aa2f27862e1d6d19e202420458334fe7/Quickeys/Resources/Assets.xcassets/statusIcon.imageset/statusIcon@2x.png -------------------------------------------------------------------------------- /Quickeys/Resources/Funk.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexrosenfeld10/Quickeys/daf53028aa2f27862e1d6d19e202420458334fe7/Quickeys/Resources/Funk.aiff -------------------------------------------------------------------------------- /Quickeys/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.utilities 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSHumanReadableCopyright 30 | Copyright © 2016 Alex Rosenfeld. All rights reserved. 31 | NSMainNibFile 32 | MainMenu 33 | NSPrincipalClass 34 | NSApplication 35 | NSAppTransportSecurity 36 | 37 | NSExceptionDomains 38 | 39 | pastebin.com 40 | 41 | NSExceptionAllowsInsecureHTTPLoads 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Quickeys/Resources/Urls.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | site 7 | Google 8 | url 9 | https://www.google.com/search?q= 10 | isEnabled 11 | 12 | 13 | 14 | site 15 | Wolfram Alpha 16 | url 17 | https://www.wolframalpha.com/input/?i= 18 | isEnabled 19 | 20 | 21 | 22 | site 23 | Youtube 24 | url 25 | https://www.youtube.com/results?search_query= 26 | isEnabled 27 | 28 | 29 | 30 | site 31 | Google Maps 32 | url 33 | https://www.google.com/maps/search/ 34 | isEnabled 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Quickeys/Utility.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utility.swift 3 | // Quickeys 4 | // 5 | // Created by Alex Rosenfeld on 1/4/17. 6 | // Copyright © 2017 Alex Rosenfeld. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import AVFoundation 11 | 12 | public class Utility { 13 | 14 | static var player = AVAudioPlayer() 15 | 16 | class func arrayFromSource(from source: String) -> NSArray? { 17 | let filePath = Bundle.main.path(forResource: source, ofType: "plist") 18 | return NSArray(contentsOfFile:filePath!) 19 | } 20 | 21 | class func arrayAndPathFromSource(from source: String) -> (NSArray?, String?)? { 22 | let filePath = Bundle.main.path(forResource: source, ofType: "plist") 23 | return (NSArray(contentsOfFile:filePath!), filePath) 24 | } 25 | 26 | class func valueForKey(from source: String, named keyname:String) -> String? { 27 | let filePath = Bundle.main.path(forResource: source, ofType: "plist") 28 | let plist = NSDictionary(contentsOfFile:filePath!) 29 | let value = plist?.object(forKey: keyname) as! String 30 | return value 31 | } 32 | 33 | class func playFunkSound() { 34 | guard let url = Bundle.main.url(forResource: "Funk", withExtension: "aiff") 35 | else { 36 | NSLog("Unable to find Funk.aiff") 37 | return 38 | } 39 | 40 | do { 41 | player = try AVAudioPlayer(contentsOf: url) 42 | player.prepareToPlay() 43 | player.play() 44 | } catch let error { 45 | NSLog(error.localizedDescription) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Quickeys 2 | A mac menu bar app that provides note taking and other functionality through a quick dropdown window. Please download the most recent release and drag the zip file to your Applications folder. From there, double click the zip file to unpack the application. After doing so, you may delete the zip file. 3 | 4 | ## Building and running 5 | 6 | 1. Install `cocoapods` if you do not have it already. Run either `sudo gem install cocoapods` or `brew install cocoapods`, whichever you prefer. 7 | 1. Run `pod install` in the root of the cloned repository. 8 | 1. Open `Quickeys.xcworkspace` in Xcode and let it restore any Swift Package Manager dependencies. 9 | 1. Click the Play button (build and run the current scheme) in Xcode. 10 | 11 | Quickeys should now be running! 12 | 13 | ![Quickeys Screenshot](Images/Quickeys.png) 14 | 15 | ## Features 16 | Quickeys has a variety of smaller hidden features: 17 | 18 | * Press `cmd + shift + 8` to toggle the Quickeys window from anywhere on your computer 19 | * Press `cmd+enter` to search highlighted or all text on target 20 | * Press `alt/option + enter` to generate and copy a [pastebin](http://pastebin.com/) link of highlighted or all text 21 | * Click and drag anywhere outside of the text box and buttons to resize the window vertically 22 | * Autosaves your notes so they do not get lost if you quit the app. 23 | 24 | ## Contributing 25 | If you are looking to run or contribute to this project, you will need an ApiKeys.plist file for the pastebin functionality to work. The file should be placed in the Resources directory, and should contain a single key-value pair: 26 | 27 | ```xml 28 | 29 | 30 | 31 | 32 | API_KEY 33 | your-key-here 34 | 35 | 36 | ``` 37 | 38 | ### Pods 39 | This project uses [MASShortcut](https://github.com/shpakovski/MASShortcut). 40 | 41 | ### Carthage 42 | This project uses [LaunchAtLogin](https://github.com/sindresorhus/LaunchAtLogin). 43 | 44 | ## License 45 | This project is licensed under the BSD-3-Clause. 46 | The full license can be viewed [here](LICENSE). 47 | --------------------------------------------------------------------------------