├── GoBACKSPACE.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── PathToGo ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_128x128.png │ │ ├── icon_128x128@2x.png │ │ ├── icon_16x16.png │ │ ├── icon_16x16@2x.png │ │ ├── icon_256x256.png │ │ ├── icon_256x256@2x.png │ │ ├── icon_32x32.png │ │ ├── icon_32x32@2x.png │ │ ├── icon_512x512.png │ │ └── icon_512x512@2x.png ├── Base.lproj │ └── Main.storyboard ├── Info.plist ├── PathToGo.entitlements ├── ScriptService.swift ├── Scripts │ └── copyCurrentPath.scpt ├── ToastWindowController.swift ├── ToastWindowController.xib └── ViewController.swift └── README.md /GoBACKSPACE.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C03540B9202D357000D7C979 /* ToastWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C03540B7202D357000D7C979 /* ToastWindowController.swift */; }; 11 | C03540BA202D357000D7C979 /* ToastWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C03540B8202D357000D7C979 /* ToastWindowController.xib */; }; 12 | C06223462016CCE500724C4C /* ScriptService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06223452016CCE500724C4C /* ScriptService.swift */; }; 13 | C06223472016CD7F00724C4C /* copyCurrentPath.scpt in Resources */ = {isa = PBXBuildFile; fileRef = C06223442016CC7D00724C4C /* copyCurrentPath.scpt */; }; 14 | C062234A2016D81500724C4C /* ScriptingBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C06223492016D81500724C4C /* ScriptingBridge.framework */; }; 15 | C073AD5820165C5E0086C8F4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C073AD5720165C5E0086C8F4 /* AppDelegate.swift */; }; 16 | C073AD5C20165C5E0086C8F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C073AD5B20165C5E0086C8F4 /* Assets.xcassets */; }; 17 | C073AD5F20165C5E0086C8F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C073AD5D20165C5E0086C8F4 /* Main.storyboard */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXCopyFilesBuildPhase section */ 21 | C073AD7A20165D170086C8F4 /* Embed App Extensions */ = { 22 | isa = PBXCopyFilesBuildPhase; 23 | buildActionMask = 2147483647; 24 | dstPath = ""; 25 | dstSubfolderSpec = 13; 26 | files = ( 27 | ); 28 | name = "Embed App Extensions"; 29 | runOnlyForDeploymentPostprocessing = 0; 30 | }; 31 | /* End PBXCopyFilesBuildPhase section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | C03540B7202D357000D7C979 /* ToastWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastWindowController.swift; sourceTree = ""; }; 35 | C03540B8202D357000D7C979 /* ToastWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ToastWindowController.xib; sourceTree = ""; }; 36 | C06223442016CC7D00724C4C /* copyCurrentPath.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = copyCurrentPath.scpt; sourceTree = ""; }; 37 | C06223452016CCE500724C4C /* ScriptService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScriptService.swift; sourceTree = ""; }; 38 | C06223492016D81500724C4C /* ScriptingBridge.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScriptingBridge.framework; path = System/Library/Frameworks/ScriptingBridge.framework; sourceTree = SDKROOT; }; 39 | C073AD5420165C5E0086C8F4 /* GoBACKSPACE.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GoBACKSPACE.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | C073AD5720165C5E0086C8F4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 41 | C073AD5B20165C5E0086C8F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 42 | C073AD5E20165C5E0086C8F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 43 | C073AD6020165C5E0086C8F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | C09FDBF2202DF2140081ADB4 /* PathToGo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PathToGo.entitlements; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | C073AD5120165C5E0086C8F4 /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | C062234A2016D81500724C4C /* ScriptingBridge.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | C06223432016CBE700724C4C /* Scripts */ = { 60 | isa = PBXGroup; 61 | children = ( 62 | C06223442016CC7D00724C4C /* copyCurrentPath.scpt */, 63 | ); 64 | path = Scripts; 65 | sourceTree = ""; 66 | }; 67 | C06223482016D81400724C4C /* Frameworks */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | C06223492016D81500724C4C /* ScriptingBridge.framework */, 71 | ); 72 | name = Frameworks; 73 | sourceTree = ""; 74 | }; 75 | C073AD4B20165C5E0086C8F4 = { 76 | isa = PBXGroup; 77 | children = ( 78 | C073AD5620165C5E0086C8F4 /* PathToGo */, 79 | C073AD5520165C5E0086C8F4 /* Products */, 80 | C06223482016D81400724C4C /* Frameworks */, 81 | ); 82 | sourceTree = ""; 83 | }; 84 | C073AD5520165C5E0086C8F4 /* Products */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | C073AD5420165C5E0086C8F4 /* GoBACKSPACE.app */, 88 | ); 89 | name = Products; 90 | sourceTree = ""; 91 | }; 92 | C073AD5620165C5E0086C8F4 /* PathToGo */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | C09FDBF2202DF2140081ADB4 /* PathToGo.entitlements */, 96 | C06223432016CBE700724C4C /* Scripts */, 97 | C073AD5720165C5E0086C8F4 /* AppDelegate.swift */, 98 | C06223452016CCE500724C4C /* ScriptService.swift */, 99 | C03540B7202D357000D7C979 /* ToastWindowController.swift */, 100 | C03540B8202D357000D7C979 /* ToastWindowController.xib */, 101 | C073AD5B20165C5E0086C8F4 /* Assets.xcassets */, 102 | C073AD5D20165C5E0086C8F4 /* Main.storyboard */, 103 | C073AD6020165C5E0086C8F4 /* Info.plist */, 104 | ); 105 | path = PathToGo; 106 | sourceTree = ""; 107 | }; 108 | /* End PBXGroup section */ 109 | 110 | /* Begin PBXNativeTarget section */ 111 | C073AD5320165C5E0086C8F4 /* GoBACKSPACE */ = { 112 | isa = PBXNativeTarget; 113 | buildConfigurationList = C073AD6420165C5E0086C8F4 /* Build configuration list for PBXNativeTarget "GoBACKSPACE" */; 114 | buildPhases = ( 115 | C073AD5020165C5E0086C8F4 /* Sources */, 116 | C073AD5120165C5E0086C8F4 /* Frameworks */, 117 | C073AD5220165C5E0086C8F4 /* Resources */, 118 | C073AD7A20165D170086C8F4 /* Embed App Extensions */, 119 | ); 120 | buildRules = ( 121 | ); 122 | dependencies = ( 123 | ); 124 | name = GoBACKSPACE; 125 | productName = PathToGo; 126 | productReference = C073AD5420165C5E0086C8F4 /* GoBACKSPACE.app */; 127 | productType = "com.apple.product-type.application"; 128 | }; 129 | /* End PBXNativeTarget section */ 130 | 131 | /* Begin PBXProject section */ 132 | C073AD4C20165C5E0086C8F4 /* Project object */ = { 133 | isa = PBXProject; 134 | attributes = { 135 | LastSwiftUpdateCheck = 0920; 136 | LastUpgradeCheck = 0920; 137 | ORGANIZATIONNAME = HansonStudio; 138 | TargetAttributes = { 139 | C073AD5320165C5E0086C8F4 = { 140 | CreatedOnToolsVersion = 9.2; 141 | ProvisioningStyle = Automatic; 142 | SystemCapabilities = { 143 | com.apple.Sandbox = { 144 | enabled = 0; 145 | }; 146 | }; 147 | }; 148 | }; 149 | }; 150 | buildConfigurationList = C073AD4F20165C5E0086C8F4 /* Build configuration list for PBXProject "GoBACKSPACE" */; 151 | compatibilityVersion = "Xcode 8.0"; 152 | developmentRegion = en; 153 | hasScannedForEncodings = 0; 154 | knownRegions = ( 155 | en, 156 | Base, 157 | ); 158 | mainGroup = C073AD4B20165C5E0086C8F4; 159 | productRefGroup = C073AD5520165C5E0086C8F4 /* Products */; 160 | projectDirPath = ""; 161 | projectRoot = ""; 162 | targets = ( 163 | C073AD5320165C5E0086C8F4 /* GoBACKSPACE */, 164 | ); 165 | }; 166 | /* End PBXProject section */ 167 | 168 | /* Begin PBXResourcesBuildPhase section */ 169 | C073AD5220165C5E0086C8F4 /* Resources */ = { 170 | isa = PBXResourcesBuildPhase; 171 | buildActionMask = 2147483647; 172 | files = ( 173 | C073AD5C20165C5E0086C8F4 /* Assets.xcassets in Resources */, 174 | C03540BA202D357000D7C979 /* ToastWindowController.xib in Resources */, 175 | C073AD5F20165C5E0086C8F4 /* Main.storyboard in Resources */, 176 | C06223472016CD7F00724C4C /* copyCurrentPath.scpt in Resources */, 177 | ); 178 | runOnlyForDeploymentPostprocessing = 0; 179 | }; 180 | /* End PBXResourcesBuildPhase section */ 181 | 182 | /* Begin PBXSourcesBuildPhase section */ 183 | C073AD5020165C5E0086C8F4 /* Sources */ = { 184 | isa = PBXSourcesBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | C03540B9202D357000D7C979 /* ToastWindowController.swift in Sources */, 188 | C06223462016CCE500724C4C /* ScriptService.swift in Sources */, 189 | C073AD5820165C5E0086C8F4 /* AppDelegate.swift in Sources */, 190 | ); 191 | runOnlyForDeploymentPostprocessing = 0; 192 | }; 193 | /* End PBXSourcesBuildPhase section */ 194 | 195 | /* Begin PBXVariantGroup section */ 196 | C073AD5D20165C5E0086C8F4 /* Main.storyboard */ = { 197 | isa = PBXVariantGroup; 198 | children = ( 199 | C073AD5E20165C5E0086C8F4 /* Base */, 200 | ); 201 | name = Main.storyboard; 202 | sourceTree = ""; 203 | }; 204 | /* End PBXVariantGroup section */ 205 | 206 | /* Begin XCBuildConfiguration section */ 207 | C073AD6220165C5E0086C8F4 /* Debug */ = { 208 | isa = XCBuildConfiguration; 209 | buildSettings = { 210 | ALWAYS_SEARCH_USER_PATHS = NO; 211 | CLANG_ANALYZER_NONNULL = YES; 212 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 213 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 214 | CLANG_CXX_LIBRARY = "libc++"; 215 | CLANG_ENABLE_MODULES = YES; 216 | CLANG_ENABLE_OBJC_ARC = YES; 217 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 218 | CLANG_WARN_BOOL_CONVERSION = YES; 219 | CLANG_WARN_COMMA = YES; 220 | CLANG_WARN_CONSTANT_CONVERSION = YES; 221 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 222 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 223 | CLANG_WARN_EMPTY_BODY = YES; 224 | CLANG_WARN_ENUM_CONVERSION = YES; 225 | CLANG_WARN_INFINITE_RECURSION = YES; 226 | CLANG_WARN_INT_CONVERSION = YES; 227 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 228 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 229 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 230 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 231 | CLANG_WARN_STRICT_PROTOTYPES = YES; 232 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 233 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 234 | CLANG_WARN_UNREACHABLE_CODE = YES; 235 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 236 | CODE_SIGN_IDENTITY = "Mac Developer"; 237 | COPY_PHASE_STRIP = NO; 238 | DEBUG_INFORMATION_FORMAT = dwarf; 239 | ENABLE_STRICT_OBJC_MSGSEND = YES; 240 | ENABLE_TESTABILITY = YES; 241 | GCC_C_LANGUAGE_STANDARD = gnu11; 242 | GCC_DYNAMIC_NO_PIC = NO; 243 | GCC_NO_COMMON_BLOCKS = YES; 244 | GCC_OPTIMIZATION_LEVEL = 0; 245 | GCC_PREPROCESSOR_DEFINITIONS = ( 246 | "DEBUG=1", 247 | "$(inherited)", 248 | ); 249 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 250 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 251 | GCC_WARN_UNDECLARED_SELECTOR = YES; 252 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 253 | GCC_WARN_UNUSED_FUNCTION = YES; 254 | GCC_WARN_UNUSED_VARIABLE = YES; 255 | MACOSX_DEPLOYMENT_TARGET = 10.13; 256 | MTL_ENABLE_DEBUG_INFO = YES; 257 | ONLY_ACTIVE_ARCH = YES; 258 | SDKROOT = macosx; 259 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 260 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 261 | }; 262 | name = Debug; 263 | }; 264 | C073AD6320165C5E0086C8F4 /* Release */ = { 265 | isa = XCBuildConfiguration; 266 | buildSettings = { 267 | ALWAYS_SEARCH_USER_PATHS = NO; 268 | CLANG_ANALYZER_NONNULL = YES; 269 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 271 | CLANG_CXX_LIBRARY = "libc++"; 272 | CLANG_ENABLE_MODULES = YES; 273 | CLANG_ENABLE_OBJC_ARC = YES; 274 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 275 | CLANG_WARN_BOOL_CONVERSION = YES; 276 | CLANG_WARN_COMMA = YES; 277 | CLANG_WARN_CONSTANT_CONVERSION = YES; 278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 279 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 280 | CLANG_WARN_EMPTY_BODY = YES; 281 | CLANG_WARN_ENUM_CONVERSION = YES; 282 | CLANG_WARN_INFINITE_RECURSION = YES; 283 | CLANG_WARN_INT_CONVERSION = YES; 284 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 285 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 287 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 288 | CLANG_WARN_STRICT_PROTOTYPES = YES; 289 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 290 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 291 | CLANG_WARN_UNREACHABLE_CODE = YES; 292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 293 | CODE_SIGN_IDENTITY = "Mac Developer"; 294 | COPY_PHASE_STRIP = NO; 295 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 296 | ENABLE_NS_ASSERTIONS = NO; 297 | ENABLE_STRICT_OBJC_MSGSEND = YES; 298 | GCC_C_LANGUAGE_STANDARD = gnu11; 299 | GCC_NO_COMMON_BLOCKS = YES; 300 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 301 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 302 | GCC_WARN_UNDECLARED_SELECTOR = YES; 303 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 304 | GCC_WARN_UNUSED_FUNCTION = YES; 305 | GCC_WARN_UNUSED_VARIABLE = YES; 306 | MACOSX_DEPLOYMENT_TARGET = 10.13; 307 | MTL_ENABLE_DEBUG_INFO = NO; 308 | SDKROOT = macosx; 309 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 310 | }; 311 | name = Release; 312 | }; 313 | C073AD6520165C5E0086C8F4 /* Debug */ = { 314 | isa = XCBuildConfiguration; 315 | buildSettings = { 316 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 317 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 318 | CODE_SIGN_STYLE = Automatic; 319 | COMBINE_HIDPI_IMAGES = YES; 320 | DEVELOPMENT_TEAM = 2JY6F4ZP47; 321 | INFOPLIST_FILE = PathToGo/Info.plist; 322 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 323 | MACOSX_DEPLOYMENT_TARGET = 10.12; 324 | PRODUCT_BUNDLE_IDENTIFIER = zhihao.fudan.GoBACKSPACE; 325 | PRODUCT_NAME = "$(TARGET_NAME)"; 326 | SWIFT_VERSION = 4.0; 327 | }; 328 | name = Debug; 329 | }; 330 | C073AD6620165C5E0086C8F4 /* Release */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 334 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 335 | CODE_SIGN_STYLE = Automatic; 336 | COMBINE_HIDPI_IMAGES = YES; 337 | DEVELOPMENT_TEAM = 2JY6F4ZP47; 338 | INFOPLIST_FILE = PathToGo/Info.plist; 339 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 340 | MACOSX_DEPLOYMENT_TARGET = 10.12; 341 | PRODUCT_BUNDLE_IDENTIFIER = zhihao.fudan.GoBACKSPACE; 342 | PRODUCT_NAME = "$(TARGET_NAME)"; 343 | SWIFT_VERSION = 4.0; 344 | }; 345 | name = Release; 346 | }; 347 | /* End XCBuildConfiguration section */ 348 | 349 | /* Begin XCConfigurationList section */ 350 | C073AD4F20165C5E0086C8F4 /* Build configuration list for PBXProject "GoBACKSPACE" */ = { 351 | isa = XCConfigurationList; 352 | buildConfigurations = ( 353 | C073AD6220165C5E0086C8F4 /* Debug */, 354 | C073AD6320165C5E0086C8F4 /* Release */, 355 | ); 356 | defaultConfigurationIsVisible = 0; 357 | defaultConfigurationName = Release; 358 | }; 359 | C073AD6420165C5E0086C8F4 /* Build configuration list for PBXNativeTarget "GoBACKSPACE" */ = { 360 | isa = XCConfigurationList; 361 | buildConfigurations = ( 362 | C073AD6520165C5E0086C8F4 /* Debug */, 363 | C073AD6620165C5E0086C8F4 /* Release */, 364 | ); 365 | defaultConfigurationIsVisible = 0; 366 | defaultConfigurationName = Release; 367 | }; 368 | /* End XCConfigurationList section */ 369 | }; 370 | rootObject = C073AD4C20165C5E0086C8F4 /* Project object */; 371 | } 372 | -------------------------------------------------------------------------------- /GoBACKSPACE.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GoBACKSPACE.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PathToGo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // PathToGo 4 | // 5 | // Created by Hanson on 2018/4/13. 6 | // Copyright © 2018年 Chih-Hao. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | var toastWindowCtrl: ToastWindowController! 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | 18 | let pathString = ScriptService.copyCurrentFinderPath() 19 | 20 | if(pathString == "fail"){ 21 | makeToast("You have reached the top!") 22 | }else if(pathString == "OK"){ 23 | makeToast("GO BACKSPACE Succeed!") 24 | } 25 | 26 | } 27 | 28 | func applicationWillTerminate(_ aNotification: Notification) { 29 | // Insert code here to tear down your application 30 | } 31 | 32 | } 33 | 34 | extension AppDelegate { 35 | func makeToast(_ message: String) { 36 | if toastWindowCtrl != nil { 37 | toastWindowCtrl.close() 38 | } 39 | toastWindowCtrl = ToastWindowController(windowNibName: NSNib.Name(rawValue: "ToastWindowController")) 40 | toastWindowCtrl.message = message 41 | toastWindowCtrl.showWindow(self) 42 | toastWindowCtrl.fadeInHud() 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "icon_16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "icon_16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "icon_32x32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "icon_32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "icon_128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "icon_128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "icon_256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "icon_256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "icon_512x512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "icon_512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_128x128.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_16x16.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_256x256.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_32x32.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_512x512.png -------------------------------------------------------------------------------- /PathToGo/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhihaozhang/GoBACKSPACE/f853632d0b14d0632a8f9fadc1e6ab8603f1c40a/PathToGo/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /PathToGo/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 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | Default 532 | 533 | 534 | 535 | 536 | 537 | 538 | Left to Right 539 | 540 | 541 | 542 | 543 | 544 | 545 | Right to Left 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | Default 557 | 558 | 559 | 560 | 561 | 562 | 563 | Left to Right 564 | 565 | 566 | 567 | 568 | 569 | 570 | Right to Left 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 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | -------------------------------------------------------------------------------- /PathToGo/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 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.productivity 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSHumanReadableCopyright 30 | Copyright © 2018年 HansonStudio. All rights reserved. 31 | NSMainStoryboardFile 32 | Main 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /PathToGo/PathToGo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PathToGo/ScriptService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScriptService.swift 3 | // PathToGo 4 | // 5 | // Created by Hanson on 2018/4/13. 6 | // Copyright © 2018年 Chih-Hao. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | struct ScriptService { 12 | 13 | static func copyCurrentFinderPath() -> String { 14 | 15 | guard let scriptUrl = Bundle.main.path(forResource: "copyCurrentPath", ofType: "scpt"), 16 | let script = NSAppleScript(contentsOf: URL(fileURLWithPath: scriptUrl), error: nil) else { 17 | return "" 18 | } 19 | 20 | guard let pathString = script.executeAndReturnError(nil).stringValue else { 21 | return "" 22 | } 23 | 24 | return pathString 25 | 26 | // let pasteboard = NSPasteboard.general 27 | // pasteboard.declareTypes([.string], owner: nil) 28 | // pasteboard.setString(pathString, forType: .string) 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /PathToGo/Scripts/copyCurrentPath.scpt: -------------------------------------------------------------------------------- 1 | tell application "Finder" 2 | set currentPath to POSIX path of (target of window 1 as alias) 3 | set myArray to my theSplit(currentPath, "/") 4 | set lengthOfArray to the length of myArray 5 | set the_path to "" as string 6 | 7 | if lengthOfArray ≤ 3 then 8 | return "fail" 9 | else 10 | set lengthOfNewArray to (lengthOfArray - 2) 11 | set parentPath to items 2 through lengthOfNewArray of myArray 12 | 13 | repeat with anItem in parentPath 14 | set the_path to the_path & "/" & anItem 15 | end repeat 16 | set the_path to the_path & "/" 17 | -- go2Parent(the_path) 18 | set the_folder to (POSIX file the_path) as alias 19 | tell application "Finder" 20 | activate 21 | if window 1 exists then 22 | set target of window 1 to the_folder 23 | else 24 | reveal the_folder 25 | end if 26 | end tell 27 | 28 | return "OK" 29 | 30 | 31 | end if 32 | 33 | return myArray 34 | end tell 35 | 36 | 37 | 38 | 39 | on theSplit(theString, theDelimiter) 40 | -- save delimiters to restore old settings 41 | set oldDelimiters to AppleScript's text item delimiters 42 | -- set delimiters to delimiter to be used 43 | set AppleScript's text item delimiters to theDelimiter 44 | -- create the array 45 | set theArray to every text item of theString 46 | -- restore the old setting 47 | set AppleScript's text item delimiters to oldDelimiters 48 | -- return the result 49 | return theArray 50 | end theSplit 51 | -------------------------------------------------------------------------------- /PathToGo/ToastWindowController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToastWindowController.swift 3 | // PathToGo 4 | // 5 | // Created by Hanson on 2018/4/13. 6 | // Copyright © 2018年 Chih-Hao. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ToastWindowController: NSWindowController { 12 | 13 | @IBOutlet weak var panelView: NSView! 14 | @IBOutlet weak var titleTextField: NSTextField! 15 | 16 | var message: String = "" 17 | 18 | let kHudFadeInDuration: Double = 0.35 19 | let kHudFadeOutDuration: Double = 0.35 20 | let kHudDisplayDuration: Double = 1.2 21 | 22 | let kHudAlphaValue: CGFloat = 0.75 23 | let kHudCornerRadius: CGFloat = 18.0 24 | let kHudHorizontalMargin: CGFloat = 30 25 | let kHudHeight: CGFloat = 90.0 26 | 27 | var timerToFadeOut: Timer? = nil 28 | var fadingOut: Bool = false 29 | 30 | override func windowDidLoad() { 31 | super.windowDidLoad() 32 | 33 | self.shouldCascadeWindows = false 34 | 35 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. 36 | if let win = self.window { 37 | win.isOpaque = false 38 | win.backgroundColor = .clear 39 | win.styleMask = NSWindow.StyleMask.borderless 40 | win.hidesOnDeactivate = false 41 | win.collectionBehavior = NSWindow.CollectionBehavior.canJoinAllSpaces 42 | win.level = NSWindow.Level(rawValue: Int(CGWindowLevelForKey(.floatingWindow))) 43 | win.orderFrontRegardless() 44 | } 45 | 46 | let viewLayer: CALayer = CALayer() 47 | viewLayer.backgroundColor = CGColor.init(red: 0.05, green: 0.05, blue: 0.05, alpha: kHudAlphaValue) 48 | viewLayer.cornerRadius = kHudCornerRadius 49 | panelView.wantsLayer = true 50 | panelView.layer = viewLayer 51 | panelView.layer?.opacity = 0.0 52 | 53 | self.titleTextField.stringValue = self.message 54 | 55 | setupHud() 56 | } 57 | 58 | } 59 | 60 | extension ToastWindowController { 61 | 62 | func setupHud() -> Void { 63 | titleTextField.sizeToFit() 64 | 65 | var labelFrame: CGRect = titleTextField.frame 66 | var hudWindowFrame: CGRect = self.window!.frame 67 | hudWindowFrame.size.width = labelFrame.size.width + kHudHorizontalMargin * 2 68 | hudWindowFrame.size.height = kHudHeight 69 | 70 | let screenRect: NSRect = NSScreen.screens[0].visibleFrame 71 | hudWindowFrame.origin.x = (screenRect.size.width - hudWindowFrame.size.width) / 2 72 | hudWindowFrame.origin.y = (screenRect.size.height - hudWindowFrame.size.height) / 2 73 | self.window!.setFrame(hudWindowFrame, display: true) 74 | 75 | var viewFrame: NSRect = hudWindowFrame; 76 | viewFrame.origin.x = 0 77 | viewFrame.origin.y = 0 78 | panelView.frame = viewFrame 79 | 80 | labelFrame.origin.x = kHudHorizontalMargin 81 | labelFrame.origin.y = (hudWindowFrame.size.height - labelFrame.size.height) / 2 82 | titleTextField.frame = labelFrame 83 | } 84 | 85 | func fadeInHud() -> Void { 86 | if timerToFadeOut != nil { 87 | timerToFadeOut?.invalidate() 88 | timerToFadeOut = nil 89 | } 90 | 91 | fadingOut = false 92 | 93 | CATransaction.begin() 94 | CATransaction.setAnimationDuration(kHudFadeInDuration) 95 | CATransaction.setCompletionBlock { self.didFadeIn() } 96 | panelView.layer?.opacity = 1.0 97 | CATransaction.commit() 98 | } 99 | 100 | func didFadeIn() -> Void { 101 | timerToFadeOut = Timer.scheduledTimer( 102 | timeInterval: kHudDisplayDuration, 103 | target: self, 104 | selector: #selector(fadeOutHud), 105 | userInfo: nil, 106 | repeats: false) 107 | } 108 | 109 | @objc func fadeOutHud() -> Void { 110 | fadingOut = true 111 | 112 | CATransaction.begin() 113 | CATransaction.setAnimationDuration(kHudFadeOutDuration) 114 | CATransaction.setCompletionBlock { self.didFadeOut() } 115 | panelView.layer?.opacity = 0.0 116 | CATransaction.commit() 117 | } 118 | 119 | func didFadeOut() -> Void { 120 | if fadingOut { 121 | self.window?.orderOut(self) 122 | NSApplication.shared.terminate(self) 123 | } 124 | fadingOut = false 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /PathToGo/ToastWindowController.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 | -------------------------------------------------------------------------------- /PathToGo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // PathToGo 4 | // 5 | // Created by Hanson on 2018/1/23. 6 | // Copyright © 2018年 HansonStudio. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | var toastWindowCtrl: ToastWindowController! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | ScriptService.copyCurrentFinderPath() 19 | 20 | makeToast("Copy Path to ClipBoard Success") 21 | 22 | // 0.01 23 | DispatchQueue.main.asyncAfter(deadline: .now() + 3) { 24 | NSApplication.shared.terminate(self) 25 | } 26 | } 27 | 28 | override var representedObject: Any? { 29 | didSet { 30 | // Update the view, if already loaded. 31 | } 32 | } 33 | 34 | func makeToast(_ message: String) { 35 | if toastWindowCtrl != nil { 36 | toastWindowCtrl.close() 37 | } 38 | toastWindowCtrl = ToastWindowController(windowNibName: NSNib.Name(rawValue: "ToastWindowController")) 39 | toastWindowCtrl.message = message 40 | toastWindowCtrl.showWindow(self) 41 | //NSApp.activate(ignoringOtherApps: true) 42 | //toastWindowCtrl.window?.makeKeyAndOrderFront(self) 43 | toastWindowCtrl.fadeInHud() 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GoBACKSPACE 2 | 3 | GoBACKSPACE for mac是一款OS X 系统文件查看器**Finder**(中文译为访达)的增强插件,[百度网盘体验下载地址](https://pan.baidu.com/s/1EhGCUSVwVk1oXUCwbMfa5w)。 4 | 5 | ![](https://ws3.sinaimg.cn/large/006tKfTcly1fqfrpp97glj31kw0gigzs.jpg) 6 | 7 | 它的图标是一个指南针,愿景是帮您自由在Finder文件系統中自由切换。添加它到Finder工具栏的方法和**Go2Sehll**相同。 8 | 9 | [百度网盘下载地址](https://pan.baidu.com/s/1EhGCUSVwVk1oXUCwbMfa5w) 10 | 11 | 使用它,您可以在任意时刻返回当前目录的父级目录视图,**支持多Finder Tab**。每次成功返回到父级目录,均有toast信息提醒,返回最终的根目录后,也会有相应的提醒,以免给您造成困惑。 12 | 13 | 使用它的步骤有两步: 14 | + 步骤1:点击icon 15 | + 步骤2:**没有步骤2!!** 16 | 17 | 这是我本人一直想要的功能,如今终于做出来了。希望对大家的效率提升也有帮助! 18 | 19 | 最后,**向Go2Shell致敬**、庆祝Github诞生10周年。 20 | 21 | Demo GIF: 22 | 23 | ![App icon](https://ws3.sinaimg.cn/large/006tKfTcgy1fqfxcspvfig30go09lqv5.gif) 24 | 25 | 将GoBACKSPACE添加到Finder工具栏的方法: 26 | ![](https://ws1.sinaimg.cn/large/006tKfTcgy1fqfwji6347g30go0dekjm.gif) 27 | 28 | # License 29 | 30 | **MIT** 31 | 32 | # 致谢 33 | 本项目参考了Github上的另一个项目[PathToGO](https://github.com/HansonStudio/PathToGo),应用的icon参考来自[flaticon](https://www.flaticon.com),一并表示感谢。 34 | --------------------------------------------------------------------------------