├── Common ├── ActionsCoreData.swift ├── CoreDataStack.swift ├── DefaultActions.swift ├── FinderSyncCode.swift ├── GlobalVariables.swift ├── HelperFunctions.swift ├── Info.plist ├── Model.xcdatamodeld │ └── Model.xcdatamodel │ │ └── contents ├── Preferences.swift └── extensions.swift ├── FiScript.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── Morten.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── Morten.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── Archive.xcscheme │ ├── FiScript.xcscheme │ ├── FiScriptHelper.xcscheme │ ├── Finder Extension.xcscheme │ └── xcschememanagement.plist ├── FiScript.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── Morten.xcuserdatad │ ├── IDEFindNavigatorScopes.plist │ └── UserInterfaceState.xcuserstate ├── FiScript ├── 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 │ └── Contents.json ├── Base.lproj │ └── Main.storyboard ├── DevMateKit-Bridging-Header.h ├── FiScript.entitlements ├── GeneralViewController.swift ├── Info.plist ├── MenuViewController.swift ├── ModifyActionVC.swift └── dsa_pub.pem ├── FiScriptHelper ├── 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 ├── FiScriptHelper.entitlements └── Info.plist ├── Finder Extension ├── FinderSync.swift ├── Finder_Extension.entitlements └── Info.plist ├── Icons.xcassets ├── Atom.imageset │ ├── Atom.png │ ├── Atom@2x.png │ ├── Atom@3x.png │ └── Contents.json ├── Contents.json ├── CopyPath.imageset │ ├── Contents.json │ ├── Icon_16x16.png │ ├── Icon_16x16@2x.png │ └── Icon_16x16@3x.png ├── ExternalDrive.imageset │ ├── Contents.json │ ├── Icon_16x16.png │ ├── Icon_16x16@2x.png │ └── Icon_16x16@3x.png ├── FinderIcon.imageset │ ├── Contents.json │ ├── Icon_32x32.png │ ├── Icon_32x32@2x.png │ └── Icon_32x32@3x.png ├── ITerm.imageset │ ├── Contents.json │ ├── Icon_16x16.png │ ├── Icon_16x16@2x.png │ └── Icon_16x16@3x.png ├── MakeExecutable.imageset │ ├── Contents.json │ ├── MakeExecutable.png │ ├── MakeExecutable@2x.png │ └── MakeExecutable@3x.png ├── NewFile.imageset │ ├── Contents.json │ ├── Icon_16x16.png │ ├── Icon_16x16@2x.png │ └── Icon_16x16@3x.png ├── ResizeOSXIcons.imageset │ ├── Contents.json │ ├── Icon_16x16.png │ ├── Icon_16x16@2x.png │ └── Icon_16x16@3x.png ├── RunScript.imageset │ ├── Contents.json │ ├── RunScript.png │ ├── RunScript@2x.png │ └── RunScript@3x.png ├── Sublime3.imageset │ ├── Contents.json │ ├── Sublime3.png │ ├── Sublime3@2x.png │ └── Sublime3@3x.png ├── Terminal.imageset │ ├── Contents.json │ ├── Icon_16x16.png │ ├── Icon_16x16@2x.png │ └── Icon_16x16@3x.png └── VSCode.imageset │ ├── Contents.json │ ├── VSCode.png │ ├── VSCode@2x.png │ └── VSCode@3x.png ├── Images ├── landingNoText.png └── logo.png ├── LICENSE ├── Podfile ├── Podfile.lock ├── README.md └── fiscript.rb /Common/ActionsCoreData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Actions+CoreDataProperties.swift 3 | // FiScript 4 | // 5 | // Created by Mortennn on 01/12/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | // 9 | 10 | import Foundation 11 | import CoreData 12 | 13 | public class Actions: NSManagedObject { 14 | 15 | @nonobjc public class func createFetchRequest() -> NSFetchRequest { 16 | return NSFetchRequest(entityName: "Actions") 17 | } 18 | 19 | @nonobjc public class func DeleteAllActionsData(){ 20 | let managedContext = persistentContainer.viewContext 21 | let request = NSBatchDeleteRequest(fetchRequest: NSFetchRequest(entityName: "Actions")) 22 | 23 | do { 24 | try managedContext.execute(request) 25 | } 26 | catch { 27 | print(error) 28 | } 29 | } 30 | 31 | @NSManaged public var acceptedFileTypes: [String]? 32 | @NSManaged public var useOnFiles: Bool 33 | @NSManaged public var useOnDirectories: Bool 34 | @NSManaged public var actionDescription: String? 35 | @NSManaged public var confirmBeforeExecuting: Bool 36 | @NSManaged public var enabled: Bool 37 | @NSManaged public var getNotificationWhenExecusionHasFinished: Bool 38 | @NSManaged public var id: Int64 39 | @NSManaged public var imageData: NSData? 40 | @NSManaged public var index: Int64 41 | @NSManaged public var script: String! 42 | @NSManaged public var shell: String! 43 | @NSManaged public var title: String! 44 | 45 | } 46 | -------------------------------------------------------------------------------- /Common/CoreDataStack.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataExtensions.swift 3 | // Common 4 | // 5 | // Created by Mortennn on 24/11/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import CoreData 10 | 11 | // MARK: - Core Data stack 12 | public var managedObjectModel: NSManagedObjectModel = { 13 | let sexyFrameworkBundleIdentifier = GlobalVariables.commonBundleID.rawValue 14 | let customKitBundle = Bundle(identifier: sexyFrameworkBundleIdentifier)! 15 | let modelURL = customKitBundle.url(forResource: "Model", withExtension: "momd")! 16 | return NSManagedObjectModel(contentsOf: modelURL)! 17 | }() 18 | 19 | public var persistentContainer: NSPersistentContainer = { 20 | let container = NSPersistentContainer(name: "Model.xcdatamodeld", managedObjectModel: managedObjectModel) 21 | var persistentStoreDescriptions: NSPersistentStoreDescription 22 | let storeUrl = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "\(GlobalVariables.sharedContainerID).container")!.appendingPathComponent("DataModel.sqlite") 23 | 24 | let description = NSPersistentStoreDescription() 25 | description.shouldInferMappingModelAutomatically = true 26 | description.shouldMigrateStoreAutomatically = true 27 | description.url = storeUrl 28 | 29 | container.persistentStoreDescriptions = [NSPersistentStoreDescription(url: FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "\(GlobalVariables.sharedContainerID).container")!.appendingPathComponent("DataModel.sqlite"))] 30 | 31 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 32 | if let error = error { 33 | fatalError("Unresolved error \(error)") 34 | } 35 | }) 36 | return container 37 | }() 38 | -------------------------------------------------------------------------------- /Common/DefaultActions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Actions.swift 3 | // Common 4 | // 5 | // Created by Mortennn on 22/10/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | // TO ADD NEW ACTIONS 12 | // - increment countOfDefaultActions 13 | 14 | fileprivate struct DefaultAction { 15 | let imageName: String 16 | let acceptedFileTypes: [String] 17 | let useOnFiles: Bool 18 | let useOnDirectories: Bool 19 | let actionDescription: String 20 | let confirmBeforeExecuting: Bool 21 | let enabled: Bool 22 | let getNotificationWhenExecusionHasFinished: Bool 23 | let id: Int64 24 | let index: Int64 25 | let script: String 26 | let shell: String 27 | let title: String 28 | } 29 | 30 | public class DefaultActions { 31 | 32 | public static func saveDefaultActions() { 33 | DefaultActions.defaultActions.forEach { (defaultAction) in 34 | 35 | let context = persistentContainer.viewContext 36 | let action = NSEntityDescription.insertNewObject(forEntityName: "Actions", into: context) as! Actions 37 | 38 | guard let image = NSImage(named: NSImage.Name(rawValue: defaultAction.imageName)), 39 | let imageData = image.png else { 40 | fatalError("couldn't save images") 41 | } 42 | 43 | action.acceptedFileTypes = defaultAction.acceptedFileTypes 44 | action.useOnFiles = defaultAction.useOnFiles 45 | action.useOnDirectories = defaultAction.useOnDirectories 46 | action.actionDescription = defaultAction.actionDescription 47 | action.confirmBeforeExecuting = defaultAction.confirmBeforeExecuting 48 | action.enabled = defaultAction.enabled 49 | action.getNotificationWhenExecusionHasFinished = defaultAction.getNotificationWhenExecusionHasFinished 50 | action.imageData = imageData as NSData 51 | action.id = defaultAction.id 52 | action.index = defaultAction.index 53 | action.script = defaultAction.script 54 | action.shell = defaultAction.shell 55 | action.title = defaultAction.title 56 | 57 | do { 58 | try context.save() 59 | } catch { 60 | fatalError() 61 | } 62 | } 63 | } 64 | 65 | public static let numberOfDefaultActions:Int = { 66 | return DefaultActions.defaultActions.count 67 | }() 68 | 69 | fileprivate static let defaultActions = [ 70 | DefaultAction( 71 | imageName: "Terminal", 72 | acceptedFileTypes: ["*"], 73 | useOnFiles: false, 74 | useOnDirectories: true, 75 | actionDescription: "Opens a new Terminal window in the selected directory.", 76 | confirmBeforeExecuting: false, 77 | enabled: false, 78 | getNotificationWhenExecusionHasFinished: false, 79 | id: 0, 80 | index: 0, 81 | script: """ 82 | tell application "Terminal" 83 | if not (exists window 1) then reopen 84 | activate 85 | do script "cd " & $PATH & "; clear" in window 1 86 | end tell 87 | """, 88 | shell: "/usr/bin/env osascript", 89 | title: "Open Terminal Window" 90 | ), 91 | 92 | DefaultAction( 93 | imageName: "Terminal", 94 | acceptedFileTypes: [""], 95 | useOnFiles: false, 96 | useOnDirectories: true, 97 | actionDescription: """ 98 | Opens a new Terminal tab in the current directory. 99 | """, 100 | confirmBeforeExecuting: false, 101 | enabled: false, 102 | getNotificationWhenExecusionHasFinished: false, 103 | id: 1, 104 | index: 1, 105 | script: """ 106 | tell application "Terminal" 107 | if not (exists window 1) then reopen 108 | reopen 109 | activate 110 | delay 0.2 111 | tell application "System Events" to keystroke "t" using command down 112 | do script "cd " & $PATH & "; clear" in window 1 113 | end tell 114 | """, 115 | shell: "/usr/bin/env osascript", 116 | title: "Open Terminal Tab" 117 | ), 118 | 119 | DefaultAction( 120 | imageName: "ITerm", 121 | acceptedFileTypes: ["*"], 122 | useOnFiles: false, 123 | useOnDirectories: true, 124 | actionDescription: "Opens a new iTerm window in the selected directory.", 125 | confirmBeforeExecuting: false, 126 | enabled: false, 127 | getNotificationWhenExecusionHasFinished: false, 128 | id: 2, 129 | index: 2, 130 | script: """ 131 | if application "iTerm" is running then 132 | tell application "iTerm" 133 | create window with default profile 134 | activate 135 | tell the current window 136 | activate current session 137 | tell current session 138 | write text "cd " & quoted form of $PATH & "; clear" 139 | end tell 140 | end tell 141 | end tell 142 | else 143 | activate application "iTerm" 144 | tell application "iTerm" 145 | tell current window 146 | tell current session 147 | write text "cd " & quoted form of $PATH & "; clear" 148 | end tell 149 | end tell 150 | end tell 151 | end if 152 | """, 153 | shell: "/usr/bin/env osascript", 154 | title: "Open iTerm Window" 155 | ), 156 | 157 | DefaultAction( 158 | imageName: "ITerm", 159 | acceptedFileTypes: [""], 160 | useOnFiles: false, 161 | useOnDirectories: true, 162 | actionDescription: """ 163 | Opens a new iTerm tab in the current directory. 164 | """, 165 | confirmBeforeExecuting: false, 166 | enabled: false, 167 | getNotificationWhenExecusionHasFinished: false, 168 | id: 3, 169 | index: 3, 170 | script: """ 171 | tell application "iTerm" 172 | tell current window 173 | create tab with default profile 174 | activate 175 | tell the current tab 176 | activate current session 177 | launch session "Default Session" 178 | tell the last session 179 | write text "cd " & quoted form of $PATH & "; clear" 180 | end tell 181 | end tell 182 | end tell 183 | end tell 184 | """, 185 | shell: "/usr/bin/env osascript", 186 | title: "Open iTerm Tab" 187 | ), 188 | 189 | DefaultAction( 190 | imageName: "RunScript", 191 | acceptedFileTypes: ["sh"], 192 | useOnFiles: true, 193 | useOnDirectories: false, 194 | actionDescription: """ 195 | Makes the selected shell script executable and then runs it. 196 | """, 197 | confirmBeforeExecuting: false, 198 | enabled: false, 199 | getNotificationWhenExecusionHasFinished: false, 200 | id: 4, 201 | index: 4, 202 | script: """ 203 | chmod +x $PATH; 204 | sh $PATH; 205 | """, 206 | shell: "/bin/bash", 207 | title: "Run Script" 208 | ), 209 | 210 | DefaultAction( 211 | imageName: "CopyPath", 212 | acceptedFileTypes: ["*"], 213 | useOnFiles: true, 214 | useOnDirectories: true, 215 | actionDescription: "Copies the path of either the current directory or the selected file/directory.", 216 | confirmBeforeExecuting: false, 217 | enabled: false, 218 | getNotificationWhenExecusionHasFinished: false, 219 | id: 5, 220 | index: 5, 221 | script: """ 222 | export LANG="en_US.UTF-8"; echo -n $PATH | pbcopy 223 | """, 224 | shell: "/bin/bash", 225 | title: "Copy Path" 226 | ), 227 | 228 | DefaultAction( 229 | imageName: "NewFile", 230 | acceptedFileTypes: [""], 231 | useOnFiles: false, 232 | useOnDirectories: true, 233 | actionDescription: """ 234 | Creates a new file with the title "🤘emptyfile" (this positions the file at the top because of the emoji). You can then rename the file to the name you want and add an ending (e.g .docx or .html) to change the type of the file 235 | """, 236 | confirmBeforeExecuting: false, 237 | enabled: false, 238 | getNotificationWhenExecusionHasFinished: false, 239 | id: 6, 240 | index: 6, 241 | script: "touch 🤘emptyfile", 242 | shell: "/bin/bash", 243 | title: "New Empty File" 244 | ), 245 | 246 | DefaultAction( 247 | imageName: "ResizeOSXIcons", 248 | acceptedFileTypes: ["png"], 249 | useOnFiles: true, 250 | useOnDirectories: false, 251 | actionDescription: """ 252 | Converts an PNG image to OSX ready icons (16x16, 32x32, 128x128, 256x256, and 512x512). If the image isn't big enough to be downscaled, the converted image will be upscaled (this should be avoided). 253 | """, 254 | confirmBeforeExecuting: false, 255 | enabled: false, 256 | getNotificationWhenExecusionHasFinished: false, 257 | id: 7, 258 | index: 7, 259 | script: """ 260 | mkdir Icon.iconset 261 | cp $PATH Icon.iconset/Icon_512x512.png 262 | cp $PATH Icon.iconset/Icon_512x512@2x.png 263 | cp $PATH Icon.iconset/Icon_512x512@3x.png 264 | cp $PATH Icon.iconset/Icon_256x256.png 265 | cp $PATH Icon.iconset/Icon_256x256@2x.png 266 | cp $PATH Icon.iconset/Icon_256x256@3x.png 267 | cp $PATH Icon.iconset/Icon_128x128.png 268 | cp $PATH Icon.iconset/Icon_128x128@2x.png 269 | cp $PATH Icon.iconset/Icon_128x128@3x.png 270 | cp $PATH Icon.iconset/Icon_32x32.png 271 | cp $PATH Icon.iconset/Icon_32x32@2x.png 272 | cp $PATH Icon.iconset/Icon_32x32@3x.png 273 | cp $PATH Icon.iconset/Icon_16x16.png 274 | cp $PATH Icon.iconset/Icon_16x16@2x.png 275 | cp $PATH Icon.iconset/Icon_16x16@3x.png 276 | sips -Z 512 Icon.iconset/Icon_512x512.png 277 | sips -Z 1024 Icon.iconset/Icon_512x512@2x.png 278 | sips -Z 1536 Icon.iconset/Icon_512x512@3x.png 279 | sips -Z 256 Icon.iconset/Icon_256x256.png 280 | sips -Z 512 Icon.iconset/Icon_256x256@2x.png 281 | sips -Z 768 Icon.iconset/Icon_256x256@3x.png 282 | sips -Z 128 Icon.iconset/Icon_128x128.png 283 | sips -Z 256 Icon.iconset/Icon_128x128@2x.png 284 | sips -Z 384 Icon.iconset/Icon_128x128@3x.png 285 | sips -Z 32 Icon.iconset/Icon_32x32.png 286 | sips -Z 64 Icon.iconset/Icon_32x32@2x.png 287 | sips -Z 96 Icon.iconset/Icon_32x32@3x.png 288 | sips -Z 16 Icon.iconset/Icon_16x16.png 289 | sips -Z 32 Icon.iconset/Icon_16x16@2x.png 290 | sips -Z 48 Icon.iconset/Icon_16x16@3x.png 291 | """, 292 | shell: "/bin/bash", 293 | title: "Resize to macOS Icons" 294 | ), 295 | 296 | DefaultAction( 297 | imageName: "ResizeOSXIcons", 298 | acceptedFileTypes: ["png"], 299 | useOnFiles: true, 300 | useOnDirectories: false, 301 | actionDescription: """ 302 | Converts a PNG image to IOS ready icons (16x16, 32x32, 128x128, 256x256, and 512x512). If the image isn't big enough to be downscaled, the converted image will be upscaled (this should be avoided). 303 | """, 304 | confirmBeforeExecuting: false, 305 | enabled: false, 306 | getNotificationWhenExecusionHasFinished: false, 307 | id: 8, 308 | index: 8, 309 | script: """ 310 | mkdir Icon.iconset 311 | cp $PATH Icon.iconset/Icon_60x60@2x.png 312 | cp $PATH Icon.iconset/Icon_60x60@3x.png 313 | cp $PATH Icon.iconset/Icon_83.5x83.5@2x.png 314 | cp $PATH Icon.iconset/Icon_76x76@2x.png 315 | cp $PATH Icon.iconset/Icon_1024x1024@1x.png 316 | cp $PATH Icon.iconset/Icon_40x40@2x.png 317 | cp $PATH Icon.iconset/Icon_40x40@3x.png 318 | cp $PATH Icon.iconset/Icon_29x29@3x.png 319 | cp $PATH Icon.iconset/Icon_29x29@2x.png 320 | cp $PATH Icon.iconset/Icon_20x20@3x.png 321 | cp $PATH Icon.iconset/Icon_20x20@2x.png 322 | sips -Z 120 Icon.iconset/Icon_60x60@2x.png 323 | sips -Z 180 Icon.iconset/Icon_60x60@3x.png 324 | sips -Z 167 Icon.iconset/Icon_83.5x83.5@2x.png 325 | sips -Z 152 Icon.iconset/Icon_76x76@2x.png 326 | sips -Z 1024 Icon.iconset/Icon_1024x1024@1x.png 327 | sips -Z 120 Icon.iconset/Icon_40x40@2x.png 328 | sips -Z 80 Icon.iconset/Icon_40x40@3x.png 329 | sips -Z 87 Icon.iconset/Icon_29x29@3x.png 330 | sips -Z 58 Icon.iconset/Icon_29x29@2x.png 331 | sips -Z 60 Icon.iconset/Icon_20x20@3x.png 332 | sips -Z 40 Icon.iconset/Icon_20x20@2x.png 333 | """, 334 | shell: "/bin/bash", 335 | title: "Resize to iOS Icons" 336 | ), 337 | 338 | DefaultAction( 339 | imageName: "Sublime3", 340 | acceptedFileTypes: [""], 341 | useOnFiles: true, 342 | useOnDirectories: true, 343 | actionDescription: """ 344 | Opens the selected directory/file in Sublime Text. 345 | """, 346 | confirmBeforeExecuting: false, 347 | enabled: false, 348 | getNotificationWhenExecusionHasFinished: false, 349 | id: 9, 350 | index: 9, 351 | script: "/Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl $PATH", 352 | shell: "/bin/bash", 353 | title: "Open in Sublime Text" 354 | ), 355 | 356 | DefaultAction( 357 | imageName: "Atom", 358 | acceptedFileTypes: [""], 359 | useOnFiles: true, 360 | useOnDirectories: true, 361 | actionDescription: """ 362 | Opens the selected directory/file in Atom. 363 | """, 364 | confirmBeforeExecuting: false, 365 | enabled: false, 366 | getNotificationWhenExecusionHasFinished: false, 367 | id: 10, 368 | index: 10, 369 | script: "/Applications/Atom.app/Contents/MacOS/Atom $PATH", 370 | shell: "/bin/bash", 371 | title: "Open in Atom" 372 | ), 373 | 374 | DefaultAction( 375 | imageName: "VSCode", 376 | acceptedFileTypes: [""], 377 | useOnFiles: true, 378 | useOnDirectories: true, 379 | actionDescription: """ 380 | Opens the selected directory/file in VSCode. 381 | """, 382 | confirmBeforeExecuting: false, 383 | enabled: false, 384 | getNotificationWhenExecusionHasFinished: false, 385 | id: 11, 386 | index: 11, 387 | script: "/Applications/Visual\\ Studio\\ Code.app/Contents/Resources/app/bin/code $PATH", 388 | shell: "/bin/bash", 389 | title: "Open in VSCode" 390 | ) 391 | ] 392 | 393 | } 394 | -------------------------------------------------------------------------------- /Common/FinderSyncCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FinderSyncCode.swift 3 | // Common 4 | // 5 | // Created by Mortennn on 04/01/2018. 6 | // Copyright © 2018 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | public class FinderSyncCode { 12 | 13 | public static func getActionsToContextMenu(selectedItemsURL:[URL]) -> [Actions] { 14 | 15 | var actions:[Actions] = [] 16 | var actionsToBeAppendedToContextMenu:[Actions] = [] 17 | 18 | let context = persistentContainer.viewContext 19 | let request = Actions.createFetchRequest() 20 | request.returnsObjectsAsFaults = false 21 | 22 | do { 23 | actions = try context.fetch(request) 24 | } catch { 25 | fatalError() 26 | } 27 | 28 | var includesFiles = false 29 | var includesDirectories = false 30 | 31 | for url in selectedItemsURL { 32 | if url.isFile() { includesFiles = true } 33 | if url.isDirectory { includesDirectories = true } 34 | } 35 | 36 | // Filtering if the actions is enabled 37 | actions = actions.filter { $0.enabled } 38 | 39 | for action in actions { 40 | if ((action.useOnFiles == includesFiles) || action.useOnFiles) && 41 | ((action.useOnDirectories == includesDirectories) || action.useOnDirectories) { 42 | 43 | actionsToBeAppendedToContextMenu.append(action) 44 | } 45 | } 46 | 47 | // Checking if the actions is compatible with the type of the file 48 | for url in selectedItemsURL { 49 | for action in actionsToBeAppendedToContextMenu { 50 | if let acceptedFileTypes = action.acceptedFileTypes { 51 | if !acceptedFileTypes.contains("*") && !acceptedFileTypes.contains(url.pathExtension) && !acceptedFileTypes.isEmpty { 52 | if let index = actionsToBeAppendedToContextMenu.index(of: action) { 53 | actionsToBeAppendedToContextMenu.remove(at: index) 54 | } 55 | } 56 | } 57 | } 58 | } 59 | 60 | // Sorting actionsToBeAppendedToContextMenu by index 61 | actionsToBeAppendedToContextMenu = actionsToBeAppendedToContextMenu.sorted { $0.index < $1.index } 62 | 63 | return actionsToBeAppendedToContextMenu 64 | 65 | } 66 | 67 | } 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Common/GlobalVariables.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GlobalVariables.swift 3 | // Common 4 | // 5 | // Created by Mortennn on 26/12/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public enum GlobalVariables:String { 12 | case sharedContainerID = "group.Mortennn.FiScript" 13 | case commonBundleID = "com.Mortennn.Common" 14 | } 15 | -------------------------------------------------------------------------------- /Common/HelperFunctions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HelperFunctions.swift 3 | // Common 4 | // 5 | // Created by Mortennn on 21/04/2018. 6 | // Copyright © 2018 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | public class HelperFunctions { 12 | 13 | public static func launchHelperApplication() { 14 | 15 | // checking if the helper application is active 16 | 17 | let helperAppURL = URL(fileURLWithPath: "/Applications/FiScript.app/Contents/PlugIns/FiScriptHelper.app") 18 | 19 | let conf = [NSWorkspace.LaunchConfigurationKey:Any]() 20 | do { 21 | try NSWorkspace.shared.launchApplication(at: helperAppURL, options: NSWorkspace.LaunchOptions.withErrorPresentation, configuration: conf) 22 | } catch { 23 | #if !DEBUG 24 | if !FileManager.default.fileExists(atPath: helperAppURL.path) { 25 | // helper application doesn't exist at path 26 | let a = NSAlert() 27 | a.messageText = "Can't communicate with helper application." 28 | a.informativeText = "Check if Helper applications exists at \(helperAppURL.path) Helper application has been moved or deleted. Please move the helper application back or reinstall FiScript." 29 | a.addButton(withTitle: "OK") 30 | a.alertStyle = .critical 31 | a.runModal() 32 | } else { 33 | let a = NSAlert() 34 | a.messageText = "Helper Application Couldn't Launch" 35 | a.informativeText = "Helper application couldn't launch. Please try again." 36 | a.addButton(withTitle: "OK") 37 | a.alertStyle = .critical 38 | a.runModal() 39 | } 40 | #endif 41 | } 42 | 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /Common/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.1 19 | CFBundleVersion 20 | 1 21 | NSHumanReadableCopyright 22 | Copyright © 2018 Mortennn. All rights reserved. 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Common/Model.xcdatamodeld/Model.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Common/Preferences.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Preferences.swift 3 | // Common 4 | // 5 | // Created by Mortennn on 22/10/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | open class Preferences { 12 | 13 | public static let sharedInstance = Preferences() 14 | 15 | let preferences = UserDefaults(suiteName: GlobalVariables.sharedContainerID.rawValue)! 16 | 17 | init() { 18 | preferences.register(defaults: [ 19 | "HadFirstRun": false 20 | ]) 21 | } 22 | 23 | open var validLicense: Bool { 24 | get { return preferences.bool(forKey: "validLicense") } 25 | set { preferences.set(newValue, forKey: "validLicense") } 26 | } 27 | 28 | open var hadFirstRun: Bool { 29 | get { return preferences.bool(forKey: "HadFirstRun") } 30 | set { preferences.set(newValue, forKey: "HadFirstRun") } 31 | } 32 | 33 | open var pathsToAllowedDirectories:[URL] { 34 | get { 35 | var urls = [URL]() 36 | 37 | if let data = preferences.value(forKey: "PathsToAllowedDirectories") as? Data { 38 | if let urlsArray = NSKeyedUnarchiver.unarchiveObject(with: data) as? [URL] { 39 | urls = urlsArray 40 | } 41 | } 42 | 43 | return urls 44 | 45 | } 46 | set { 47 | let data = NSKeyedArchiver.archivedData(withRootObject: newValue) 48 | preferences.setValue(data, forKey: "PathsToAllowedDirectories") 49 | } 50 | } 51 | 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Common/extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // extensions.swift 3 | // Common 4 | // 5 | // Created by Mortennn on 04/11/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Cocoa 11 | 12 | public extension URL { 13 | var isDirectory: Bool { 14 | let values = try? resourceValues(forKeys: [.isDirectoryKey]) 15 | return values?.isDirectory ?? false 16 | } 17 | } 18 | 19 | public extension NSButton { 20 | public var isOn: Bool { 21 | if self.state == .on { 22 | return true 23 | } else { 24 | return false 25 | } 26 | } 27 | } 28 | 29 | public extension Bool { 30 | func stateValue() -> NSControl.StateValue { 31 | if self { 32 | return NSControl.StateValue.on 33 | } else { 34 | return NSControl.StateValue.off 35 | } 36 | } 37 | } 38 | 39 | public extension Int64 { 40 | public func toInt() -> Int { 41 | guard let newInt = Int(exactly: self) else { 42 | fatalError() 43 | } 44 | 45 | return newInt 46 | } 47 | } 48 | 49 | public extension URL { 50 | public func isFile() -> Bool { 51 | if self.absoluteString.last! != "/" { 52 | return true 53 | } else { 54 | return false 55 | } 56 | } 57 | } 58 | 59 | public extension NSBitmapImageRep { 60 | var png: Data? { 61 | return representation(using: .png, properties: [:]) 62 | } 63 | } 64 | 65 | public extension Data { 66 | var bitmap: NSBitmapImageRep? { 67 | return NSBitmapImageRep(data: self) 68 | } 69 | } 70 | 71 | public extension NSImage { 72 | var png: Data? { 73 | return tiffRepresentation?.bitmap?.png 74 | } 75 | } 76 | 77 | public extension NSImage { 78 | func resize(width: CGFloat, _ height: CGFloat) -> NSImage { 79 | let img = NSImage(size: CGSize(width:width, height:height)) 80 | 81 | img.lockFocus() 82 | let ctx = NSGraphicsContext.current 83 | ctx?.imageInterpolation = .high 84 | self.draw(in: NSMakeRect(0, 0, width, height), from: NSMakeRect(0, 0, size.width, size.height), operation: .copy, fraction: 1) 85 | img.unlockFocus() 86 | 87 | return img 88 | } 89 | } 90 | 91 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5A0405391FA116AE0006BB76 /* Icons.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5AADE2841F9CC75500583919 /* Icons.xcassets */; }; 11 | 5A04053A1FA116AF0006BB76 /* Icons.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5AADE2841F9CC75500583919 /* Icons.xcassets */; }; 12 | 5A0B6E761FA797B900C169E6 /* Common.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A12B37D1F9CAC3F0089A6D5 /* Common.framework */; }; 13 | 5A1141842072640E00F6DA0F /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 5A1141832072640E00F6DA0F /* dsa_pub.pem */; }; 14 | 5A12B3841F9CAC3F0089A6D5 /* Common.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A12B37D1F9CAC3F0089A6D5 /* Common.framework */; }; 15 | 5A12B3851F9CAC3F0089A6D5 /* Common.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5A12B37D1F9CAC3F0089A6D5 /* Common.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 5A12B38A1F9CAC4E0089A6D5 /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A12B3891F9CAC4E0089A6D5 /* Preferences.swift */; }; 17 | 5A1CEE541FFE90ED009D04EC /* FinderSyncCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A1CEE531FFE90ED009D04EC /* FinderSyncCode.swift */; }; 18 | 5A21BC411FA4FDE300C3145D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A21BC401FA4FDDA00C3145D /* Cocoa.framework */; }; 19 | 5A2AA1121FEFCED7009DE64C /* FiScriptHelper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5ADD8ACE1FE698F8003A3461 /* FiScriptHelper.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 20 | 5A2AA1141FEFE740009DE64C /* Common.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A12B37D1F9CAC3F0089A6D5 /* Common.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 21 | 5A5549C81FC87D9700BB4003 /* CoreDataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5549C71FC87D9700BB4003 /* CoreDataStack.swift */; }; 22 | 5A7C90C8208B7BEB00A1DFE1 /* HelperFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A7C90C7208B7BEB00A1DFE1 /* HelperFunctions.swift */; }; 23 | 5A9167E61FD52113009D40A8 /* ActionsCoreData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AA9C8071FD125C700ACFAD0 /* ActionsCoreData.swift */; }; 24 | 5AADE2831F9CAE6300583919 /* DefaultActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AADE2821F9CAE6300583919 /* DefaultActions.swift */; }; 25 | 5AB843D71FEFB6C500515F98 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5AB843D51FEFB6C500515F98 /* Main.storyboard */; }; 26 | 5ABBDD611F98B52A0032E38C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ABBDD601F98B52A0032E38C /* AppDelegate.swift */; }; 27 | 5ABBDD651F98B52A0032E38C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5ABBDD641F98B52A0032E38C /* Assets.xcassets */; }; 28 | 5ABBDD681F98B52A0032E38C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5ABBDD661F98B52A0032E38C /* Main.storyboard */; }; 29 | 5ABBDDCC1F98DE180032E38C /* FinderSync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ABBDDCB1F98DE180032E38C /* FinderSync.swift */; }; 30 | 5ABBDDD11F98DE180032E38C /* Finder Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 5ABBDDC91F98DE180032E38C /* Finder Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 31 | 5AC165FB1FF29DB90041E534 /* GlobalVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AC165FA1FF29DB90041E534 /* GlobalVariables.swift */; }; 32 | 5AD1877D1FC728D400E8ECA2 /* ModifyActionVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD1877C1FC728D400E8ECA2 /* ModifyActionVC.swift */; }; 33 | 5AD360881FA88BFE00315AB4 /* GeneralViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD360871FA88BFE00315AB4 /* GeneralViewController.swift */; }; 34 | 5AD3608C1FA88C2A00315AB4 /* MenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD3608B1FA88C2A00315AB4 /* MenuViewController.swift */; }; 35 | 5AD512B91FC7611F00781EE6 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 5AD512B71FC7611F00781EE6 /* Model.xcdatamodeld */; }; 36 | 5ADD8AD11FE698F8003A3461 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADD8AD01FE698F8003A3461 /* AppDelegate.swift */; }; 37 | 5ADD8AD51FE698F8003A3461 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5ADD8AD41FE698F8003A3461 /* Assets.xcassets */; }; 38 | 5ADD8ADE1FE6A7B5003A3461 /* Common.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A12B37D1F9CAC3F0089A6D5 /* Common.framework */; }; 39 | 5AFD0DA01FAE6E8E00C147A7 /* extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AFD0D9F1FAE6E8E00C147A7 /* extensions.swift */; }; 40 | 624D21629792ECE7AB3178FB /* Pods_FiScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4C4156535B085B105DBC150 /* Pods_FiScript.framework */; }; 41 | 73856FB2A9C1B8D77E0FA1FF /* Pods_Finder_Extension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A1A49C2FE0809A62202F8FC /* Pods_Finder_Extension.framework */; }; 42 | B91243DF66920C475FA45D3B /* Pods_FiScriptHelper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D63B4FE7392B4102C4617ED /* Pods_FiScriptHelper.framework */; }; 43 | /* End PBXBuildFile section */ 44 | 45 | /* Begin PBXContainerItemProxy section */ 46 | 5A12B3821F9CAC3F0089A6D5 /* PBXContainerItemProxy */ = { 47 | isa = PBXContainerItemProxy; 48 | containerPortal = 5ABBDD551F98B52A0032E38C /* Project object */; 49 | proxyType = 1; 50 | remoteGlobalIDString = 5A12B37C1F9CAC3F0089A6D5; 51 | remoteInfo = Common; 52 | }; 53 | 5ABBDDCF1F98DE180032E38C /* PBXContainerItemProxy */ = { 54 | isa = PBXContainerItemProxy; 55 | containerPortal = 5ABBDD551F98B52A0032E38C /* Project object */; 56 | proxyType = 1; 57 | remoteGlobalIDString = 5ABBDDC81F98DE180032E38C; 58 | remoteInfo = "Finder Extension"; 59 | }; 60 | /* End PBXContainerItemProxy section */ 61 | 62 | /* Begin PBXCopyFilesBuildPhase section */ 63 | 5A21BC3C1FA4FD6F00C3145D /* CopyFiles */ = { 64 | isa = PBXCopyFilesBuildPhase; 65 | buildActionMask = 8; 66 | dstPath = ""; 67 | dstSubfolderSpec = 13; 68 | files = ( 69 | 5A2AA1121FEFCED7009DE64C /* FiScriptHelper.app in CopyFiles */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 1; 72 | }; 73 | 5A2AA1131FEFE727009DE64C /* CopyFiles */ = { 74 | isa = PBXCopyFilesBuildPhase; 75 | buildActionMask = 2147483647; 76 | dstPath = ""; 77 | dstSubfolderSpec = 10; 78 | files = ( 79 | 5A2AA1141FEFE740009DE64C /* Common.framework in CopyFiles */, 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | 5A2F2C04200742E6005F90E8 /* CopyFiles */ = { 84 | isa = PBXCopyFilesBuildPhase; 85 | buildActionMask = 2147483647; 86 | dstPath = ""; 87 | dstSubfolderSpec = 10; 88 | files = ( 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | 5A925B5D206BE8EB0015CC0D /* Copy Frameworks */ = { 93 | isa = PBXCopyFilesBuildPhase; 94 | buildActionMask = 2147483647; 95 | dstPath = ""; 96 | dstSubfolderSpec = 10; 97 | files = ( 98 | ); 99 | name = "Copy Frameworks"; 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | 5ABBDDD51F98DE180032E38C /* Embed App Extensions */ = { 103 | isa = PBXCopyFilesBuildPhase; 104 | buildActionMask = 2147483647; 105 | dstPath = ""; 106 | dstSubfolderSpec = 13; 107 | files = ( 108 | 5ABBDDD11F98DE180032E38C /* Finder Extension.appex in Embed App Extensions */, 109 | ); 110 | name = "Embed App Extensions"; 111 | runOnlyForDeploymentPostprocessing = 0; 112 | }; 113 | 5ABBDDE81F9907B40032E38C /* Embed Frameworks */ = { 114 | isa = PBXCopyFilesBuildPhase; 115 | buildActionMask = 2147483647; 116 | dstPath = ""; 117 | dstSubfolderSpec = 10; 118 | files = ( 119 | 5A12B3851F9CAC3F0089A6D5 /* Common.framework in Embed Frameworks */, 120 | ); 121 | name = "Embed Frameworks"; 122 | runOnlyForDeploymentPostprocessing = 0; 123 | }; 124 | /* End PBXCopyFilesBuildPhase section */ 125 | 126 | /* Begin PBXFileReference section */ 127 | 00945887BCEED86A7E26193C /* Pods-Finder Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Finder Extension.release.xcconfig"; path = "Pods/Target Support Files/Pods-Finder Extension/Pods-Finder Extension.release.xcconfig"; sourceTree = ""; }; 128 | 2537A1440D9675CA3CDC3E5C /* Pods-Finder Extension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Finder Extension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Finder Extension/Pods-Finder Extension.debug.xcconfig"; sourceTree = ""; }; 129 | 259B3EE42237007C4BDBCBE4 /* Pods-FiScriptHelper.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FiScriptHelper.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FiScriptHelper/Pods-FiScriptHelper.debug.xcconfig"; sourceTree = ""; }; 130 | 35A96B1B3DF124C326934100 /* Pods-FiScript.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FiScript.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FiScript/Pods-FiScript.debug.xcconfig"; sourceTree = ""; }; 131 | 35C12F65CC2FD960000B533B /* Pods-FiScript.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FiScript.release.xcconfig"; path = "Pods/Target Support Files/Pods-FiScript/Pods-FiScript.release.xcconfig"; sourceTree = ""; }; 132 | 3D63B4FE7392B4102C4617ED /* Pods_FiScriptHelper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FiScriptHelper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 133 | 5A012D7C209DD6AC005B8882 /* DevMateKit-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DevMateKit-Bridging-Header.h"; sourceTree = ""; }; 134 | 5A1141832072640E00F6DA0F /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dsa_pub.pem; sourceTree = ""; }; 135 | 5A12B37D1F9CAC3F0089A6D5 /* Common.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Common.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 136 | 5A12B3801F9CAC3F0089A6D5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 137 | 5A12B3891F9CAC4E0089A6D5 /* Preferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = ""; }; 138 | 5A1CEE531FFE90ED009D04EC /* FinderSyncCode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinderSyncCode.swift; sourceTree = ""; }; 139 | 5A21BC401FA4FDDA00C3145D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 140 | 5A5549C71FC87D9700BB4003 /* CoreDataStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreDataStack.swift; sourceTree = ""; }; 141 | 5A7C90C7208B7BEB00A1DFE1 /* HelperFunctions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelperFunctions.swift; sourceTree = ""; }; 142 | 5AA9C8071FD125C700ACFAD0 /* ActionsCoreData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionsCoreData.swift; sourceTree = ""; }; 143 | 5AADE2821F9CAE6300583919 /* DefaultActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultActions.swift; sourceTree = ""; }; 144 | 5AADE2841F9CC75500583919 /* Icons.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Icons.xcassets; sourceTree = ""; }; 145 | 5AB843D61FEFB6C500515F98 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 146 | 5ABBDD5D1F98B52A0032E38C /* FiScript.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FiScript.app; sourceTree = BUILT_PRODUCTS_DIR; }; 147 | 5ABBDD601F98B52A0032E38C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 148 | 5ABBDD641F98B52A0032E38C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 149 | 5ABBDD671F98B52A0032E38C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 150 | 5ABBDD691F98B52A0032E38C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 151 | 5ABBDD6A1F98B52A0032E38C /* FiScript.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FiScript.entitlements; sourceTree = ""; }; 152 | 5ABBDDC91F98DE180032E38C /* Finder Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Finder Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 153 | 5ABBDDCB1F98DE180032E38C /* FinderSync.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinderSync.swift; sourceTree = ""; }; 154 | 5ABBDDCD1F98DE180032E38C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 155 | 5ABBDDCE1F98DE180032E38C /* Finder_Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Finder_Extension.entitlements; sourceTree = ""; }; 156 | 5AC165FA1FF29DB90041E534 /* GlobalVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalVariables.swift; sourceTree = ""; }; 157 | 5AD1877C1FC728D400E8ECA2 /* ModifyActionVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyActionVC.swift; sourceTree = ""; }; 158 | 5AD360871FA88BFE00315AB4 /* GeneralViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralViewController.swift; sourceTree = ""; }; 159 | 5AD3608B1FA88C2A00315AB4 /* MenuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuViewController.swift; sourceTree = ""; }; 160 | 5AD512B81FC7611F00781EE6 /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = ""; }; 161 | 5ADD8ACE1FE698F8003A3461 /* FiScriptHelper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FiScriptHelper.app; sourceTree = BUILT_PRODUCTS_DIR; }; 162 | 5ADD8AD01FE698F8003A3461 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 163 | 5ADD8AD41FE698F8003A3461 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 164 | 5ADD8AD91FE698F8003A3461 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 165 | 5ADD8ADA1FE698F8003A3461 /* FiScriptHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FiScriptHelper.entitlements; sourceTree = ""; }; 166 | 5AFD0D9F1FAE6E8E00C147A7 /* extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = extensions.swift; sourceTree = ""; }; 167 | 8A1A49C2FE0809A62202F8FC /* Pods_Finder_Extension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Finder_Extension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 168 | C3584D76BE676015DC20FC14 /* Pods-FiScriptHelper.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FiScriptHelper.release.xcconfig"; path = "Pods/Target Support Files/Pods-FiScriptHelper/Pods-FiScriptHelper.release.xcconfig"; sourceTree = ""; }; 169 | C4C4156535B085B105DBC150 /* Pods_FiScript.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FiScript.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 170 | /* End PBXFileReference section */ 171 | 172 | /* Begin PBXFrameworksBuildPhase section */ 173 | 5A12B3791F9CAC3F0089A6D5 /* Frameworks */ = { 174 | isa = PBXFrameworksBuildPhase; 175 | buildActionMask = 2147483647; 176 | files = ( 177 | ); 178 | runOnlyForDeploymentPostprocessing = 0; 179 | }; 180 | 5ABBDD5A1F98B52A0032E38C /* Frameworks */ = { 181 | isa = PBXFrameworksBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | 5A21BC411FA4FDE300C3145D /* Cocoa.framework in Frameworks */, 185 | 5A12B3841F9CAC3F0089A6D5 /* Common.framework in Frameworks */, 186 | 624D21629792ECE7AB3178FB /* Pods_FiScript.framework in Frameworks */, 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | }; 190 | 5ABBDDC61F98DE180032E38C /* Frameworks */ = { 191 | isa = PBXFrameworksBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | 5A0B6E761FA797B900C169E6 /* Common.framework in Frameworks */, 195 | 73856FB2A9C1B8D77E0FA1FF /* Pods_Finder_Extension.framework in Frameworks */, 196 | ); 197 | runOnlyForDeploymentPostprocessing = 0; 198 | }; 199 | 5ADD8ACB1FE698F8003A3461 /* Frameworks */ = { 200 | isa = PBXFrameworksBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | 5ADD8ADE1FE6A7B5003A3461 /* Common.framework in Frameworks */, 204 | B91243DF66920C475FA45D3B /* Pods_FiScriptHelper.framework in Frameworks */, 205 | ); 206 | runOnlyForDeploymentPostprocessing = 0; 207 | }; 208 | /* End PBXFrameworksBuildPhase section */ 209 | 210 | /* Begin PBXGroup section */ 211 | 2FD7319E0D35D32656A50A5A /* Pods */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 35A96B1B3DF124C326934100 /* Pods-FiScript.debug.xcconfig */, 215 | 35C12F65CC2FD960000B533B /* Pods-FiScript.release.xcconfig */, 216 | 259B3EE42237007C4BDBCBE4 /* Pods-FiScriptHelper.debug.xcconfig */, 217 | C3584D76BE676015DC20FC14 /* Pods-FiScriptHelper.release.xcconfig */, 218 | 2537A1440D9675CA3CDC3E5C /* Pods-Finder Extension.debug.xcconfig */, 219 | 00945887BCEED86A7E26193C /* Pods-Finder Extension.release.xcconfig */, 220 | ); 221 | name = Pods; 222 | sourceTree = ""; 223 | }; 224 | 5A12B37E1F9CAC3F0089A6D5 /* Common */ = { 225 | isa = PBXGroup; 226 | children = ( 227 | 5A12B3801F9CAC3F0089A6D5 /* Info.plist */, 228 | 5AADE2821F9CAE6300583919 /* DefaultActions.swift */, 229 | 5A12B3891F9CAC4E0089A6D5 /* Preferences.swift */, 230 | 5AFD0D9F1FAE6E8E00C147A7 /* extensions.swift */, 231 | 5A5549C71FC87D9700BB4003 /* CoreDataStack.swift */, 232 | 5AA9C8071FD125C700ACFAD0 /* ActionsCoreData.swift */, 233 | 5AD512B71FC7611F00781EE6 /* Model.xcdatamodeld */, 234 | 5AC165FA1FF29DB90041E534 /* GlobalVariables.swift */, 235 | 5A1CEE531FFE90ED009D04EC /* FinderSyncCode.swift */, 236 | 5A7C90C7208B7BEB00A1DFE1 /* HelperFunctions.swift */, 237 | ); 238 | path = Common; 239 | sourceTree = ""; 240 | }; 241 | 5A786B5B1F9B5E2B00773301 /* Supporting Files */ = { 242 | isa = PBXGroup; 243 | children = ( 244 | 5ABBDDCE1F98DE180032E38C /* Finder_Extension.entitlements */, 245 | 5ABBDDCD1F98DE180032E38C /* Info.plist */, 246 | ); 247 | name = "Supporting Files"; 248 | sourceTree = ""; 249 | }; 250 | 5ABBDD541F98B52A0032E38C = { 251 | isa = PBXGroup; 252 | children = ( 253 | 5AADE2841F9CC75500583919 /* Icons.xcassets */, 254 | 5ABBDD5F1F98B52A0032E38C /* FiScript */, 255 | 5ABBDDCA1F98DE180032E38C /* Finder Extension */, 256 | 5A12B37E1F9CAC3F0089A6D5 /* Common */, 257 | 5ADD8ACF1FE698F8003A3461 /* FiScriptHelper */, 258 | 5ABBDD5E1F98B52A0032E38C /* Products */, 259 | 5AED1DC21F9CA6EE0039F36B /* Frameworks */, 260 | 2FD7319E0D35D32656A50A5A /* Pods */, 261 | ); 262 | sourceTree = ""; 263 | }; 264 | 5ABBDD5E1F98B52A0032E38C /* Products */ = { 265 | isa = PBXGroup; 266 | children = ( 267 | 5ABBDD5D1F98B52A0032E38C /* FiScript.app */, 268 | 5ABBDDC91F98DE180032E38C /* Finder Extension.appex */, 269 | 5A12B37D1F9CAC3F0089A6D5 /* Common.framework */, 270 | 5ADD8ACE1FE698F8003A3461 /* FiScriptHelper.app */, 271 | ); 272 | name = Products; 273 | sourceTree = ""; 274 | }; 275 | 5ABBDD5F1F98B52A0032E38C /* FiScript */ = { 276 | isa = PBXGroup; 277 | children = ( 278 | 5ABBDD601F98B52A0032E38C /* AppDelegate.swift */, 279 | 5ABBDD661F98B52A0032E38C /* Main.storyboard */, 280 | 5AD360861FA88BA500315AB4 /* View Controllers */, 281 | 5AFD0DDA1FAF37DF00C147A7 /* Supporting Files */, 282 | ); 283 | path = FiScript; 284 | sourceTree = ""; 285 | }; 286 | 5ABBDDCA1F98DE180032E38C /* Finder Extension */ = { 287 | isa = PBXGroup; 288 | children = ( 289 | 5ABBDDCB1F98DE180032E38C /* FinderSync.swift */, 290 | 5A786B5B1F9B5E2B00773301 /* Supporting Files */, 291 | ); 292 | path = "Finder Extension"; 293 | sourceTree = ""; 294 | }; 295 | 5AD360861FA88BA500315AB4 /* View Controllers */ = { 296 | isa = PBXGroup; 297 | children = ( 298 | 5AD360871FA88BFE00315AB4 /* GeneralViewController.swift */, 299 | 5AD3608B1FA88C2A00315AB4 /* MenuViewController.swift */, 300 | 5AD1877C1FC728D400E8ECA2 /* ModifyActionVC.swift */, 301 | ); 302 | name = "View Controllers"; 303 | sourceTree = ""; 304 | }; 305 | 5ADD8ACF1FE698F8003A3461 /* FiScriptHelper */ = { 306 | isa = PBXGroup; 307 | children = ( 308 | 5ADD8AD01FE698F8003A3461 /* AppDelegate.swift */, 309 | 5ADD8AD41FE698F8003A3461 /* Assets.xcassets */, 310 | 5ADD8AD91FE698F8003A3461 /* Info.plist */, 311 | 5ADD8ADA1FE698F8003A3461 /* FiScriptHelper.entitlements */, 312 | 5AB843D51FEFB6C500515F98 /* Main.storyboard */, 313 | ); 314 | path = FiScriptHelper; 315 | sourceTree = ""; 316 | }; 317 | 5AED1DC21F9CA6EE0039F36B /* Frameworks */ = { 318 | isa = PBXGroup; 319 | children = ( 320 | 5A21BC401FA4FDDA00C3145D /* Cocoa.framework */, 321 | C4C4156535B085B105DBC150 /* Pods_FiScript.framework */, 322 | 3D63B4FE7392B4102C4617ED /* Pods_FiScriptHelper.framework */, 323 | 8A1A49C2FE0809A62202F8FC /* Pods_Finder_Extension.framework */, 324 | ); 325 | name = Frameworks; 326 | sourceTree = ""; 327 | }; 328 | 5AFD0DDA1FAF37DF00C147A7 /* Supporting Files */ = { 329 | isa = PBXGroup; 330 | children = ( 331 | 5A012D7C209DD6AC005B8882 /* DevMateKit-Bridging-Header.h */, 332 | 5ABBDD691F98B52A0032E38C /* Info.plist */, 333 | 5ABBDD6A1F98B52A0032E38C /* FiScript.entitlements */, 334 | 5ABBDD641F98B52A0032E38C /* Assets.xcassets */, 335 | 5A1141832072640E00F6DA0F /* dsa_pub.pem */, 336 | ); 337 | name = "Supporting Files"; 338 | sourceTree = ""; 339 | }; 340 | /* End PBXGroup section */ 341 | 342 | /* Begin PBXHeadersBuildPhase section */ 343 | 5A12B37A1F9CAC3F0089A6D5 /* Headers */ = { 344 | isa = PBXHeadersBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | ); 348 | runOnlyForDeploymentPostprocessing = 0; 349 | }; 350 | /* End PBXHeadersBuildPhase section */ 351 | 352 | /* Begin PBXNativeTarget section */ 353 | 5A12B37C1F9CAC3F0089A6D5 /* Common */ = { 354 | isa = PBXNativeTarget; 355 | buildConfigurationList = 5A12B3861F9CAC3F0089A6D5 /* Build configuration list for PBXNativeTarget "Common" */; 356 | buildPhases = ( 357 | 5A12B3781F9CAC3F0089A6D5 /* Sources */, 358 | 5A12B3791F9CAC3F0089A6D5 /* Frameworks */, 359 | 5A12B37A1F9CAC3F0089A6D5 /* Headers */, 360 | 5A12B37B1F9CAC3F0089A6D5 /* Resources */, 361 | ); 362 | buildRules = ( 363 | ); 364 | dependencies = ( 365 | ); 366 | name = Common; 367 | productName = Common; 368 | productReference = 5A12B37D1F9CAC3F0089A6D5 /* Common.framework */; 369 | productType = "com.apple.product-type.framework"; 370 | }; 371 | 5ABBDD5C1F98B52A0032E38C /* FiScript */ = { 372 | isa = PBXNativeTarget; 373 | buildConfigurationList = 5ABBDD831F98B52B0032E38C /* Build configuration list for PBXNativeTarget "FiScript" */; 374 | buildPhases = ( 375 | 310A77EF6BD3104553CD8728 /* [CP] Check Pods Manifest.lock */, 376 | 5ABBDD591F98B52A0032E38C /* Sources */, 377 | 5ABBDD5A1F98B52A0032E38C /* Frameworks */, 378 | 5ABBDD5B1F98B52A0032E38C /* Resources */, 379 | 5ABBDDD51F98DE180032E38C /* Embed App Extensions */, 380 | 5ABBDDE81F9907B40032E38C /* Embed Frameworks */, 381 | 5A21BC3C1FA4FD6F00C3145D /* CopyFiles */, 382 | 5A925B5D206BE8EB0015CC0D /* Copy Frameworks */, 383 | B4AF245F9D6D30186AAF48F5 /* [CP] Embed Pods Frameworks */, 384 | E1F3CC5BA3FC7E704F734D20 /* [CP] Copy Pods Resources */, 385 | 5A36AE02208C8EEA001814D7 /* Handle TODO as warning */, 386 | ); 387 | buildRules = ( 388 | ); 389 | dependencies = ( 390 | 5ABBDDD01F98DE180032E38C /* PBXTargetDependency */, 391 | 5A12B3831F9CAC3F0089A6D5 /* PBXTargetDependency */, 392 | ); 393 | name = FiScript; 394 | productName = "Custom Context Menu"; 395 | productReference = 5ABBDD5D1F98B52A0032E38C /* FiScript.app */; 396 | productType = "com.apple.product-type.application"; 397 | }; 398 | 5ABBDDC81F98DE180032E38C /* Finder Extension */ = { 399 | isa = PBXNativeTarget; 400 | buildConfigurationList = 5ABBDDD41F98DE180032E38C /* Build configuration list for PBXNativeTarget "Finder Extension" */; 401 | buildPhases = ( 402 | D347B2E9E4F7AD43A9156B61 /* [CP] Check Pods Manifest.lock */, 403 | 5ABBDDC51F98DE180032E38C /* Sources */, 404 | 5ABBDDC61F98DE180032E38C /* Frameworks */, 405 | 5ABBDDC71F98DE180032E38C /* Resources */, 406 | 5AFD0DA11FAF1F9700C147A7 /* ShellScript */, 407 | 5A2F2C04200742E6005F90E8 /* CopyFiles */, 408 | ); 409 | buildRules = ( 410 | ); 411 | dependencies = ( 412 | ); 413 | name = "Finder Extension"; 414 | productName = "Finder Extension"; 415 | productReference = 5ABBDDC91F98DE180032E38C /* Finder Extension.appex */; 416 | productType = "com.apple.product-type.app-extension"; 417 | }; 418 | 5ADD8ACD1FE698F8003A3461 /* FiScriptHelper */ = { 419 | isa = PBXNativeTarget; 420 | buildConfigurationList = 5ADD8ADD1FE698F8003A3461 /* Build configuration list for PBXNativeTarget "FiScriptHelper" */; 421 | buildPhases = ( 422 | ECD959179329C780730EC56D /* [CP] Check Pods Manifest.lock */, 423 | 5ADD8ACA1FE698F8003A3461 /* Sources */, 424 | 5ADD8ACB1FE698F8003A3461 /* Frameworks */, 425 | 5ADD8ACC1FE698F8003A3461 /* Resources */, 426 | 5A2AA1131FEFE727009DE64C /* CopyFiles */, 427 | 9DA1DFF0E0700CB8DE385C97 /* [CP] Embed Pods Frameworks */, 428 | ); 429 | buildRules = ( 430 | ); 431 | dependencies = ( 432 | ); 433 | name = FiScriptHelper; 434 | productName = CustomContextMenuHelper; 435 | productReference = 5ADD8ACE1FE698F8003A3461 /* FiScriptHelper.app */; 436 | productType = "com.apple.product-type.application"; 437 | }; 438 | /* End PBXNativeTarget section */ 439 | 440 | /* Begin PBXProject section */ 441 | 5ABBDD551F98B52A0032E38C /* Project object */ = { 442 | isa = PBXProject; 443 | attributes = { 444 | LastSwiftUpdateCheck = 0920; 445 | LastUpgradeCheck = 0930; 446 | ORGANIZATIONNAME = "Morten Nautrup Nielsen"; 447 | TargetAttributes = { 448 | 5A12B37C1F9CAC3F0089A6D5 = { 449 | CreatedOnToolsVersion = 9.0.1; 450 | LastSwiftMigration = 0900; 451 | ProvisioningStyle = Automatic; 452 | }; 453 | 5ABBDD5C1F98B52A0032E38C = { 454 | CreatedOnToolsVersion = 9.0.1; 455 | ProvisioningStyle = Automatic; 456 | SystemCapabilities = { 457 | com.apple.ApplicationGroups.Mac = { 458 | enabled = 1; 459 | }; 460 | com.apple.Sandbox = { 461 | enabled = 1; 462 | }; 463 | }; 464 | }; 465 | 5ABBDDC81F98DE180032E38C = { 466 | CreatedOnToolsVersion = 9.0.1; 467 | ProvisioningStyle = Automatic; 468 | SystemCapabilities = { 469 | com.apple.ApplicationGroups.Mac = { 470 | enabled = 1; 471 | }; 472 | }; 473 | }; 474 | 5ADD8ACD1FE698F8003A3461 = { 475 | CreatedOnToolsVersion = 9.2; 476 | ProvisioningStyle = Automatic; 477 | SystemCapabilities = { 478 | com.apple.ApplicationGroups.Mac = { 479 | enabled = 1; 480 | }; 481 | com.apple.Sandbox = { 482 | enabled = 0; 483 | }; 484 | }; 485 | }; 486 | }; 487 | }; 488 | buildConfigurationList = 5ABBDD581F98B52A0032E38C /* Build configuration list for PBXProject "FiScript" */; 489 | compatibilityVersion = "Xcode 8.0"; 490 | developmentRegion = en; 491 | hasScannedForEncodings = 0; 492 | knownRegions = ( 493 | en, 494 | Base, 495 | ); 496 | mainGroup = 5ABBDD541F98B52A0032E38C; 497 | productRefGroup = 5ABBDD5E1F98B52A0032E38C /* Products */; 498 | projectDirPath = ""; 499 | projectRoot = ""; 500 | targets = ( 501 | 5ABBDD5C1F98B52A0032E38C /* FiScript */, 502 | 5ABBDDC81F98DE180032E38C /* Finder Extension */, 503 | 5A12B37C1F9CAC3F0089A6D5 /* Common */, 504 | 5ADD8ACD1FE698F8003A3461 /* FiScriptHelper */, 505 | ); 506 | }; 507 | /* End PBXProject section */ 508 | 509 | /* Begin PBXResourcesBuildPhase section */ 510 | 5A12B37B1F9CAC3F0089A6D5 /* Resources */ = { 511 | isa = PBXResourcesBuildPhase; 512 | buildActionMask = 2147483647; 513 | files = ( 514 | ); 515 | runOnlyForDeploymentPostprocessing = 0; 516 | }; 517 | 5ABBDD5B1F98B52A0032E38C /* Resources */ = { 518 | isa = PBXResourcesBuildPhase; 519 | buildActionMask = 2147483647; 520 | files = ( 521 | 5ABBDD651F98B52A0032E38C /* Assets.xcassets in Resources */, 522 | 5A1141842072640E00F6DA0F /* dsa_pub.pem in Resources */, 523 | 5A0405391FA116AE0006BB76 /* Icons.xcassets in Resources */, 524 | 5ABBDD681F98B52A0032E38C /* Main.storyboard in Resources */, 525 | ); 526 | runOnlyForDeploymentPostprocessing = 0; 527 | }; 528 | 5ABBDDC71F98DE180032E38C /* Resources */ = { 529 | isa = PBXResourcesBuildPhase; 530 | buildActionMask = 2147483647; 531 | files = ( 532 | 5A04053A1FA116AF0006BB76 /* Icons.xcassets in Resources */, 533 | ); 534 | runOnlyForDeploymentPostprocessing = 0; 535 | }; 536 | 5ADD8ACC1FE698F8003A3461 /* Resources */ = { 537 | isa = PBXResourcesBuildPhase; 538 | buildActionMask = 2147483647; 539 | files = ( 540 | 5ADD8AD51FE698F8003A3461 /* Assets.xcassets in Resources */, 541 | 5AB843D71FEFB6C500515F98 /* Main.storyboard in Resources */, 542 | ); 543 | runOnlyForDeploymentPostprocessing = 0; 544 | }; 545 | /* End PBXResourcesBuildPhase section */ 546 | 547 | /* Begin PBXShellScriptBuildPhase section */ 548 | 310A77EF6BD3104553CD8728 /* [CP] Check Pods Manifest.lock */ = { 549 | isa = PBXShellScriptBuildPhase; 550 | buildActionMask = 2147483647; 551 | files = ( 552 | ); 553 | inputPaths = ( 554 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 555 | "${PODS_ROOT}/Manifest.lock", 556 | ); 557 | name = "[CP] Check Pods Manifest.lock"; 558 | outputPaths = ( 559 | "$(DERIVED_FILE_DIR)/Pods-FiScript-checkManifestLockResult.txt", 560 | ); 561 | runOnlyForDeploymentPostprocessing = 0; 562 | shellPath = /bin/sh; 563 | 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"; 564 | showEnvVarsInLog = 0; 565 | }; 566 | 5A36AE02208C8EEA001814D7 /* Handle TODO as warning */ = { 567 | isa = PBXShellScriptBuildPhase; 568 | buildActionMask = 2147483647; 569 | files = ( 570 | ); 571 | inputPaths = ( 572 | ); 573 | name = "Handle TODO as warning"; 574 | outputPaths = ( 575 | ); 576 | runOnlyForDeploymentPostprocessing = 0; 577 | shellPath = /bin/sh; 578 | shellScript = "TAGS=\"TODO:|FIXME:\"\nERRORTAG=\"ERROR:\"\nfind \"${SRCROOT}\" \\( -name \"*.h\" -or -name \"*.m\" -or -name \"*.swift\" \\) -print0 | xargs -0 egrep --with-filename --line-number --only-matching \"($TAGS).*\\$|($ERRORTAG).*\\$\" | perl -p -e \"s/($TAGS)/ warning: \\$1/\"| perl -p -e \"s/($ERRORTAG)/ error: \\$1/\""; 579 | }; 580 | 5AFD0DA11FAF1F9700C147A7 /* ShellScript */ = { 581 | isa = PBXShellScriptBuildPhase; 582 | buildActionMask = 2147483647; 583 | files = ( 584 | ); 585 | inputPaths = ( 586 | ); 587 | outputPaths = ( 588 | ); 589 | runOnlyForDeploymentPostprocessing = 0; 590 | shellPath = /bin/sh; 591 | shellScript = "killall Finder"; 592 | }; 593 | 9DA1DFF0E0700CB8DE385C97 /* [CP] Embed Pods Frameworks */ = { 594 | isa = PBXShellScriptBuildPhase; 595 | buildActionMask = 2147483647; 596 | files = ( 597 | ); 598 | inputPaths = ( 599 | "${SRCROOT}/Pods/Target Support Files/Pods-FiScriptHelper/Pods-FiScriptHelper-frameworks.sh", 600 | "${BUILT_PRODUCTS_DIR}/MMWormhole/MMWormhole.framework", 601 | ); 602 | name = "[CP] Embed Pods Frameworks"; 603 | outputPaths = ( 604 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MMWormhole.framework", 605 | ); 606 | runOnlyForDeploymentPostprocessing = 0; 607 | shellPath = /bin/sh; 608 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FiScriptHelper/Pods-FiScriptHelper-frameworks.sh\"\n"; 609 | showEnvVarsInLog = 0; 610 | }; 611 | B4AF245F9D6D30186AAF48F5 /* [CP] Embed Pods Frameworks */ = { 612 | isa = PBXShellScriptBuildPhase; 613 | buildActionMask = 2147483647; 614 | files = ( 615 | ); 616 | inputPaths = ( 617 | "${SRCROOT}/Pods/Target Support Files/Pods-FiScript/Pods-FiScript-frameworks.sh", 618 | "${PODS_ROOT}/DevMateKit/DevMateKit.framework", 619 | "${BUILT_PRODUCTS_DIR}/MMWormhole/MMWormhole.framework", 620 | ); 621 | name = "[CP] Embed Pods Frameworks"; 622 | outputPaths = ( 623 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DevMateKit.framework", 624 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MMWormhole.framework", 625 | ); 626 | runOnlyForDeploymentPostprocessing = 0; 627 | shellPath = /bin/sh; 628 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FiScript/Pods-FiScript-frameworks.sh\"\n"; 629 | showEnvVarsInLog = 0; 630 | }; 631 | D347B2E9E4F7AD43A9156B61 /* [CP] Check Pods Manifest.lock */ = { 632 | isa = PBXShellScriptBuildPhase; 633 | buildActionMask = 2147483647; 634 | files = ( 635 | ); 636 | inputPaths = ( 637 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 638 | "${PODS_ROOT}/Manifest.lock", 639 | ); 640 | name = "[CP] Check Pods Manifest.lock"; 641 | outputPaths = ( 642 | "$(DERIVED_FILE_DIR)/Pods-Finder Extension-checkManifestLockResult.txt", 643 | ); 644 | runOnlyForDeploymentPostprocessing = 0; 645 | shellPath = /bin/sh; 646 | 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"; 647 | showEnvVarsInLog = 0; 648 | }; 649 | E1F3CC5BA3FC7E704F734D20 /* [CP] Copy Pods Resources */ = { 650 | isa = PBXShellScriptBuildPhase; 651 | buildActionMask = 2147483647; 652 | files = ( 653 | ); 654 | inputPaths = ( 655 | "${SRCROOT}/Pods/Target Support Files/Pods-FiScript/Pods-FiScript-resources.sh", 656 | "${PODS_ROOT}/DevMateKit/DevMateKit.framework", 657 | ); 658 | name = "[CP] Copy Pods Resources"; 659 | outputPaths = ( 660 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DevMateKit.framework", 661 | ); 662 | runOnlyForDeploymentPostprocessing = 0; 663 | shellPath = /bin/sh; 664 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FiScript/Pods-FiScript-resources.sh\"\n"; 665 | showEnvVarsInLog = 0; 666 | }; 667 | ECD959179329C780730EC56D /* [CP] Check Pods Manifest.lock */ = { 668 | isa = PBXShellScriptBuildPhase; 669 | buildActionMask = 2147483647; 670 | files = ( 671 | ); 672 | inputPaths = ( 673 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 674 | "${PODS_ROOT}/Manifest.lock", 675 | ); 676 | name = "[CP] Check Pods Manifest.lock"; 677 | outputPaths = ( 678 | "$(DERIVED_FILE_DIR)/Pods-FiScriptHelper-checkManifestLockResult.txt", 679 | ); 680 | runOnlyForDeploymentPostprocessing = 0; 681 | shellPath = /bin/sh; 682 | 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"; 683 | showEnvVarsInLog = 0; 684 | }; 685 | /* End PBXShellScriptBuildPhase section */ 686 | 687 | /* Begin PBXSourcesBuildPhase section */ 688 | 5A12B3781F9CAC3F0089A6D5 /* Sources */ = { 689 | isa = PBXSourcesBuildPhase; 690 | buildActionMask = 2147483647; 691 | files = ( 692 | 5A5549C81FC87D9700BB4003 /* CoreDataStack.swift in Sources */, 693 | 5A12B38A1F9CAC4E0089A6D5 /* Preferences.swift in Sources */, 694 | 5A9167E61FD52113009D40A8 /* ActionsCoreData.swift in Sources */, 695 | 5AADE2831F9CAE6300583919 /* DefaultActions.swift in Sources */, 696 | 5AC165FB1FF29DB90041E534 /* GlobalVariables.swift in Sources */, 697 | 5AFD0DA01FAE6E8E00C147A7 /* extensions.swift in Sources */, 698 | 5AD512B91FC7611F00781EE6 /* Model.xcdatamodeld in Sources */, 699 | 5A1CEE541FFE90ED009D04EC /* FinderSyncCode.swift in Sources */, 700 | 5A7C90C8208B7BEB00A1DFE1 /* HelperFunctions.swift in Sources */, 701 | ); 702 | runOnlyForDeploymentPostprocessing = 0; 703 | }; 704 | 5ABBDD591F98B52A0032E38C /* Sources */ = { 705 | isa = PBXSourcesBuildPhase; 706 | buildActionMask = 2147483647; 707 | files = ( 708 | 5AD360881FA88BFE00315AB4 /* GeneralViewController.swift in Sources */, 709 | 5AD3608C1FA88C2A00315AB4 /* MenuViewController.swift in Sources */, 710 | 5AD1877D1FC728D400E8ECA2 /* ModifyActionVC.swift in Sources */, 711 | 5ABBDD611F98B52A0032E38C /* AppDelegate.swift in Sources */, 712 | ); 713 | runOnlyForDeploymentPostprocessing = 0; 714 | }; 715 | 5ABBDDC51F98DE180032E38C /* Sources */ = { 716 | isa = PBXSourcesBuildPhase; 717 | buildActionMask = 2147483647; 718 | files = ( 719 | 5ABBDDCC1F98DE180032E38C /* FinderSync.swift in Sources */, 720 | ); 721 | runOnlyForDeploymentPostprocessing = 0; 722 | }; 723 | 5ADD8ACA1FE698F8003A3461 /* Sources */ = { 724 | isa = PBXSourcesBuildPhase; 725 | buildActionMask = 2147483647; 726 | files = ( 727 | 5ADD8AD11FE698F8003A3461 /* AppDelegate.swift in Sources */, 728 | ); 729 | runOnlyForDeploymentPostprocessing = 0; 730 | }; 731 | /* End PBXSourcesBuildPhase section */ 732 | 733 | /* Begin PBXTargetDependency section */ 734 | 5A12B3831F9CAC3F0089A6D5 /* PBXTargetDependency */ = { 735 | isa = PBXTargetDependency; 736 | target = 5A12B37C1F9CAC3F0089A6D5 /* Common */; 737 | targetProxy = 5A12B3821F9CAC3F0089A6D5 /* PBXContainerItemProxy */; 738 | }; 739 | 5ABBDDD01F98DE180032E38C /* PBXTargetDependency */ = { 740 | isa = PBXTargetDependency; 741 | target = 5ABBDDC81F98DE180032E38C /* Finder Extension */; 742 | targetProxy = 5ABBDDCF1F98DE180032E38C /* PBXContainerItemProxy */; 743 | }; 744 | /* End PBXTargetDependency section */ 745 | 746 | /* Begin PBXVariantGroup section */ 747 | 5AB843D51FEFB6C500515F98 /* Main.storyboard */ = { 748 | isa = PBXVariantGroup; 749 | children = ( 750 | 5AB843D61FEFB6C500515F98 /* Base */, 751 | ); 752 | name = Main.storyboard; 753 | sourceTree = ""; 754 | }; 755 | 5ABBDD661F98B52A0032E38C /* Main.storyboard */ = { 756 | isa = PBXVariantGroup; 757 | children = ( 758 | 5ABBDD671F98B52A0032E38C /* Base */, 759 | ); 760 | name = Main.storyboard; 761 | sourceTree = ""; 762 | }; 763 | /* End PBXVariantGroup section */ 764 | 765 | /* Begin XCBuildConfiguration section */ 766 | 5A12B3871F9CAC3F0089A6D5 /* Debug */ = { 767 | isa = XCBuildConfiguration; 768 | buildSettings = { 769 | APPLICATION_EXTENSION_API_ONLY = YES; 770 | CLANG_ENABLE_MODULES = YES; 771 | CODE_SIGN_IDENTITY = ""; 772 | CODE_SIGN_STYLE = Automatic; 773 | COMBINE_HIDPI_IMAGES = YES; 774 | CURRENT_PROJECT_VERSION = 2; 775 | DEFINES_MODULE = YES; 776 | DEVELOPMENT_TEAM = ""; 777 | DYLIB_COMPATIBILITY_VERSION = 1; 778 | DYLIB_CURRENT_VERSION = 2; 779 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 780 | FRAMEWORK_VERSION = A; 781 | INFOPLIST_FILE = Common/Info.plist; 782 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 783 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 784 | PRODUCT_BUNDLE_IDENTIFIER = com.Mortennn.Common; 785 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 786 | SKIP_INSTALL = YES; 787 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 788 | SWIFT_VERSION = 4.0; 789 | VERSIONING_SYSTEM = "apple-generic"; 790 | VERSION_INFO_PREFIX = ""; 791 | }; 792 | name = Debug; 793 | }; 794 | 5A12B3881F9CAC3F0089A6D5 /* Release */ = { 795 | isa = XCBuildConfiguration; 796 | buildSettings = { 797 | APPLICATION_EXTENSION_API_ONLY = YES; 798 | CLANG_ENABLE_MODULES = YES; 799 | CODE_SIGN_IDENTITY = ""; 800 | CODE_SIGN_STYLE = Automatic; 801 | COMBINE_HIDPI_IMAGES = YES; 802 | CURRENT_PROJECT_VERSION = 2; 803 | DEFINES_MODULE = YES; 804 | DEVELOPMENT_TEAM = ""; 805 | DYLIB_COMPATIBILITY_VERSION = 1; 806 | DYLIB_CURRENT_VERSION = 2; 807 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 808 | FRAMEWORK_VERSION = A; 809 | INFOPLIST_FILE = Common/Info.plist; 810 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 811 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 812 | PRODUCT_BUNDLE_IDENTIFIER = com.Mortennn.Common; 813 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 814 | SKIP_INSTALL = YES; 815 | SWIFT_VERSION = 4.0; 816 | VERSIONING_SYSTEM = "apple-generic"; 817 | VERSION_INFO_PREFIX = ""; 818 | }; 819 | name = Release; 820 | }; 821 | 5ABBDD811F98B52B0032E38C /* Debug */ = { 822 | isa = XCBuildConfiguration; 823 | buildSettings = { 824 | ALWAYS_SEARCH_USER_PATHS = NO; 825 | CLANG_ANALYZER_NONNULL = YES; 826 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 827 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 828 | CLANG_CXX_LIBRARY = "libc++"; 829 | CLANG_ENABLE_MODULES = YES; 830 | CLANG_ENABLE_OBJC_ARC = YES; 831 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 832 | CLANG_WARN_BOOL_CONVERSION = YES; 833 | CLANG_WARN_COMMA = YES; 834 | CLANG_WARN_CONSTANT_CONVERSION = YES; 835 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 836 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 837 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 838 | CLANG_WARN_EMPTY_BODY = YES; 839 | CLANG_WARN_ENUM_CONVERSION = YES; 840 | CLANG_WARN_INFINITE_RECURSION = YES; 841 | CLANG_WARN_INT_CONVERSION = YES; 842 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 843 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 844 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 845 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 846 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 847 | CLANG_WARN_STRICT_PROTOTYPES = YES; 848 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 849 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 850 | CLANG_WARN_UNREACHABLE_CODE = YES; 851 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 852 | CODE_SIGN_IDENTITY = "Mac Developer"; 853 | COPY_PHASE_STRIP = NO; 854 | DEBUG_INFORMATION_FORMAT = dwarf; 855 | ENABLE_STRICT_OBJC_MSGSEND = YES; 856 | ENABLE_TESTABILITY = YES; 857 | GCC_C_LANGUAGE_STANDARD = gnu11; 858 | GCC_DYNAMIC_NO_PIC = NO; 859 | GCC_NO_COMMON_BLOCKS = YES; 860 | GCC_OPTIMIZATION_LEVEL = 0; 861 | GCC_PREPROCESSOR_DEFINITIONS = ( 862 | "DEBUG=1", 863 | "$(inherited)", 864 | ); 865 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 866 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 867 | GCC_WARN_UNDECLARED_SELECTOR = YES; 868 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 869 | GCC_WARN_UNUSED_FUNCTION = YES; 870 | GCC_WARN_UNUSED_VARIABLE = YES; 871 | MACOSX_DEPLOYMENT_TARGET = 10.12; 872 | MTL_ENABLE_DEBUG_INFO = YES; 873 | ONLY_ACTIVE_ARCH = YES; 874 | SDKROOT = macosx; 875 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 876 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 877 | }; 878 | name = Debug; 879 | }; 880 | 5ABBDD821F98B52B0032E38C /* Release */ = { 881 | isa = XCBuildConfiguration; 882 | buildSettings = { 883 | ALWAYS_SEARCH_USER_PATHS = NO; 884 | CLANG_ANALYZER_NONNULL = YES; 885 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 886 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 887 | CLANG_CXX_LIBRARY = "libc++"; 888 | CLANG_ENABLE_MODULES = YES; 889 | CLANG_ENABLE_OBJC_ARC = YES; 890 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 891 | CLANG_WARN_BOOL_CONVERSION = YES; 892 | CLANG_WARN_COMMA = YES; 893 | CLANG_WARN_CONSTANT_CONVERSION = YES; 894 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 895 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 896 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 897 | CLANG_WARN_EMPTY_BODY = YES; 898 | CLANG_WARN_ENUM_CONVERSION = YES; 899 | CLANG_WARN_INFINITE_RECURSION = YES; 900 | CLANG_WARN_INT_CONVERSION = YES; 901 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 902 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 903 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 904 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 905 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 906 | CLANG_WARN_STRICT_PROTOTYPES = YES; 907 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 908 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 909 | CLANG_WARN_UNREACHABLE_CODE = YES; 910 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 911 | CODE_SIGN_IDENTITY = "Mac Developer"; 912 | COPY_PHASE_STRIP = NO; 913 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 914 | ENABLE_NS_ASSERTIONS = NO; 915 | ENABLE_STRICT_OBJC_MSGSEND = YES; 916 | GCC_C_LANGUAGE_STANDARD = gnu11; 917 | GCC_NO_COMMON_BLOCKS = YES; 918 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 919 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 920 | GCC_WARN_UNDECLARED_SELECTOR = YES; 921 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 922 | GCC_WARN_UNUSED_FUNCTION = YES; 923 | GCC_WARN_UNUSED_VARIABLE = YES; 924 | MACOSX_DEPLOYMENT_TARGET = 10.12; 925 | MTL_ENABLE_DEBUG_INFO = NO; 926 | SDKROOT = macosx; 927 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 928 | }; 929 | name = Release; 930 | }; 931 | 5ABBDD841F98B52B0032E38C /* Debug */ = { 932 | isa = XCBuildConfiguration; 933 | baseConfigurationReference = 35A96B1B3DF124C326934100 /* Pods-FiScript.debug.xcconfig */; 934 | buildSettings = { 935 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 936 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 937 | CODE_SIGN_ENTITLEMENTS = FiScript/FiScript.entitlements; 938 | CODE_SIGN_IDENTITY = "Mac Developer"; 939 | CODE_SIGN_STYLE = Automatic; 940 | COMBINE_HIDPI_IMAGES = YES; 941 | DEVELOPMENT_TEAM = ""; 942 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 943 | INFOPLIST_FILE = "$(SRCROOT)/FiScript/Info.plist"; 944 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 945 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 946 | OTHER_LDFLAGS = ( 947 | "$(inherited)", 948 | "-ObjC", 949 | "-lc++", 950 | "-framework", 951 | Security, 952 | "-framework", 953 | IOKit, 954 | ); 955 | PRODUCT_BUNDLE_IDENTIFIER = com.Mortennn.FiScript; 956 | PRODUCT_NAME = "$(TARGET_NAME)"; 957 | PROVISIONING_PROFILE_SPECIFIER = ""; 958 | SKIP_INSTALL = NO; 959 | SWIFT_INSTALL_OBJC_HEADER = NO; 960 | SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/FiScript/DevMateKit-Bridging-Header.h"; 961 | SWIFT_PRECOMPILE_BRIDGING_HEADER = NO; 962 | SWIFT_VERSION = 4.0; 963 | }; 964 | name = Debug; 965 | }; 966 | 5ABBDD851F98B52B0032E38C /* Release */ = { 967 | isa = XCBuildConfiguration; 968 | baseConfigurationReference = 35C12F65CC2FD960000B533B /* Pods-FiScript.release.xcconfig */; 969 | buildSettings = { 970 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 971 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 972 | CODE_SIGN_ENTITLEMENTS = FiScript/FiScript.entitlements; 973 | CODE_SIGN_IDENTITY = "Mac Developer"; 974 | CODE_SIGN_STYLE = Automatic; 975 | COMBINE_HIDPI_IMAGES = YES; 976 | DEVELOPMENT_TEAM = ""; 977 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 978 | INFOPLIST_FILE = "$(SRCROOT)/FiScript/Info.plist"; 979 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 980 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 981 | OTHER_LDFLAGS = ( 982 | "$(inherited)", 983 | "-ObjC", 984 | "-lc++", 985 | "-framework", 986 | Security, 987 | "-framework", 988 | IOKit, 989 | ); 990 | PRODUCT_BUNDLE_IDENTIFIER = com.Mortennn.FiScript; 991 | PRODUCT_NAME = "$(TARGET_NAME)"; 992 | PROVISIONING_PROFILE_SPECIFIER = ""; 993 | SKIP_INSTALL = NO; 994 | SWIFT_INSTALL_OBJC_HEADER = NO; 995 | SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/FiScript/DevMateKit-Bridging-Header.h"; 996 | SWIFT_PRECOMPILE_BRIDGING_HEADER = NO; 997 | SWIFT_VERSION = 4.0; 998 | }; 999 | name = Release; 1000 | }; 1001 | 5ABBDDD21F98DE180032E38C /* Debug */ = { 1002 | isa = XCBuildConfiguration; 1003 | baseConfigurationReference = 2537A1440D9675CA3CDC3E5C /* Pods-Finder Extension.debug.xcconfig */; 1004 | buildSettings = { 1005 | APPLICATION_EXTENSION_API_ONLY = NO; 1006 | CODE_SIGN_ENTITLEMENTS = "Finder Extension/Finder_Extension.entitlements"; 1007 | CODE_SIGN_IDENTITY = "Mac Developer"; 1008 | CODE_SIGN_STYLE = Automatic; 1009 | COMBINE_HIDPI_IMAGES = YES; 1010 | DEVELOPMENT_TEAM = ""; 1011 | DYLIB_INSTALL_NAME_BASE = ""; 1012 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 1013 | INFOPLIST_FILE = "Finder Extension/Info.plist"; 1014 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; 1015 | PRODUCT_BUNDLE_IDENTIFIER = "com.Mortennn.FiScript.Finder-Extension"; 1016 | PRODUCT_NAME = "$(TARGET_NAME)"; 1017 | PROVISIONING_PROFILE_SPECIFIER = ""; 1018 | SKIP_INSTALL = YES; 1019 | SWIFT_VERSION = 4.0; 1020 | }; 1021 | name = Debug; 1022 | }; 1023 | 5ABBDDD31F98DE180032E38C /* Release */ = { 1024 | isa = XCBuildConfiguration; 1025 | baseConfigurationReference = 00945887BCEED86A7E26193C /* Pods-Finder Extension.release.xcconfig */; 1026 | buildSettings = { 1027 | APPLICATION_EXTENSION_API_ONLY = NO; 1028 | CODE_SIGN_ENTITLEMENTS = "Finder Extension/Finder_Extension.entitlements"; 1029 | CODE_SIGN_IDENTITY = "Mac Developer"; 1030 | CODE_SIGN_STYLE = Automatic; 1031 | COMBINE_HIDPI_IMAGES = YES; 1032 | DEVELOPMENT_TEAM = ""; 1033 | DYLIB_INSTALL_NAME_BASE = ""; 1034 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 1035 | INFOPLIST_FILE = "Finder Extension/Info.plist"; 1036 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; 1037 | PRODUCT_BUNDLE_IDENTIFIER = "com.Mortennn.FiScript.Finder-Extension"; 1038 | PRODUCT_NAME = "$(TARGET_NAME)"; 1039 | PROVISIONING_PROFILE_SPECIFIER = ""; 1040 | SKIP_INSTALL = YES; 1041 | SWIFT_VERSION = 4.0; 1042 | }; 1043 | name = Release; 1044 | }; 1045 | 5ADD8ADB1FE698F8003A3461 /* Debug */ = { 1046 | isa = XCBuildConfiguration; 1047 | baseConfigurationReference = 259B3EE42237007C4BDBCBE4 /* Pods-FiScriptHelper.debug.xcconfig */; 1048 | buildSettings = { 1049 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1050 | CODE_SIGN_ENTITLEMENTS = FiScriptHelper/FiScriptHelper.entitlements; 1051 | CODE_SIGN_IDENTITY = "Mac Developer"; 1052 | CODE_SIGN_STYLE = Automatic; 1053 | COMBINE_HIDPI_IMAGES = YES; 1054 | DEVELOPMENT_TEAM = ""; 1055 | INFOPLIST_FILE = "$(SRCROOT)/FiScriptHelper/Info.plist"; 1056 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 1057 | PRODUCT_BUNDLE_IDENTIFIER = com.Mortennn.FiScriptHelper; 1058 | PRODUCT_NAME = "$(TARGET_NAME)"; 1059 | PROVISIONING_PROFILE_SPECIFIER = ""; 1060 | SKIP_INSTALL = YES; 1061 | SWIFT_OBJC_BRIDGING_HEADER = ""; 1062 | SWIFT_PRECOMPILE_BRIDGING_HEADER = YES; 1063 | SWIFT_VERSION = 4.0; 1064 | }; 1065 | name = Debug; 1066 | }; 1067 | 5ADD8ADC1FE698F8003A3461 /* Release */ = { 1068 | isa = XCBuildConfiguration; 1069 | baseConfigurationReference = C3584D76BE676015DC20FC14 /* Pods-FiScriptHelper.release.xcconfig */; 1070 | buildSettings = { 1071 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1072 | CODE_SIGN_ENTITLEMENTS = FiScriptHelper/FiScriptHelper.entitlements; 1073 | CODE_SIGN_IDENTITY = "Mac Developer"; 1074 | CODE_SIGN_STYLE = Automatic; 1075 | COMBINE_HIDPI_IMAGES = YES; 1076 | DEVELOPMENT_TEAM = ""; 1077 | INFOPLIST_FILE = "$(SRCROOT)/FiScriptHelper/Info.plist"; 1078 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 1079 | PRODUCT_BUNDLE_IDENTIFIER = com.Mortennn.FiScriptHelper; 1080 | PRODUCT_NAME = "$(TARGET_NAME)"; 1081 | PROVISIONING_PROFILE_SPECIFIER = ""; 1082 | SKIP_INSTALL = YES; 1083 | SWIFT_OBJC_BRIDGING_HEADER = ""; 1084 | SWIFT_PRECOMPILE_BRIDGING_HEADER = YES; 1085 | SWIFT_VERSION = 4.0; 1086 | }; 1087 | name = Release; 1088 | }; 1089 | /* End XCBuildConfiguration section */ 1090 | 1091 | /* Begin XCConfigurationList section */ 1092 | 5A12B3861F9CAC3F0089A6D5 /* Build configuration list for PBXNativeTarget "Common" */ = { 1093 | isa = XCConfigurationList; 1094 | buildConfigurations = ( 1095 | 5A12B3871F9CAC3F0089A6D5 /* Debug */, 1096 | 5A12B3881F9CAC3F0089A6D5 /* Release */, 1097 | ); 1098 | defaultConfigurationIsVisible = 0; 1099 | defaultConfigurationName = Release; 1100 | }; 1101 | 5ABBDD581F98B52A0032E38C /* Build configuration list for PBXProject "FiScript" */ = { 1102 | isa = XCConfigurationList; 1103 | buildConfigurations = ( 1104 | 5ABBDD811F98B52B0032E38C /* Debug */, 1105 | 5ABBDD821F98B52B0032E38C /* Release */, 1106 | ); 1107 | defaultConfigurationIsVisible = 0; 1108 | defaultConfigurationName = Release; 1109 | }; 1110 | 5ABBDD831F98B52B0032E38C /* Build configuration list for PBXNativeTarget "FiScript" */ = { 1111 | isa = XCConfigurationList; 1112 | buildConfigurations = ( 1113 | 5ABBDD841F98B52B0032E38C /* Debug */, 1114 | 5ABBDD851F98B52B0032E38C /* Release */, 1115 | ); 1116 | defaultConfigurationIsVisible = 0; 1117 | defaultConfigurationName = Release; 1118 | }; 1119 | 5ABBDDD41F98DE180032E38C /* Build configuration list for PBXNativeTarget "Finder Extension" */ = { 1120 | isa = XCConfigurationList; 1121 | buildConfigurations = ( 1122 | 5ABBDDD21F98DE180032E38C /* Debug */, 1123 | 5ABBDDD31F98DE180032E38C /* Release */, 1124 | ); 1125 | defaultConfigurationIsVisible = 0; 1126 | defaultConfigurationName = Release; 1127 | }; 1128 | 5ADD8ADD1FE698F8003A3461 /* Build configuration list for PBXNativeTarget "FiScriptHelper" */ = { 1129 | isa = XCConfigurationList; 1130 | buildConfigurations = ( 1131 | 5ADD8ADB1FE698F8003A3461 /* Debug */, 1132 | 5ADD8ADC1FE698F8003A3461 /* Release */, 1133 | ); 1134 | defaultConfigurationIsVisible = 0; 1135 | defaultConfigurationName = Release; 1136 | }; 1137 | /* End XCConfigurationList section */ 1138 | 1139 | /* Begin XCVersionGroup section */ 1140 | 5AD512B71FC7611F00781EE6 /* Model.xcdatamodeld */ = { 1141 | isa = XCVersionGroup; 1142 | children = ( 1143 | 5AD512B81FC7611F00781EE6 /* Model.xcdatamodel */, 1144 | ); 1145 | currentVersion = 5AD512B81FC7611F00781EE6 /* Model.xcdatamodel */; 1146 | path = Model.xcdatamodeld; 1147 | sourceTree = ""; 1148 | versionGroupType = wrapper.xcdatamodel; 1149 | }; 1150 | /* End XCVersionGroup section */ 1151 | }; 1152 | rootObject = 5ABBDD551F98B52A0032E38C /* Project object */; 1153 | } 1154 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/project.xcworkspace/xcuserdata/Morten.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript.xcodeproj/project.xcworkspace/xcuserdata/Morten.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FiScript.xcodeproj/project.xcworkspace/xcuserdata/Morten.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildLocationStyle 6 | UseAppPreferences 7 | CustomBuildLocationType 8 | RelativeToDerivedData 9 | DerivedDataLocationStyle 10 | Default 11 | EnabledFullIndexStoreVisibility 12 | 13 | IssueFilterStyle 14 | ShowActiveSchemeOnly 15 | LiveSourceIssuesEnabled 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/xcuserdata/Morten.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/xcuserdata/Morten.xcuserdatad/xcschemes/Archive.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 53 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 71 | 72 | 73 | 74 | 84 | 86 | 92 | 93 | 94 | 95 | 96 | 97 | 103 | 105 | 111 | 112 | 113 | 114 | 116 | 117 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/xcuserdata/Morten.xcuserdatad/xcschemes/FiScript.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 53 | 59 | 60 | 61 | 63 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 81 | 82 | 83 | 84 | 94 | 96 | 102 | 103 | 104 | 105 | 106 | 107 | 113 | 115 | 121 | 122 | 123 | 124 | 126 | 127 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/xcuserdata/Morten.xcuserdatad/xcschemes/FiScriptHelper.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/xcuserdata/Morten.xcuserdatad/xcschemes/Finder Extension.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 48 | 54 | 55 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 74 | 75 | 76 | 77 | 78 | 79 | 89 | 93 | 94 | 95 | 101 | 102 | 103 | 104 | 105 | 106 | 113 | 115 | 121 | 122 | 123 | 124 | 126 | 127 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /FiScript.xcodeproj/xcuserdata/Morten.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ActionsTest.xcscheme 8 | 9 | orderHint 10 | 4 11 | 12 | Archive.xcscheme 13 | 14 | orderHint 15 | 2 16 | 17 | Common.xcscheme 18 | 19 | orderHint 20 | 8 21 | 22 | FiScript.xcscheme 23 | 24 | orderHint 25 | 0 26 | 27 | FiScriptHelper.xcscheme 28 | 29 | orderHint 30 | 3 31 | 32 | Finder Extension.xcscheme 33 | 34 | orderHint 35 | 1 36 | 37 | LauncherApplication.xcscheme 38 | 39 | orderHint 40 | 3 41 | 42 | 43 | SuppressBuildableAutocreation 44 | 45 | 5A4DECB62000E952000BCF19 46 | 47 | primary 48 | 49 | 50 | 5A8D4C8D1FBC7F5200980CFF 51 | 52 | primary 53 | 54 | 55 | 5A8D4C951FBC7F5200980CFF 56 | 57 | primary 58 | 59 | 60 | 5ABBDD5C1F98B52A0032E38C 61 | 62 | primary 63 | 64 | 65 | 5ABBDDC81F98DE180032E38C 66 | 67 | primary 68 | 69 | 70 | 5ADD8ACD1FE698F8003A3461 71 | 72 | primary 73 | 74 | 75 | 5AF2ACE41FB7937B00BABD0E 76 | 77 | primary 78 | 79 | 80 | 5AF542601FBED3F40093B78B 81 | 82 | primary 83 | 84 | 85 | 5AF542681FBED3F40093B78B 86 | 87 | primary 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /FiScript.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FiScript.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /FiScript.xcworkspace/xcuserdata/Morten.xcuserdatad/IDEFindNavigatorScopes.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FiScript.xcworkspace/xcuserdata/Morten.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript.xcworkspace/xcuserdata/Morten.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FiScript/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FiScript 4 | // 5 | // Created by Mortennn on 19/10/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import Common 11 | import MMWormhole 12 | 13 | @NSApplicationMain 14 | class AppDelegate: NSObject, NSApplicationDelegate, DM_SUUpdaterDelegate { 15 | 16 | func applicationDidFinishLaunching(_ notification: Notification) { 17 | 18 | #if DEBUG 19 | // Preferences.sharedInstance.hadFirstRun = false 20 | // Actions.DeleteAllActionsData() 21 | // exit(0) 22 | #endif 23 | 24 | HelperFunctions.launchHelperApplication() 25 | 26 | DevMateKit.sendTrackingReport(nil, delegate: nil) 27 | 28 | // Issues 29 | DevMateKit.setupIssuesController(nil, reportingUnhandledIssues: true) 30 | 31 | // Updates 32 | DM_SUUpdater.shared().delegate = self 33 | 34 | } 35 | 36 | func updaterShouldPromptForPermissionToCheck(forUpdates updater: DM_SUUpdater) -> Bool { 37 | return true 38 | } 39 | 40 | func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 41 | return true 42 | } 43 | 44 | @IBAction func showFeedbackDialog(sender: AnyObject?) { 45 | DevMateKit.showFeedbackDialog(nil, in: DMFeedbackMode.independentMode) 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /FiScript/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 | } -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScript/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png -------------------------------------------------------------------------------- /FiScript/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /FiScript/DevMateKit-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // DevMateKit-Bridging-Header.h 3 | // FiScript 4 | // 5 | // Created by Mortennn on 28/03/2018. 6 | // Copyright © 2018 Mortennn. All rights reserved. 7 | // 8 | 9 | #ifndef DevMateKit_Bridging_Header_h 10 | #define DevMateKit_Bridging_Header_h 11 | 12 | #import 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /FiScript/FiScript.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.application-groups 8 | 9 | group.Mortennn.FiScript 10 | 11 | com.apple.security.files.user-selected.read-only 12 | 13 | com.apple.security.network.client 14 | 15 | com.apple.security.network.server 16 | 17 | com.apple.security.temporary-exception.files.home-relative-path.read-write 18 | 19 | / 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FiScript/GeneralViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GeneralViewController.swift 3 | // FiScript 4 | // 5 | // Created by Mortennn on 31/10/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import Common 11 | import MMWormhole 12 | 13 | class GeneralViewController: NSViewController { 14 | 15 | @IBOutlet weak var tableView: NSTableView! 16 | @IBOutlet weak var pathColumn: NSTableColumn! 17 | 18 | let preferences = Preferences.sharedInstance 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | 23 | tableView.delegate = self 24 | tableView.dataSource = self 25 | 26 | tableView.target = self 27 | 28 | } 29 | 30 | override func viewDidAppear() { 31 | super.viewDidAppear() 32 | 33 | if preferences.hadFirstRun == false { 34 | preferences.hadFirstRun = true 35 | 36 | DefaultActions.saveDefaultActions() 37 | 38 | NotificationCenter.default.post(name: NSNotification.Name(rawValue: "load"), object: nil) 39 | 40 | // MARK: - alert for making sure the user activates the extension 41 | #if !DEBUG 42 | let a = NSAlert() 43 | a.messageText = "Please Enable FiScript in Finder" 44 | a.informativeText = "FiScript needs to be enabled in Finder to work properly. You can always deactivate FiScript under System Preferences.app > Extensions" 45 | a.addButton(withTitle: "Enable FiScript") 46 | a.addButton(withTitle: "Cancel") 47 | a.alertStyle = .warning 48 | 49 | a.beginSheetModal(for: self.view.window!, completionHandler: { (modalResponse) -> Void in 50 | if modalResponse == NSApplication.ModalResponse.alertFirstButtonReturn { 51 | 52 | HelperFunctions.launchHelperApplication() 53 | let wormhole = MMWormhole(applicationGroupIdentifier: GlobalVariables.sharedContainerID.rawValue, optionalDirectory: "wormhole") 54 | wormhole.passMessageObject(NSString(string: "activateAppInPreferences"), identifier: "activateAppInPreferences") 55 | 56 | } 57 | }) 58 | #endif 59 | } 60 | 61 | } 62 | 63 | @IBAction func addRowTapped(_ sender: Any) { 64 | let dialog = NSOpenPanel() 65 | 66 | dialog.title = "Choose a directory where the FiScript should operate" 67 | dialog.showsResizeIndicator = true 68 | dialog.showsHiddenFiles = false 69 | dialog.canChooseDirectories = true 70 | dialog.canCreateDirectories = true 71 | dialog.canChooseFiles = false 72 | dialog.allowsMultipleSelection = false 73 | 74 | if dialog.runModal() == NSApplication.ModalResponse.OK { 75 | let result = dialog.url // Pathname of the file 76 | 77 | if result != nil { 78 | 79 | let path = result!.path 80 | 81 | preferences.pathsToAllowedDirectories.append(URL(string: path)!) 82 | tableView.reloadData() 83 | 84 | sendUpdatePathsToAllowedDirectories() 85 | 86 | } 87 | } else { 88 | // User clicked on "Cancel" 89 | return 90 | } 91 | 92 | } 93 | 94 | @IBAction func removeRowTapped(_ sender: Any) { 95 | let row = tableView.selectedRow 96 | 97 | if row == -1 { 98 | return 99 | } 100 | 101 | tableView.beginUpdates() 102 | 103 | preferences.pathsToAllowedDirectories.remove(at: row) 104 | tableView.removeRows(at: IndexSet(integer: row), withAnimation: .slideUp) 105 | 106 | tableView.endUpdates() 107 | 108 | sendUpdatePathsToAllowedDirectories() 109 | 110 | } 111 | 112 | 113 | @IBAction func OpenSettingsTapped(_ sender: Any) { 114 | NSWorkspace.shared.open(URL(fileURLWithPath: "/System/Library/PreferencePanes/Extensions.prefPane")) 115 | } 116 | 117 | @IBAction func RestoreDefaultActions(_ sender: Any) { 118 | let context = persistentContainer.viewContext 119 | let request = Actions.createFetchRequest() 120 | let countOfDefaultActions = Int64(DefaultActions.numberOfDefaultActions) 121 | let idOfOldDefaultActions = stride(from: 0, to: countOfDefaultActions.toInt(), by: 1) 122 | 123 | do { 124 | var actions = try context.fetch(request) 125 | 126 | // removing old default actions 127 | for action in actions { 128 | if idOfOldDefaultActions.contains(action.id.toInt()) { 129 | context.delete(action as NSManagedObject) 130 | } 131 | } 132 | 133 | actions = actions.filter { !idOfOldDefaultActions.contains($0.id.toInt()) } 134 | 135 | // incrementing the index of the current actions, to make space to the Default Actions 136 | for (index, action) in actions.enumerated() { 137 | action.index = Int64(index + countOfDefaultActions.toInt()) 138 | } 139 | 140 | try context.save() 141 | } catch { 142 | fatalError() 143 | } 144 | 145 | DefaultActions.saveDefaultActions() 146 | 147 | let a = NSAlert() 148 | a.messageText = "Warning" 149 | a.informativeText = "Are you sure you want to restore the default actions? This will reset any changes to the default actions, but your actions will of course remain the same. The app has to restart to apply the changes." 150 | a.addButton(withTitle: "Restart") 151 | a.addButton(withTitle: "Cancel") 152 | a.alertStyle = .warning 153 | 154 | a.beginSheetModal(for: self.view.window!, completionHandler: { (modalResponse) -> Void in 155 | if modalResponse == NSApplication.ModalResponse.alertFirstButtonReturn { 156 | let url = URL(fileURLWithPath: Bundle.main.resourcePath!) 157 | let path = url.deletingLastPathComponent().deletingLastPathComponent().absoluteString 158 | let task = Process() 159 | task.launchPath = "/usr/bin/open" 160 | task.arguments = [path] 161 | task.launch() 162 | exit(0) 163 | } 164 | }) 165 | } 166 | 167 | } 168 | 169 | extension GeneralViewController { 170 | 171 | fileprivate func sendUpdatePathsToAllowedDirectories() { 172 | 173 | let wormhole = MMWormhole(applicationGroupIdentifier: GlobalVariables.sharedContainerID.rawValue, optionalDirectory: "wormhole") 174 | wormhole.passMessageObject(NSString(string: "updatePathsToAllowedDirectories"), identifier: "pathsToAllowedDirectoriesHasChanged") 175 | } 176 | 177 | 178 | } 179 | 180 | extension GeneralViewController: NSTableViewDataSource { 181 | 182 | func numberOfRows(in tableView: NSTableView) -> Int { 183 | return preferences.pathsToAllowedDirectories.count 184 | } 185 | 186 | } 187 | 188 | extension GeneralViewController: NSTableViewDelegate { 189 | 190 | fileprivate enum CellIdentifiers { 191 | static let PathCell = "PathCellID" 192 | } 193 | 194 | // Initializes the tableView 195 | func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { 196 | 197 | // checks if the tableView is 'Enabled' 198 | if tableColumn == tableView.tableColumns[0] { 199 | 200 | guard let cell = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: CellIdentifiers.PathCell), owner: nil) as? NSTableCellView else { 201 | print("there was an error here: line 86 GeneralViewController") 202 | return nil 203 | } 204 | 205 | if preferences.pathsToAllowedDirectories.count != 0 { 206 | let item = preferences.pathsToAllowedDirectories[row] 207 | cell.textField?.stringValue = item.path 208 | 209 | // adds file:// to the url 210 | let filePathUrl = URL(fileURLWithPath: item.absoluteString) 211 | 212 | // check witch type the file is and adds a image to the cell 213 | if filePathUrl.absoluteString.range(of: "/Volumes/") != nil { 214 | cell.imageView?.image = NSImage(named: NSImage.Name("ExternalDrive")) 215 | } else if filePathUrl.isDirectory { 216 | cell.imageView?.image = NSImage(named: NSImage.Name("NSFolder")) 217 | } 218 | 219 | } 220 | 221 | return cell 222 | } 223 | return nil 224 | } 225 | } 226 | 227 | 228 | 229 | 230 | -------------------------------------------------------------------------------- /FiScript/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.1 21 | CFBundleURLTypes 22 | 23 | 24 | CFBundleURLName 25 | com.devmate.ActivationScheme 26 | CFBundleURLSchemes 27 | 28 | FiScript 29 | 30 | 31 | 32 | CFBundleVersion 33 | 1 34 | LSApplicationCategoryType 35 | public.app-category.utilities 36 | LSMinimumSystemVersion 37 | $(MACOSX_DEPLOYMENT_TARGET) 38 | NSHumanReadableCopyright 39 | Copyright © 2018 Mortennn. All rights reserved. 40 | NSMainStoryboardFile 41 | Main 42 | NSPrincipalClass 43 | NSApplication 44 | SUPublicDSAKeyFile 45 | dsa_pub.pem 46 | SUUpdaterIsInTestMode 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /FiScript/MenuViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MenuViewController.swift 3 | // FiScript 4 | // 5 | // Created by Mortennn on 31/10/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import Common 11 | 12 | class MenuViewController: NSViewController { 13 | 14 | @IBOutlet weak var tableView: NSTableView! 15 | 16 | @IBOutlet weak var enableColumn: NSTableColumn! 17 | @IBOutlet weak var actionColumn: NSTableColumn! 18 | @IBOutlet var contextMenu: NSMenu! 19 | 20 | @IBOutlet var descriptionTextView: NSTextView! 21 | 22 | let preferences = Preferences.sharedInstance 23 | 24 | override func viewDidLoad() { 25 | super.viewDidLoad() 26 | 27 | // listeninig for load request 28 | NotificationCenter.default.addObserver(self, selector: #selector(loadTableView), name: NSNotification.Name(rawValue: "load"), object: nil) 29 | NotificationCenter.default.addObserver(self, selector: #selector(insertNewRow), name: NSNotification.Name(rawValue: "insertNewRow"), object: nil) 30 | 31 | tableView.delegate = self 32 | tableView.dataSource = self 33 | 34 | tableView.target = self 35 | 36 | tableView.doubleAction = #selector(handleDoubleClick) 37 | 38 | tableView.registerForDraggedTypes([NSPasteboard.PasteboardType(rawValue: "private.table-row")]) 39 | 40 | descriptionTextView.textStorage?.mutableString.setString("") 41 | 42 | } 43 | 44 | override func validateMenuItem(_ menuItem: NSMenuItem) -> Bool { 45 | return self.tableView.clickedRow != -1 46 | } 47 | 48 | fileprivate func fetchActions() -> [Actions] { 49 | // Fetching actions for the tableview 50 | let context = persistentContainer.viewContext 51 | let request = Actions.createFetchRequest() 52 | 53 | do { 54 | let actions = try context.fetch(request) 55 | return actions 56 | } catch { 57 | fatalError() 58 | } 59 | } 60 | 61 | @objc func loadTableView() { 62 | self.tableView.reloadData() 63 | } 64 | 65 | @objc func insertNewRow() { 66 | self.tableView.beginUpdates() 67 | 68 | let actions = fetchActions() 69 | 70 | guard let numberOfRows = self.tableView?.numberOfRows else { 71 | fatalError() 72 | } 73 | 74 | let newAction = actions.filter { $0.index.toInt() == numberOfRows }.first! 75 | self.tableView.insertRows(at: IndexSet(integer: newAction.index.toInt()), withAnimation: .slideDown) 76 | 77 | self.tableView.endUpdates() 78 | } 79 | 80 | @objc func handleDoubleClick() { 81 | // checking if the double click was performed on a row 82 | if tableView.selectedRow != -1 { 83 | self.performSegue(withIdentifier: NSStoryboardSegue.Identifier("DoubleClick"), sender: nil) 84 | } 85 | } 86 | 87 | override func prepare(for segue: NSStoryboardSegue, sender: Any?) { 88 | if segue.identifier!.rawValue == "DoubleClick" { 89 | let destVC = segue.destinationController as! ModifyActionVC 90 | let clickedRow = self.tableView.clickedRow 91 | let selectedRow = self.tableView.selectedRow 92 | let row:Int = clickedRow == -1 ? selectedRow : clickedRow 93 | destVC.index = row 94 | } 95 | } 96 | 97 | @IBAction func addScriptTapped(_ sender: Any) { 98 | self.performSegue(withIdentifier: NSStoryboardSegue.Identifier("ModifyActionVC"), sender: nil) 99 | } 100 | 101 | @IBAction func deleteScriptTapped(_ sender: Any) { 102 | 103 | // if no path is selected, just return 104 | if self.tableView.selectedRow == -1 { 105 | return 106 | } 107 | 108 | // remove the deleted item from the model 109 | let row = tableView.selectedRow 110 | let context = persistentContainer.viewContext 111 | let request = Actions.createFetchRequest() 112 | request.predicate = NSPredicate(format: "index == \(row)") 113 | 114 | do { 115 | let action = try context.fetch(request).first! 116 | context.delete(action as NSManagedObject) 117 | 118 | try context.save() 119 | } catch { 120 | fatalError() 121 | } 122 | 123 | // remove the deleted item from the `NSTableView` 124 | self.tableView.removeRows(at: [row], withAnimation: .effectFade) 125 | 126 | saveActionIndexes() 127 | 128 | } 129 | 130 | @IBAction func EditTapped(_ sender: NSMenuItem) { 131 | self.performSegue(withIdentifier: NSStoryboardSegue.Identifier("DoubleClick"), sender: nil) 132 | } 133 | 134 | @IBAction func RemoveTapped(_ sender: NSMenuItem) { 135 | // if no path is selected, just return 136 | if self.tableView.clickedRow == -1 { 137 | return 138 | } 139 | 140 | // remove the deleted item from the model 141 | let row = tableView.clickedRow 142 | let context = persistentContainer.viewContext 143 | let request = Actions.createFetchRequest() 144 | request.predicate = NSPredicate(format: "index == \(row)") 145 | 146 | do { 147 | let action = try context.fetch(request).first! 148 | context.delete(action as NSManagedObject) 149 | 150 | try context.save() 151 | } catch { 152 | fatalError() 153 | } 154 | 155 | // remove the deleted item from the `NSTableView` 156 | self.tableView.removeRows(at: [row], withAnimation: .effectFade) 157 | 158 | saveActionIndexes() 159 | } 160 | 161 | // Saving new indexes 162 | fileprivate func saveActionIndexes() { 163 | guard let numberOfRows = enableColumn.tableView?.numberOfRows else { 164 | fatalError() 165 | } 166 | 167 | let rowIndexStride = stride(from: 0, to: numberOfRows, by: 1) 168 | 169 | for row in rowIndexStride { 170 | guard let cell = tableView.view(atColumn: 1, row: row, makeIfNecessary: false)?.subviews, 171 | let textfield = cell[1] as? NSTextField else { 172 | fatalError() 173 | } 174 | 175 | let title = textfield.stringValue 176 | let context = persistentContainer.viewContext 177 | let request = Actions.createFetchRequest() 178 | request.predicate = NSPredicate(format: "title == \"\(title)\"") 179 | 180 | do { 181 | let action = try context.fetch(request).first! 182 | action.index = Int64(row) 183 | try context.save() 184 | } catch { 185 | fatalError() 186 | } 187 | } 188 | } 189 | } 190 | 191 | extension MenuViewController: NSTableViewDataSource { 192 | 193 | func numberOfRows(in tableView: NSTableView) -> Int { 194 | let actions = fetchActions() 195 | return actions.count 196 | } 197 | 198 | } 199 | 200 | extension MenuViewController: NSTableViewDelegate { 201 | 202 | fileprivate enum CellIdentifiers { 203 | static let EnableCell = "EnableCellID" 204 | static let ActionCell = "ActionCellID" 205 | } 206 | 207 | @objc func checkBoxTapped() { 208 | guard let numberOfRows = enableColumn.tableView?.numberOfRows else { 209 | fatalError() 210 | } 211 | 212 | let rowsStride = stride(from: 0, to: numberOfRows, by: 1) 213 | 214 | for row in rowsStride { 215 | guard let firstColumnAtRow = tableView.view(atColumn: 0, row: row, makeIfNecessary: false), 216 | let checkbox = firstColumnAtRow.subviews.first as? NSButton else { 217 | return 218 | } 219 | 220 | // matches the actions by index and then saves the change 221 | let context = persistentContainer.viewContext 222 | let request = Actions.createFetchRequest() 223 | request.predicate = NSPredicate(format: "index == \"\(row)\"") 224 | 225 | do { 226 | let action = try context.fetch(request).first! 227 | action.enabled = (checkbox.isOn) 228 | try context.save() 229 | } catch { 230 | fatalError() 231 | } 232 | } 233 | } 234 | 235 | func tableViewSelectionDidChange(_ notification: Notification) { 236 | 237 | if tableView.selectedRow == -1 { 238 | descriptionTextView.textStorage?.mutableString.setString("") 239 | return 240 | } 241 | 242 | let actions = fetchActions() 243 | 244 | actions.forEach { (action) in 245 | 246 | let index = action.index.toInt() 247 | let description = action.actionDescription ?? "" 248 | 249 | if index == tableView.selectedRow { 250 | descriptionTextView.textStorage!.mutableString.setString(description) 251 | } 252 | } 253 | } 254 | 255 | // Initializes the tableView 256 | func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { 257 | 258 | let actions = fetchActions() 259 | 260 | guard let action = actions.filter({ $0.index.toInt() == row }).first else { 261 | fatalError() 262 | } 263 | 264 | // checks if the tableView is Enable 265 | if tableColumn == tableView.tableColumns[0] { 266 | 267 | if let cell = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: CellIdentifiers.EnableCell), owner: nil) as? NSTableCellView { 268 | // getting the first and only element which is the checkbox button 269 | let checkBox = cell.subviews.first as! NSButton 270 | checkBox.target = self 271 | checkBox.action = #selector(checkBoxTapped) 272 | 273 | if action.enabled { 274 | checkBox.state = .on 275 | } else { 276 | checkBox.state = .off 277 | } 278 | 279 | checkBox.bezelStyle = .roundRect 280 | 281 | return cell 282 | } 283 | 284 | // checks if the tableView is Action 285 | } else if tableColumn == tableView.tableColumns[1] { 286 | 287 | if let cell = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: CellIdentifiers.ActionCell), owner: nil) as? NSTableCellView { 288 | cell.textField?.stringValue = action.title 289 | if let itemImage = action.imageData { 290 | let itemImageData = itemImage as Data 291 | cell.imageView!.image = NSImage(data: itemImageData) 292 | } 293 | 294 | return cell 295 | } 296 | 297 | } 298 | 299 | return nil 300 | } 301 | 302 | // MARK: TableView dragging ended 303 | func tableView(_ tableView: NSTableView, draggingSession session: NSDraggingSession, endedAt screenPoint: NSPoint, operation: NSDragOperation) { 304 | saveActionIndexes() 305 | } 306 | 307 | // MARK: functions for tableview dragging 308 | func tableView(_ tableView: NSTableView, pasteboardWriterForRow row: Int) -> NSPasteboardWriting? { 309 | let item = NSPasteboardItem() 310 | item.setString(String(row), forType: NSPasteboard.PasteboardType(rawValue: "private.table-row")) 311 | return item 312 | } 313 | 314 | func tableView(_ tableView: NSTableView, validateDrop info: NSDraggingInfo, proposedRow row: Int, proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation { 315 | if dropOperation == .above { 316 | return .move 317 | } 318 | return [] 319 | } 320 | 321 | func tableView(_ tableView: NSTableView, acceptDrop info: NSDraggingInfo, row: Int, dropOperation: NSTableView.DropOperation) -> Bool { 322 | 323 | var oldIndexes = [Int]() 324 | info.enumerateDraggingItems(options: [], for: tableView, classes: [NSPasteboardItem.self], searchOptions: [:]) { arg0,arg1,arg2 in 325 | if let str = (arg0.item as! NSPasteboardItem).string(forType: NSPasteboard.PasteboardType(rawValue: "private.table-row")), let index = Int(str) { 326 | oldIndexes.append(index) 327 | } 328 | } 329 | 330 | var oldIndexOffset = 0 331 | var newIndexOffset = 0 332 | 333 | tableView.beginUpdates() 334 | for oldIndex in oldIndexes { 335 | if oldIndex < row { 336 | tableView.moveRow(at: oldIndex + oldIndexOffset, to: row - 1) 337 | oldIndexOffset -= 1 338 | } else { 339 | tableView.moveRow(at: oldIndex, to: row + newIndexOffset) 340 | newIndexOffset += 1 341 | } 342 | } 343 | tableView.endUpdates() 344 | 345 | return true 346 | } 347 | } 348 | 349 | 350 | 351 | 352 | -------------------------------------------------------------------------------- /FiScript/ModifyActionVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ModifyActionVC.swift 3 | // FiScript 4 | // 5 | // Created by Mortennn on 23/11/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import CoreData 11 | import Common 12 | 13 | class ModifyActionVC: NSViewController { 14 | 15 | var index:Int? 16 | var action:Actions! 17 | 18 | @IBOutlet weak var AcceptedFileTypesTextField: NSTokenField! 19 | @IBOutlet weak var NameTextField: NSTextField! 20 | @IBOutlet weak var DescriptionTextView: NSTextView! 21 | @IBOutlet weak var ShellComboBox: NSComboBox! 22 | @IBOutlet weak var ScriptTextView: NSTextView! 23 | @IBOutlet weak var UseOnFilesCheckbox: NSButton! 24 | @IBOutlet weak var UseOnDirectoriesCheckbox: NSButton! 25 | @IBOutlet weak var ConfirmBeforeExecutingButton: NSButton! 26 | @IBOutlet weak var GetNotificationWhenExecusionHasFinishedButton: NSButton! 27 | @IBOutlet weak var ActionThumbnailImageView: NSImageView! 28 | 29 | override func viewWillAppear() { 30 | super.viewWillAppear() 31 | 32 | // Checking whether an action should be updated or created 33 | guard let unwrappedIndex = index else { 34 | return 35 | } 36 | 37 | let context = persistentContainer.viewContext 38 | let request = Actions.createFetchRequest() 39 | request.predicate = NSPredicate(format: "index == \(unwrappedIndex)") 40 | 41 | do { 42 | action = try context.fetch(request).first! 43 | } catch { 44 | fatalError("Coudn't fetch data, index doesn't exist") 45 | } 46 | 47 | NameTextField.stringValue = action.title 48 | DescriptionTextView.textStorage?.mutableString.setString(action.actionDescription ?? "") 49 | ShellComboBox.stringValue = action.shell 50 | ScriptTextView.textStorage?.mutableString.setString(action.script ?? "") 51 | 52 | UseOnFilesCheckbox.state = action.useOnFiles.stateValue() 53 | UseOnDirectoriesCheckbox.state = action.useOnDirectories.stateValue() 54 | ConfirmBeforeExecutingButton.state = action.confirmBeforeExecuting.stateValue() 55 | GetNotificationWhenExecusionHasFinishedButton.state = action.getNotificationWhenExecusionHasFinished.stateValue() 56 | 57 | if let acceptedFileTypes = action.acceptedFileTypes { 58 | if acceptedFileTypes.first != "" { 59 | AcceptedFileTypesTextField.objectValue = acceptedFileTypes 60 | } 61 | } 62 | 63 | if let imageNSData = action.imageData { 64 | let imageData = imageNSData as Data 65 | ActionThumbnailImageView.image = NSImage(data: imageData) 66 | } 67 | 68 | } 69 | 70 | @IBAction func saveTapped(_ sender: Any) { 71 | 72 | // Checking if all required fields are filled 73 | if NameTextField.stringValue.isEmpty { displayAlert(title: "Name"); return } 74 | if ShellComboBox.stringValue.isEmpty { displayAlert(title: "Shell"); return } 75 | if ScriptTextView.textStorage!.string.isEmpty { displayAlert(title: "Script"); return } 76 | 77 | let context = persistentContainer.viewContext 78 | let request = Actions.createFetchRequest() 79 | 80 | // an action should be updated 81 | if let unwrappedIndex = index { 82 | request.predicate = NSPredicate(format: "index == \(unwrappedIndex)") 83 | 84 | do { 85 | let action = try context.fetch(request).first! 86 | 87 | var imageData:NSData? = nil 88 | 89 | if let image = ActionThumbnailImageView.image { 90 | imageData = NSData(data: image.png!) 91 | } 92 | 93 | action.useOnFiles = UseOnFilesCheckbox.isOn 94 | action.useOnDirectories = UseOnDirectoriesCheckbox.isOn 95 | action.acceptedFileTypes = AcceptedFileTypesTextField.objectValue as? [String] 96 | action.imageData = imageData ?? nil 97 | action.shell = ShellComboBox.stringValue 98 | action.title = NameTextField.stringValue 99 | action.actionDescription = DescriptionTextView.textStorage?.string 100 | action.confirmBeforeExecuting = ConfirmBeforeExecutingButton.isOn 101 | action.getNotificationWhenExecusionHasFinished = GetNotificationWhenExecusionHasFinishedButton.isOn 102 | action.script = ScriptTextView.textStorage?.string 103 | 104 | try context.save() 105 | 106 | NotificationCenter.default.post(name: NSNotification.Name(rawValue: "load"), object: nil) 107 | 108 | } catch { 109 | fatalError("couldn't get action by id") 110 | } 111 | } else { 112 | // an new action should be created 113 | do { 114 | 115 | let actions = try context.fetch(request) 116 | 117 | // checking if name already exists 118 | if actions.filter({ $0.title! == NameTextField.stringValue }).count != 0 { 119 | let a = NSAlert() 120 | a.messageText = "Name already exist" 121 | a.addButton(withTitle: "OK") 122 | a.alertStyle = .critical 123 | 124 | a.beginSheetModal(for: self.view.window!, completionHandler: { (modalResponse) -> Void in 125 | if modalResponse == NSApplication.ModalResponse.alertFirstButtonReturn { 126 | return 127 | } 128 | }) 129 | 130 | return 131 | } 132 | 133 | let newAction = NSEntityDescription.insertNewObject(forEntityName: "Actions", into: context) as! Actions 134 | let actionsCount = actions.count 135 | 136 | var imageData:NSData? 137 | 138 | if let image = ActionThumbnailImageView.image { 139 | imageData = NSData(data: image.png!) 140 | } 141 | 142 | newAction.id = Int64(actionsCount) 143 | newAction.index = Int64(actionsCount) 144 | newAction.acceptedFileTypes = AcceptedFileTypesTextField.objectValue as? [String] 145 | newAction.useOnFiles = UseOnFilesCheckbox.isOn 146 | newAction.useOnDirectories = UseOnDirectoriesCheckbox.isOn 147 | newAction.imageData = imageData ?? nil 148 | newAction.shell = ShellComboBox.stringValue 149 | newAction.title = NameTextField.stringValue 150 | newAction.actionDescription = DescriptionTextView.textStorage?.string 151 | newAction.confirmBeforeExecuting = ConfirmBeforeExecutingButton.isOn 152 | newAction.getNotificationWhenExecusionHasFinished = GetNotificationWhenExecusionHasFinishedButton.isOn 153 | newAction.script = ScriptTextView.textStorage?.string 154 | newAction.enabled = true 155 | 156 | try context.save() 157 | 158 | NotificationCenter.default.post(name: NSNotification.Name(rawValue: "insertNewRow"), object: nil) 159 | 160 | } catch { 161 | fatalError("couln't fetch Actions") 162 | } 163 | } 164 | 165 | 166 | self.dismissViewController(self) 167 | 168 | } 169 | 170 | @IBAction func changeThumbnailTapped(_ sender: Any) { 171 | let dialog = NSOpenPanel(); 172 | 173 | dialog.title = "Choose PNG image to be represented in the context menu"; 174 | dialog.showsResizeIndicator = true; 175 | dialog.showsHiddenFiles = false; 176 | dialog.canChooseDirectories = false; 177 | dialog.canCreateDirectories = false; 178 | dialog.canChooseFiles = true 179 | dialog.allowsMultipleSelection = false; 180 | dialog.allowedFileTypes = ["png"] 181 | 182 | if dialog.runModal() == NSApplication.ModalResponse.OK { 183 | let result = dialog.url // Pathname of the file 184 | 185 | if result != nil { 186 | 187 | let path = result!.path 188 | 189 | let image = NSImage(contentsOf: URL(fileURLWithPath: path, isDirectory: false))! 190 | let resizedImage = image.resize(width: 16, 16) 191 | ActionThumbnailImageView.image = resizedImage 192 | 193 | } 194 | } else { 195 | // User clicked on "Cancel" 196 | return 197 | } 198 | } 199 | 200 | @IBAction func cancelTapped(_ sender: Any) { 201 | self.dismissViewController(self) 202 | } 203 | 204 | func displayAlert(title:String) { 205 | let a = NSAlert() 206 | a.messageText = "The \(title) field is required" 207 | a.addButton(withTitle: "OK") 208 | a.alertStyle = .warning 209 | 210 | a.beginSheetModal(for: self.view.window!, completionHandler: { (modalResponse) -> Void in 211 | if modalResponse == NSApplication.ModalResponse.alertFirstButtonReturn { 212 | return 213 | } 214 | }) 215 | } 216 | 217 | 218 | } 219 | 220 | 221 | 222 | 223 | 224 | 225 | -------------------------------------------------------------------------------- /FiScript/dsa_pub.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBtzCCASsGByqGSM44BAEwggEeAoGBAL6RG+ieI6SR7CV+euxmV9o4XSwq0cwZ 3 | bX3w6z881FWPDbx6nP02acaENGN8TYJY7QtUzBgymkBR6MvpgJ66ad/p5ncUshv+ 4 | IdLzrs+bBzsw5VWGFhWhtDNcqklYWUFnHnY/aXGvqCr2lj5a5zGf90a5R9T4qJba 5 | PP4LUb9CzUaZAhUA5cf4Mv+FhW+hOgAHG/RAsUfVGMECgYBCz365TKyslarmmCBE 6 | cZmPz2AIn0kNtn/4DtQ0m1duL0SDzGnIDhQWWmThUkV47TpEv76ly/RWV7oOTN7h 7 | fsbUDYaPIDbqOsVwy7CkWNkT3n4POilWZ7EXEjOrTNld8WKd0a72dGgTzzvgJSnH 8 | 3S/xBaNhW/KfPyIgkiHEw8vNUgOBhQACgYEAkYFeh6OJ+/0hXRDtzTBiC8JLgnsK 9 | r8NMq4FomK1iJqRFXgy+b3zYj/ifSlr7jJNUayIDikaV5F+qQzjIBvp6WdU0Y5I8 10 | jnuYQRQSi79DfA6svPWoftpZJvvLPSdGQNLSOrEq8/bKNMOaJllHb5vKd1TFYeQZ 11 | mR6HqNAj5rVadmk= 12 | -----END PUBLIC KEY----- 13 | -------------------------------------------------------------------------------- /FiScriptHelper/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FiScriptHelper 4 | // 5 | // Created by Mortennn on 17/12/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import Common 11 | import MMWormhole 12 | 13 | @NSApplicationMain 14 | class AppDelegate: NSObject, NSApplicationDelegate { 15 | 16 | let sharedUserDefaults = UserDefaults(suiteName: GlobalVariables.sharedContainerID.rawValue)! 17 | let wormhole = MMWormhole(applicationGroupIdentifier: GlobalVariables.sharedContainerID.rawValue, optionalDirectory: "wormhole") 18 | 19 | deinit { 20 | wormhole.stopListeningForMessage(withIdentifier: GlobalVariables.sharedContainerID.rawValue) 21 | } 22 | 23 | func applicationDidFinishLaunching(_ notification: Notification) { 24 | wormhole.listenForMessage(withIdentifier: "activateAppInPreferences", listener: { (message) -> Void in 25 | self.activateAppInPreferences() 26 | // NSApplication.shared.terminate(nil) 27 | }) 28 | 29 | wormhole.listenForMessage(withIdentifier: "actionPressed", listener: { (message) -> Void in 30 | 31 | let messageObject = message as AnyObject 32 | 33 | guard let messageDic = messageObject as? Dictionary, 34 | let nameOfActionData = messageDic.filter({ $0.key == "nameOfAction" }).first, 35 | let selectedItemsURLData = messageDic.filter({ $0.key == "selectedItemsURL" }).first, 36 | let nameOfAction = nameOfActionData.value as? String, 37 | let selectedItemsURL = NSKeyedUnarchiver.unarchiveObject(with: selectedItemsURLData.value as! Data) as? [URL] else { 38 | // helper application couldn't execute action 39 | fatalError() 40 | } 41 | 42 | var action:Actions? 43 | 44 | let context = persistentContainer.viewContext 45 | let request = Actions.createFetchRequest() 46 | request.predicate = NSPredicate(format: "title == \"\(nameOfAction)\"") 47 | 48 | do { 49 | action = try context.fetch(request).first! 50 | } catch { 51 | fatalError() 52 | } 53 | 54 | func executeAction() { 55 | 56 | guard var script = action?.script, 57 | let shell = action?.shell else { 58 | fatalError() 59 | } 60 | 61 | // execute the script on each of the selected files/directories 62 | for url in selectedItemsURL { 63 | 64 | // replacing the references to filenames 65 | guard let dir = Bundle.main.resourceURL else { 66 | fatalError("Couldn't locate resource directory") 67 | } 68 | 69 | // getting the current directory path 70 | var currentDirectory: String { 71 | get { 72 | if url.isFile() { 73 | return url.deletingLastPathComponent().path 74 | } else { 75 | return url.path 76 | } 77 | } 78 | } 79 | 80 | let tmpScript = script.replacingOccurrences(of: "$PATH", with: "\"\(url.path)\"") 81 | let scriptURL = dir.appendingPathComponent("tmp.sh") 82 | var newScript = "" 83 | newScript.append("#!\(shell)") 84 | newScript.append("\n") 85 | newScript.append(tmpScript) 86 | 87 | guard let newScriptData = newScript.data(using: .utf8) else { 88 | fatalError("can't convert script to data") 89 | } 90 | 91 | // give script executable permission 92 | var attributes = [FileAttributeKey : Any]() 93 | attributes[.posixPermissions] = 0o777 94 | FileManager.default.createFile(atPath: scriptURL.path, contents: newScriptData, attributes: attributes) 95 | 96 | // execute script 97 | let pipe = Pipe() 98 | let process = Process() 99 | process.launchPath = scriptURL.path 100 | process.currentDirectoryPath = currentDirectory 101 | process.standardOutput = pipe 102 | process.launch() 103 | process.waitUntilExit() 104 | 105 | // deleting the script 106 | do { 107 | try FileManager.default.removeItem(at: scriptURL) 108 | } catch { 109 | fatalError("Couldn't delete the script") 110 | } 111 | } 112 | 113 | if action!.getNotificationWhenExecusionHasFinished { 114 | self.displayNotification(title: "Action has finished!", body: "\(action!.title!) has finished!") 115 | } 116 | } 117 | 118 | // checking if the action should be confirmed 119 | if action!.confirmBeforeExecuting { 120 | let shouldContinue = self.confirmExecution(title: "Warning", body: "Are you sure you want to execute \(action!.title!)?") 121 | if shouldContinue { executeAction() } 122 | } else { 123 | executeAction() 124 | } 125 | 126 | // NSApplication.shared.terminate(nil) 127 | }) 128 | 129 | } 130 | 131 | func confirmExecution(title: String, body: String) -> Bool { 132 | let alert = NSAlert() 133 | alert.messageText = title 134 | alert.informativeText = body 135 | alert.alertStyle = .critical 136 | alert.addButton(withTitle: "Yes") 137 | alert.addButton(withTitle: "No") 138 | alert.window.level = .modalPanel 139 | return alert.runModal() == .alertFirstButtonReturn 140 | } 141 | 142 | func displayNotification(title:String, body:String) { 143 | let notification = NSUserNotification() 144 | notification.title = title 145 | notification.informativeText = body 146 | notification.soundName = NSUserNotificationDefaultSoundName 147 | NSUserNotificationCenter.default.deliver(notification) 148 | } 149 | 150 | fileprivate func activateAppInPreferences() { 151 | let pipe = Pipe() 152 | let process = Process() 153 | process.launchPath = "/usr/bin/pluginkit" 154 | process.arguments = ["-e", "use", "-i", "com.Mortennn.FiScript.Finder-Extension"] 155 | process.standardOutput = pipe 156 | process.launch() 157 | 158 | process.waitUntilExit() 159 | 160 | } 161 | 162 | } 163 | 164 | -------------------------------------------------------------------------------- /FiScriptHelper/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 | } -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png -------------------------------------------------------------------------------- /FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/FiScriptHelper/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png -------------------------------------------------------------------------------- /FiScriptHelper/FiScriptHelper.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.Mortennn.FiScript 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FiScriptHelper/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.1 21 | CFBundleVersion 22 | 1 23 | LSBackgroundOnly 24 | 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2018 Mortennn. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Finder Extension/FinderSync.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FinderSync.swift 3 | // Finder Extension 4 | // 5 | // Created by Mortennn on 19/10/2017. 6 | // Copyright © 2017 Mortennn. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import FinderSync 11 | import Common 12 | import MMWormhole 13 | 14 | class FinderSync: FIFinderSync { 15 | 16 | let finderController = FIFinderSyncController.default() 17 | 18 | let preferences = Preferences.sharedInstance 19 | let wormhole = MMWormhole(applicationGroupIdentifier: GlobalVariables.sharedContainerID.rawValue, optionalDirectory: "wormhole") 20 | 21 | override init() { 22 | super.init() 23 | 24 | updatePathsToAllowedDirectories() 25 | 26 | wormhole.listenForMessage(withIdentifier: "pathsToAllowedDirectoriesHasChanged") { (message) in 27 | 28 | self.updatePathsToAllowedDirectories() 29 | 30 | } 31 | 32 | HelperFunctions.launchHelperApplication() 33 | 34 | } 35 | 36 | deinit { 37 | wormhole.stopListeningForMessage(withIdentifier: "pathsToAllowedDirectoriesHasChanged") 38 | } 39 | 40 | override func menu(for menuKind: FIMenuKind) -> NSMenu { 41 | 42 | updatePathsToAllowedDirectories() 43 | 44 | HelperFunctions.launchHelperApplication() 45 | 46 | // setting the selectedItemURLs to make them available to the initializeContextMenu function 47 | guard let selectedItemsURL = finderController.selectedItemURLs() else { 48 | fatalError() 49 | } 50 | 51 | let actionsToBeAppended = FinderSyncCode.getActionsToContextMenu(selectedItemsURL: selectedItemsURL) 52 | 53 | let menu = NSMenu(title: "") 54 | 55 | for action in actionsToBeAppended { 56 | let item = menu.addItem(withTitle: action.title!, action:#selector(actionHandler(sender:)), keyEquivalent: "") 57 | 58 | if let imageData = action.imageData as Data?, 59 | let image = NSImage(data: imageData) { 60 | 61 | item.image = image 62 | } 63 | } 64 | 65 | return menu 66 | 67 | } 68 | 69 | @objc func actionHandler(sender:NSMenuItem) { 70 | 71 | HelperFunctions.launchHelperApplication() 72 | 73 | guard let selectedItemsURL = finderController.selectedItemURLs() else { 74 | fatalError() 75 | } 76 | 77 | let nameOfActionToNS = NSString(string: sender.title) 78 | let urlsToData = NSKeyedArchiver.archivedData(withRootObject: selectedItemsURL) as NSCoding 79 | 80 | let messageObject:NSDictionary = ["nameOfAction" : nameOfActionToNS, "selectedItemsURL" : urlsToData] 81 | 82 | wormhole.passMessageObject(messageObject, identifier: "actionPressed") 83 | 84 | } 85 | 86 | } 87 | 88 | extension FinderSync { 89 | 90 | fileprivate func updatePathsToAllowedDirectories() { 91 | // register paths to allowed directories 92 | if preferences.pathsToAllowedDirectories.count == 0 { 93 | // watch everything by setting / as the root 94 | finderController.directoryURLs = [ URL(fileURLWithPath: "/") ] 95 | } else { 96 | 97 | preferences.pathsToAllowedDirectories.forEach { (path) in 98 | let urlAsFileUrl = URL(fileURLWithPath: path.absoluteString) 99 | finderController.directoryURLs.insert(urlAsFileUrl) 100 | } 101 | } 102 | } 103 | 104 | } 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /Finder Extension/Finder_Extension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.application-groups 8 | 9 | group.Mortennn.FiScript 10 | 11 | com.apple.security.temporary-exception.files.absolute-path.read-write 12 | 13 | / 14 | 15 | com.apple.security.temporary-exception.files.home-relative-path.read-write 16 | 17 | / 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Finder Extension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Finder Extension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0.1 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | LSUIElement 26 | 27 | NSExtension 28 | 29 | NSExtensionAttributes 30 | 31 | NSExtensionPointIdentifier 32 | com.apple.FinderSync 33 | NSExtensionPrincipalClass 34 | $(PRODUCT_MODULE_NAME).FinderSync 35 | 36 | NSHumanReadableCopyright 37 | Copyright © 2018 Mortennn. All rights reserved. 38 | NSPrincipalClass 39 | NSApplication 40 | 41 | 42 | -------------------------------------------------------------------------------- /Icons.xcassets/Atom.imageset/Atom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Atom.imageset/Atom.png -------------------------------------------------------------------------------- /Icons.xcassets/Atom.imageset/Atom@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Atom.imageset/Atom@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/Atom.imageset/Atom@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Atom.imageset/Atom@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/Atom.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Atom.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Atom@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Atom@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Icons.xcassets/CopyPath.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon_16x16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon_16x16@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon_16x16@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/CopyPath.imageset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/CopyPath.imageset/Icon_16x16.png -------------------------------------------------------------------------------- /Icons.xcassets/CopyPath.imageset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/CopyPath.imageset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/CopyPath.imageset/Icon_16x16@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/CopyPath.imageset/Icon_16x16@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/ExternalDrive.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon_16x16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon_16x16@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon_16x16@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/ExternalDrive.imageset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ExternalDrive.imageset/Icon_16x16.png -------------------------------------------------------------------------------- /Icons.xcassets/ExternalDrive.imageset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ExternalDrive.imageset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/ExternalDrive.imageset/Icon_16x16@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ExternalDrive.imageset/Icon_16x16@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/FinderIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon_32x32.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon_32x32@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon_32x32@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/FinderIcon.imageset/Icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/FinderIcon.imageset/Icon_32x32.png -------------------------------------------------------------------------------- /Icons.xcassets/FinderIcon.imageset/Icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/FinderIcon.imageset/Icon_32x32@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/FinderIcon.imageset/Icon_32x32@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/FinderIcon.imageset/Icon_32x32@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/ITerm.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon_16x16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon_16x16@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon_16x16@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/ITerm.imageset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ITerm.imageset/Icon_16x16.png -------------------------------------------------------------------------------- /Icons.xcassets/ITerm.imageset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ITerm.imageset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/ITerm.imageset/Icon_16x16@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ITerm.imageset/Icon_16x16@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/MakeExecutable.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "MakeExecutable.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "MakeExecutable@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "MakeExecutable@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/MakeExecutable.imageset/MakeExecutable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/MakeExecutable.imageset/MakeExecutable.png -------------------------------------------------------------------------------- /Icons.xcassets/MakeExecutable.imageset/MakeExecutable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/MakeExecutable.imageset/MakeExecutable@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/MakeExecutable.imageset/MakeExecutable@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/MakeExecutable.imageset/MakeExecutable@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/NewFile.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon_16x16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon_16x16@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon_16x16@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/NewFile.imageset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/NewFile.imageset/Icon_16x16.png -------------------------------------------------------------------------------- /Icons.xcassets/NewFile.imageset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/NewFile.imageset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/NewFile.imageset/Icon_16x16@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/NewFile.imageset/Icon_16x16@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/ResizeOSXIcons.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon_16x16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon_16x16@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon_16x16@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/ResizeOSXIcons.imageset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ResizeOSXIcons.imageset/Icon_16x16.png -------------------------------------------------------------------------------- /Icons.xcassets/ResizeOSXIcons.imageset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ResizeOSXIcons.imageset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/ResizeOSXIcons.imageset/Icon_16x16@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/ResizeOSXIcons.imageset/Icon_16x16@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/RunScript.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "RunScript.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "RunScript@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "RunScript@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/RunScript.imageset/RunScript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/RunScript.imageset/RunScript.png -------------------------------------------------------------------------------- /Icons.xcassets/RunScript.imageset/RunScript@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/RunScript.imageset/RunScript@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/RunScript.imageset/RunScript@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/RunScript.imageset/RunScript@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/Sublime3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Sublime3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Sublime3@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Sublime3@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/Sublime3.imageset/Sublime3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Sublime3.imageset/Sublime3.png -------------------------------------------------------------------------------- /Icons.xcassets/Sublime3.imageset/Sublime3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Sublime3.imageset/Sublime3@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/Sublime3.imageset/Sublime3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Sublime3.imageset/Sublime3@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/Terminal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon_16x16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon_16x16@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon_16x16@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/Terminal.imageset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Terminal.imageset/Icon_16x16.png -------------------------------------------------------------------------------- /Icons.xcassets/Terminal.imageset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Terminal.imageset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/Terminal.imageset/Icon_16x16@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/Terminal.imageset/Icon_16x16@3x.png -------------------------------------------------------------------------------- /Icons.xcassets/VSCode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "VSCode.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "VSCode@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "VSCode@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Icons.xcassets/VSCode.imageset/VSCode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/VSCode.imageset/VSCode.png -------------------------------------------------------------------------------- /Icons.xcassets/VSCode.imageset/VSCode@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/VSCode.imageset/VSCode@2x.png -------------------------------------------------------------------------------- /Icons.xcassets/VSCode.imageset/VSCode@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Icons.xcassets/VSCode.imageset/VSCode@3x.png -------------------------------------------------------------------------------- /Images/landingNoText.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Images/landingNoText.png -------------------------------------------------------------------------------- /Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mortennn/FiScript/4f2175b356314f7fe0b4397deb064e839ba53a07/Images/logo.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Mortennn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | # Uncomment the next line to define a global platform for your project 4 | platform :osx, '10.12' 5 | 6 | #target 'Common' do 7 | # # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 8 | ## use_frameworks! 9 | # 10 | # # Pods for Common 11 | # 12 | #end 13 | 14 | target 'FiScript' do 15 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 16 | use_frameworks! 17 | 18 | # Pods for FiScript 19 | pod 'MMWormhole', '~> 2.0.0' 20 | pod 'DevMateKit', '~> 1.8' 21 | 22 | end 23 | 24 | target 'FiScriptHelper' do 25 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 26 | use_frameworks! 27 | 28 | # Pods for FiScriptHelper 29 | pod 'MMWormhole', '~> 2.0.0' 30 | 31 | end 32 | 33 | target 'Finder Extension' do 34 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 35 | use_frameworks! 36 | 37 | # Pods for Finder Extension 38 | pod 'MMWormhole', '~> 2.0.0' 39 | 40 | end 41 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - DevMateKit (1.8.2) 3 | - MMWormhole (2.0.0): 4 | - MMWormhole/Core (= 2.0.0) 5 | - MMWormhole/Core (2.0.0) 6 | 7 | DEPENDENCIES: 8 | - DevMateKit (~> 1.8) 9 | - MMWormhole (~> 2.0.0) 10 | 11 | SPEC REPOS: 12 | https://github.com/cocoapods/specs.git: 13 | - DevMateKit 14 | - MMWormhole 15 | 16 | SPEC CHECKSUMS: 17 | DevMateKit: e0bf74589bbbeb0a7b469a75b88667e00e109474 18 | MMWormhole: 0cd3fd35a9118b2e2d762b499f54eeaace0be791 19 | 20 | PODFILE CHECKSUM: 99dfd12d2dbfa714ee7cdca2e6fe3165f056f9b0 21 | 22 | COCOAPODS: 1.5.3 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 |

5 | 6 | download 7 | 8 | 9 | platform 10 | 11 | 12 | systemrequirements 13 | 14 | 15 | code 16 | 17 | 18 | license 19 | 20 |

21 | 22 | ## 🚀 FiScript 23 |

24 | desktop-image 25 |

26 | FiScript is an open source application for MacOS, released under the MIT License. FiScript lets you execute custom scripts on your files/folders from the context menu in Finder. 27 | 28 | ###### You might also like [Dozer](https://github.com/Mortennn/Dozer), which lets you hide menubar items to give your Mac a cleaner look. 29 | 30 | ## ⚙️ Install 31 | Easiest way by using [Homebrew Cask](https://caskroom.github.io/): 32 | 33 | brew cask install https://raw.githubusercontent.com/Mortennn/FiScript/master/fiscript.rb 34 | Manual: 35 | 36 | 1. [Download](https://github.com/Mortennn/FiScript/releases/download/v1.0.1/FiScript.zip), open, and drag the app to the Applications folder. 37 | 2. Since FiScript is not signed; go to **Preferences > Security & Privacy > General > allow FiScript**. 38 | 3. If prompted by allowing "FiScript Helper", please accept, otherwise FiScript won't work properly. 39 | 40 | **If FiScript does not appear in the Finder menu after installation, you might need to restart Finder (Apple Logo > Force Quit... > Finder > Relaunch)** 41 | 42 | ## Requirements 43 | macOS version >= 10.12 44 | 45 | ## License 46 | 47 | FiScript is released under the terms of [MIT License](http://opensource.org/licenses/MIT). 48 | 49 | ## Contributing 50 | 51 | Please suggest enhancements as new issue reports on this repository. Also, feel free to share your own scripts, so others can make use of it😀 52 | -------------------------------------------------------------------------------- /fiscript.rb: -------------------------------------------------------------------------------- 1 | cask 'fiscript' do 2 | version '1.0.1' 3 | sha256 'a622526479338a151c42f57b04717902555b33aad06abba249c8a4bb0554a0ed' 4 | 5 | url 'https://github.com/Mortennn/FiScript/releases/download/v1.0.1/FiScript.zip' 6 | name 'FiScript' 7 | homepage 'https://github.com/Mortennn/FiScript' 8 | 9 | depends_on macos: '>= :sierra' 10 | 11 | app 'FiScript.app' 12 | 13 | zap trash: ['~/Library/Application Scripts/com.Mortennn.FiScript', 14 | '~/Library/Application Scripts/com.Mortennn.FiScript.Finder-Extension', 15 | '~/Library/Containers/com.Mortennn.FiScript', 16 | '~/Library/Containers/com.Mortennn.FiScript.Finder-Extension', 17 | '~/Library/Group Containers/group.Mortennn.FiScript', 18 | '~/Library/Group Containers/sharedContainerID.container', 19 | '~/Library/Group Containers/group.Mortennn.FiScript'] 20 | end 21 | --------------------------------------------------------------------------------