├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report_issue_template.md │ └── feature_request_issue_template.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── LICENSE ├── OpenInEditor-Lite ├── OpenInEditor-Lite.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── OpenInEditor-Lite.xcscheme └── OpenInEditor-Lite │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_editor_light _256@2x.png │ │ ├── icon_editor_light_128.png │ │ ├── icon_editor_light_128@2x.png │ │ ├── icon_editor_light_16.png │ │ ├── icon_editor_light_16@2x.png │ │ ├── icon_editor_light_256.png │ │ ├── icon_editor_light_32.png │ │ ├── icon_editor_light_32@2x.png │ │ ├── icon_editor_light_512.png │ │ └── icon_editor_light_512@2x.png │ └── Contents.json │ ├── Error.swift │ ├── Info.plist │ ├── OpenInEditor-Lite.entitlements │ ├── OpenInEditor_Lite.entitlements │ ├── de.lproj │ └── Localizable.strings │ ├── en.lproj │ └── Localizable.strings │ ├── es.lproj │ └── Localizable.strings │ ├── fr.lproj │ └── Localizable.strings │ ├── it.lproj │ └── Localizable.strings │ ├── ko.lproj │ └── Localizable.strings │ ├── main.swift │ ├── ru.lproj │ └── Localizable.strings │ ├── tr.lproj │ └── Localizable.strings │ └── zh-Hans.lproj │ └── Localizable.strings ├── OpenInTerminal-Lite ├── OpenInTerminal-Lite.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── OpenInTerminal-Lite.xcscheme └── OpenInTerminal-Lite │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_terminal_light_128.png │ │ ├── icon_terminal_light_128@2x.png │ │ ├── icon_terminal_light_16.png │ │ ├── icon_terminal_light_256.png │ │ ├── icon_terminal_light_32-1.png │ │ ├── icon_terminal_light_32.png │ │ ├── icon_terminal_light_32@2x.png │ │ ├── icon_terminal_light_512-1.png │ │ ├── icon_terminal_light_512.png │ │ └── icon_terminal_light_512@2x.png │ └── Contents.json │ ├── Error.swift │ ├── Info.plist │ ├── OpenInTerminal-Lite.entitlements │ ├── OpenInTerminal_Lite.entitlements │ ├── de.lproj │ └── Localizable.strings │ ├── en.lproj │ └── Localizable.strings │ ├── es.lproj │ └── Localizable.strings │ ├── fr.lproj │ └── Localizable.strings │ ├── it.lproj │ └── Localizable.strings │ ├── ko.lproj │ └── Localizable.strings │ ├── main.swift │ ├── ru.lproj │ └── Localizable.strings │ ├── tr.lproj │ └── Localizable.strings │ └── zh-Hans.lproj │ └── Localizable.strings ├── OpenInTerminal.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ ├── OpenInTerminal.xcscheme │ ├── OpenInTerminalFinderExtension.xcscheme │ └── OpenInTerminalHelper.xcscheme ├── OpenInTerminal.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── OpenInTerminal ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── AppIcon-128.png │ │ ├── AppIcon-128@2x.png │ │ ├── AppIcon-16.png │ │ ├── AppIcon-16@2x.png │ │ ├── AppIcon-256.png │ │ ├── AppIcon-256@2x.png │ │ ├── AppIcon-32.png │ │ ├── AppIcon-32@2x.png │ │ ├── AppIcon-512.png │ │ ├── AppIcon-512@2x.png │ │ └── Contents.json │ ├── Contents.json │ ├── StatusBarIcon.imageset │ │ ├── Contents.json │ │ ├── status_bar_icon.png │ │ ├── status_bar_icon@2x.png │ │ └── status_bar_icon@3x.png │ ├── ToolbarCustomize.imageset │ │ ├── Contents.json │ │ └── ToolbarCustomize.png │ └── logo.imageset │ │ ├── AppIcon-256.png │ │ └── Contents.json ├── Constants.swift ├── Error.swift ├── Icons.xcassets │ ├── Alacritty.imageset │ │ ├── Alacritty.png │ │ └── Contents.json │ ├── Android Studio.imageset │ │ ├── Android Studio.png │ │ └── Contents.json │ ├── AppCode.imageset │ │ ├── AppCode.png │ │ └── Contents.json │ ├── Atom.imageset │ │ ├── Atom.png │ │ └── Contents.json │ ├── BBEdit.imageset │ │ ├── BBEdit.png │ │ └── Contents.json │ ├── CLion.imageset │ │ ├── CLion.png │ │ └── Contents.json │ ├── Contents.json │ ├── CotEditor.imageset │ │ ├── Contents.json │ │ └── CotEditor.png │ ├── Cursor.imageset │ │ ├── Contents.json │ │ └── Cursor.png │ ├── Fleet.imageset │ │ ├── Contents.json │ │ └── Fleet.png │ ├── Fork.imageset │ │ ├── Contents.json │ │ └── Fork.png │ ├── Ghostty.imageset │ │ ├── Contents.json │ │ └── Ghostty.png │ ├── GitHub Desktop.imageset │ │ ├── Contents.json │ │ └── GitHub Desktop.png │ ├── GoLand.imageset │ │ ├── Contents.json │ │ └── GoLand.png │ ├── IntelliJ IDEA.imageset │ │ ├── Contents.json │ │ └── IntelliJ IDEA.png │ ├── MacVim.imageset │ │ ├── Contents.json │ │ └── MacVim.png │ ├── Nova.imageset │ │ ├── Contents.json │ │ └── Nova.png │ ├── PhpStorm.imageset │ │ ├── Contents.json │ │ └── PhpStorm.png │ ├── PyCharm.imageset │ │ ├── Contents.json │ │ └── PyCharm.png │ ├── RubyMine.imageset │ │ ├── Contents.json │ │ └── RubyMine.png │ ├── Sublime Text.imageset │ │ ├── Contents.json │ │ └── Sublime Text.png │ ├── Tabby.imageset │ │ ├── Contents.json │ │ └── tabby.png │ ├── Terminal.imageset │ │ ├── Contents.json │ │ └── Terminal.png │ ├── TextEdit.imageset │ │ ├── Contents.json │ │ └── TextEdit.png │ ├── TextMate.imageset │ │ ├── Contents.json │ │ └── TextMate.png │ ├── Typora.imageset │ │ ├── Contents.json │ │ └── Typora.png │ ├── VSCodium.imageset │ │ ├── Contents.json │ │ └── VSCodium.png │ ├── Visual Studio Code - Insiders.imageset │ │ ├── Contents.json │ │ └── Visual Studio Code - Insiders.png │ ├── Visual Studio Code.imageset │ │ ├── Contents.json │ │ └── Visual Studio Code.png │ ├── Warp.imageset │ │ ├── Contents.json │ │ └── Warp.png │ ├── WebStorm.imageset │ │ ├── Contents.json │ │ └── WebStorm.png │ ├── WezTerm.imageset │ │ ├── Contents.json │ │ └── wezterm.png │ ├── Xcode.imageset │ │ ├── Contents.json │ │ └── Xcode.png │ ├── Zed.imageset │ │ ├── Contents.json │ │ └── Zed.png │ ├── context_menu_icon_color_editor.imageset │ │ ├── Contents.json │ │ ├── context_menu_icon_color_editor.png │ │ ├── context_menu_icon_color_editor@2x.png │ │ └── context_menu_icon_color_editor@3x.png │ ├── context_menu_icon_color_path.imageset │ │ ├── Contents.json │ │ ├── context_menu_icon_color_path.png │ │ ├── context_menu_icon_color_path@2x.png │ │ └── context_menu_icon_color_path@3x.png │ ├── context_menu_icon_color_terminal.imageset │ │ ├── Contents.json │ │ ├── context_menu_icon_color_terminal.png │ │ ├── context_menu_icon_color_terminal@2x.png │ │ └── context_menu_icon_color_terminal@3x.png │ ├── context_menu_icon_editor.imageset │ │ ├── Contents.json │ │ ├── context_menu_icon_editor-1.png │ │ ├── context_menu_icon_editor.png │ │ ├── context_menu_icon_editor@2x-1.png │ │ ├── context_menu_icon_editor@2x.png │ │ ├── context_menu_icon_editor@3x.png │ │ ├── context_menu_icon_editor_light.png │ │ └── context_menu_icon_editor_light@2x.png │ ├── context_menu_icon_path.imageset │ │ ├── Contents.json │ │ ├── context_menu_icon_path-1.png │ │ ├── context_menu_icon_path.png │ │ ├── context_menu_icon_path@2x-1.png │ │ ├── context_menu_icon_path@2x.png │ │ ├── context_menu_icon_path@3x.png │ │ ├── context_menu_icon_path_light.png │ │ └── context_menu_icon_path_light@2x.png │ ├── context_menu_icon_terminal.imageset │ │ ├── Contents.json │ │ ├── context_menu_icon_terminal-1.png │ │ ├── context_menu_icon_terminal.png │ │ ├── context_menu_icon_terminal@2x-1.png │ │ ├── context_menu_icon_terminal@2x.png │ │ ├── context_menu_icon_terminal@3x.png │ │ ├── context_menu_icon_terminal_light.png │ │ └── context_menu_icon_terminal_light@2x.png │ ├── hyper.imageset │ │ ├── Contents.json │ │ └── hyper.png │ ├── iTerm.imageset │ │ ├── Contents.json │ │ └── iTerm.png │ ├── kitty.imageset │ │ ├── Contents.json │ │ └── kitty.png │ └── neovim.imageset │ │ ├── Contents.json │ │ └── neovim.png ├── Info.plist ├── MainMenu.xib ├── Notifier │ ├── LaunchNotifier.swift │ ├── Notifier.swift │ └── OpenNotifier.swift ├── OpenInTerminal.entitlements ├── PreferencesWindow │ ├── AboutPreferencesViewController.swift │ ├── AdvancedPreferencesViewController.swift │ ├── Base.lproj │ │ └── Preferences.storyboard │ ├── CustomInputViewController.swift │ ├── CustomPreferencesViewController.swift │ ├── GeneralPreferencesViewController.swift │ ├── PreferencesViewController.swift │ ├── PreferencesWindowController.swift │ ├── de.lproj │ │ └── Preferences.strings │ ├── en.lproj │ │ └── Preferences.strings │ ├── es.lproj │ │ └── Preferences.strings │ ├── fr.lproj │ │ └── Preferences.strings │ ├── it.lproj │ │ └── Preferences.strings │ ├── ko.lproj │ │ └── Preferences.strings │ ├── mul.lproj │ │ └── Preferences.xcstrings │ ├── ru.lproj │ │ └── Preferences.strings │ ├── tr.lproj │ │ └── Preferences.strings │ └── zh-Hans.lproj │ │ └── Preferences.strings ├── ScriptGenerator.swift ├── StatusMenuController.swift ├── de.lproj │ └── Localizable.strings ├── en.lproj │ └── Localizable.strings ├── es.lproj │ └── Localizable.strings ├── fr.lproj │ └── Localizable.strings ├── it.lproj │ └── Localizable.strings ├── ko.lproj │ └── Localizable.strings ├── ru.lproj │ └── Localizable.strings ├── tr.lproj │ └── Localizable.strings └── zh-Hans.lproj │ └── Localizable.strings ├── OpenInTerminalCore ├── App.swift ├── AppManager.swift ├── Constants.swift ├── Defaults.swift ├── DefaultsManager.swift ├── Error.swift ├── Extensions │ ├── ArrayExtensions.swift │ └── PathExtensions.swift ├── FinderManager.swift ├── Info.plist ├── Log.swift ├── OpenInTerminalCore.h ├── ScriptManager.swift ├── ScriptingBridge │ ├── Finder.swift │ └── Terminal.swift └── SupportedApps.swift ├── OpenInTerminalFinderExtension ├── FinderAssets.xcassets │ ├── Contents.json │ └── Icon.imageset │ │ ├── Contents.json │ │ ├── Finder_extension_icon.png │ │ ├── Finder_extension_icon@2x.png │ │ └── Finder_extension_icon@3x.png ├── FinderSync.swift ├── Info.plist └── OpenInTerminalFinderExtension.entitlements ├── OpenInTerminalHelper ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── Main.storyboard ├── Info.plist └── OpenInTerminalHelper.entitlements ├── README.md └── Resources ├── README-Config-zh.md ├── README-Config.md ├── README-Lite-de.md ├── README-Lite-zh.md ├── README-Lite.md ├── README-de.md ├── README-tr.md ├── README-zh.md ├── Support-Alipay.jpg └── Support-WeChatPay.jpg /.gitattributes: -------------------------------------------------------------------------------- 1 | *.h linguist-language=Swift 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: Ji4n1ng 4 | #patreon: # Replace with a single Patreon username 5 | #open_collective: # Replace with a single Open Collective username 6 | #ko_fi: # Replace with a single Ko-fi username 7 | #tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | #community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | #liberapay: # Replace with a single Liberapay username 10 | #issuehunt: # Replace with a single IssueHunt username 11 | #otechie: # Replace with a single Otechie username 12 | #lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | #custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report_issue_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'Bug report' 3 | labels: bug 4 | about: 'Report a bug' 5 | --- 6 | 7 | ## What is the issue? 8 | 9 | ## How does one reproduce the issue? 10 | 11 | ## Screenshots 12 | 13 | ## Debug information (Logs, OS, Hardware, Version, etc.) 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request_issue_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'Feature request' 3 | labels: enhancement 4 | about: 'Request a new feature' 5 | --- 6 | 7 | ## Summarize this feature 8 | 9 | ## Why should this feature be included? 10 | 11 | ## Additional information 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Summary of this pull request 2 | 3 | ## Does this solve an existing issue? If so, add a link to it 4 | 5 | ## Steps to test this feature 6 | 7 | ## Screenshots 8 | 9 | ## Additional info 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/macos,xcode,swift 3 | # Edit at https://www.gitignore.io/?templates=macos,xcode,swift 4 | 5 | ### macOS ### 6 | # General 7 | .DS_Store 8 | .AppleDouble 9 | .LSOverride 10 | 11 | # Icon must end with two \r 12 | Icon 13 | 14 | # Thumbnails 15 | ._* 16 | 17 | # Files that might appear in the root of a volume 18 | .DocumentRevisions-V100 19 | .fseventsd 20 | .Spotlight-V100 21 | .TemporaryItems 22 | .Trashes 23 | .VolumeIcon.icns 24 | .com.apple.timemachine.donotpresent 25 | 26 | # Directories potentially created on remote AFP share 27 | .AppleDB 28 | .AppleDesktop 29 | Network Trash Folder 30 | Temporary Items 31 | .apdisk 32 | 33 | ### Swift ### 34 | # Xcode 35 | # 36 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 37 | 38 | ## Build generated 39 | build/ 40 | DerivedData/ 41 | 42 | ## Various settings 43 | *.pbxuser 44 | !default.pbxuser 45 | *.mode1v3 46 | !default.mode1v3 47 | *.mode2v3 48 | !default.mode2v3 49 | *.perspectivev3 50 | !default.perspectivev3 51 | xcuserdata/ 52 | 53 | ## Other 54 | *.moved-aside 55 | *.xccheckout 56 | *.xcscmblueprint 57 | 58 | ## Obj-C/Swift specific 59 | *.hmap 60 | *.ipa 61 | *.dSYM.zip 62 | *.dSYM 63 | 64 | ## Playgrounds 65 | timeline.xctimeline 66 | playground.xcworkspace 67 | 68 | # Swift Package Manager 69 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 70 | # Packages/ 71 | # Package.pins 72 | # Package.resolved 73 | .build/ 74 | 75 | # CocoaPods 76 | # We recommend against adding the Pods directory to your .gitignore. However 77 | # you should judge for yourself, the pros and cons are mentioned at: 78 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 79 | Pods/ 80 | # Add this line if you want to avoid checking in source code from the Xcode workspace 81 | *.xcworkspace 82 | 83 | # Carthage 84 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 85 | # Carthage/Checkouts 86 | 87 | Carthage/Build 88 | 89 | # fastlane 90 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 91 | # screenshots whenever they are needed. 92 | # For more information about the recommended setup visit: 93 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 94 | 95 | fastlane/report.xml 96 | fastlane/Preview.html 97 | fastlane/screenshots/**/*.png 98 | fastlane/test_output 99 | 100 | # Code Injection 101 | # After new code Injection tools there's a generated folder /iOSInjectionProject 102 | # https://github.com/johnno1962/injectionforxcode 103 | 104 | iOSInjectionProject/ 105 | 106 | ### Xcode ### 107 | # Xcode 108 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 109 | 110 | ## User settings 111 | 112 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 113 | 114 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 115 | 116 | ### Xcode Patch ### 117 | *.xcodeproj/* 118 | !*.xcodeproj/project.pbxproj 119 | !*.xcodeproj/xcshareddata/ 120 | !*.xcworkspace/contents.xcworkspacedata 121 | /*.gcno 122 | **/xcshareddata/WorkspaceSettings.xcsettings 123 | 124 | # End of https://www.gitignore.io/api/macos,xcode,swift 125 | n 126 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | matrix: 3 | include: 4 | - osx_image: xcode11 5 | branches: 6 | only: 7 | - master 8 | #- develop 9 | env: 10 | global: 11 | - LC_CTYPE=en_US.UTF-8 12 | before_install: 13 | - gem install cocoapods # Since Travis is not always on latest version 14 | - gem install xcpretty -N 15 | - pod install 16 | script: 17 | - set -o pipefail 18 | - xcodebuild clean build -workspace OpenInTerminal.xcworkspace -scheme OpenInTerminal -sdk macosx -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGN_REQUIRED=NO | xcpretty -c -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2019 Jianing Wang 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite.xcodeproj/xcshareddata/xcschemes/OpenInEditor-Lite.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon_editor_light_16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "icon_editor_light_16@2x.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "icon_editor_light_32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "icon_editor_light_32@2x.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "icon_editor_light_128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "icon_editor_light_128@2x.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "icon_editor_light_256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "icon_editor_light _256@2x.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "icon_editor_light_512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "icon_editor_light_512@2x.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light _256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light _256@2x.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_128.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_128@2x.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_16.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_16@2x.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_256.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_32.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_32@2x.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_512.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/AppIcon.appiconset/icon_editor_light_512@2x.png -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Error.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Error.swift 3 | // OpenInEditor-Lite 4 | // 5 | // Created by Jianing Wang on 2019/6/25. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | enum OITLError: Error { 12 | 13 | case cannotGetEditor 14 | 15 | } 16 | 17 | extension OITLError : CustomStringConvertible { 18 | 19 | var description: String { 20 | 21 | switch self { 22 | 23 | case .cannotGetEditor: 24 | return "There is no default editor. And user did not pick a editor." 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.utilities 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSAppleEventsUsageDescription 30 | Please give permissions to access your Finder & Terminal 31 | NSHumanReadableCopyright 32 | Copyright © 2019 Jianing Wang. All rights reserved. 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/OpenInEditor-Lite.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.automation.apple-events 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/OpenInEditor_Lite.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.temporary-exception.apple-events 6 | 7 | com.apple.systemevents 8 | com.apple.Terminal 9 | com.apple.Finder 10 | com.googlecode.iterm2 11 | co.zeit.hyper 12 | io.alacritty 13 | com.github.wez.wezterm 14 | org.tabby 15 | com.microsoft.VSCode 16 | com.github.atom 17 | com.sublimetext.3 18 | com.barebones.bbedit 19 | com.microsoft.VSCodeInsiders 20 | com.macromates.TextMate 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by Jianing Wang on 2019/6/25. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "Okay"; 10 | "general.cancel" = "Abbrechen"; 11 | "general.yes" = "Ja"; 12 | 13 | "alert.pick_editor_title" = "Öffnen mit?"; 14 | "alert.pick_editor_description" = "Bitte wählen Sie eines der folgenden Editoren als Standard zum Öffnen."; 15 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by Jianing Wang on 2019/6/25. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Cancel"; 11 | "general.yes" = "Yes"; 12 | 13 | "alert.pick_editor_title" = "Open In?"; 14 | "alert.pick_editor_description" = "Please select one of the following editors as the default editor to open."; 15 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/es.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by Jianing Wang on 2019/6/25. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Cancelar"; 11 | "general.yes" = "Sí"; 12 | 13 | "alert.pick_editor_title" = "Abrir en?"; 14 | "alert.pick_editor_description" = "Seleccione uno de los siguientes editores como editor predeterminado."; 15 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/fr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by Jianing Wang on 2019/6/25. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Annuler"; 11 | "general.yes" = "Oui"; 12 | 13 | "alert.pick_editor_title" = "Ouvrir avec?"; 14 | "alert.pick_editor_description" = "Veuillez sélectionner l’un de ses éditeurs ci-dessous pour être utilisé comme éditeur par défaut."; 15 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/it.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by arendruni on 2020/4/9. 6 | Copyright © 2020 arendruni. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Annulla"; 11 | "general.yes" = "Sì"; 12 | 13 | "alert.pick_editor_title" = "Apri con?"; 14 | "alert.pick_editor_description" = "Seleziona uno dei seguenti editor per impostarlo come editor di default."; 15 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/ko.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by Fernando on 2019/11/23. 6 | Copyright © 2019 Fernando. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "확인"; 10 | "general.cancel" = "닫기"; 11 | "general.yes" = "네"; 12 | 13 | "alert.pick_editor_title" = "여시겠습니까?"; 14 | "alert.pick_editor_description" = "다음 리스트에서 기본이 될 에디터 프로그램을 선택해주세요."; 15 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/main.swift: -------------------------------------------------------------------------------- 1 | // 2 | // main.swift 3 | // OpenInEditor-Lite 4 | // 5 | // Created by Jianing Wang on 2019/6/25. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import OpenInTerminalCore 11 | 12 | do { 13 | 14 | if let editorName = DefaultsManager.shared.liteDefaultEditor { 15 | let editor = App(name: editorName, type: .editor) 16 | try editor.openOutsideSandbox() 17 | } else { 18 | guard let selectedEditor = AppManager.shared.pickEditorAlert() else { 19 | throw OITLError.cannotGetEditor 20 | } 21 | DefaultsManager.shared.liteDefaultEditor = selectedEditor.name 22 | try selectedEditor.openOutsideSandbox() 23 | } 24 | 25 | } catch { 26 | logw(error.localizedDescription) 27 | } 28 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/ru.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by Jianing Wang on 2019/6/25. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Отменить"; 11 | "general.yes" = "Да"; 12 | 13 | "alert.pick_terminal_title" = "Открыть в?"; 14 | "alert.pick_terminal_description" = "Пожалуйста, выберите один из доступных редакторе для установки по-умолчанию."; 15 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/tr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by Jianing Wang on 2019/6/25. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "Tamam"; 10 | "general.cancel" = "İptal"; 11 | "general.yes" = "Evet"; 12 | 13 | "alert.pick_editor_title" = "Şununla Aç?"; 14 | "alert.pick_editor_description" = "Lütfen gösterilen düzenleyicilerden birini varsayılan düzenleyici olarak seçin."; 15 | -------------------------------------------------------------------------------- /OpenInEditor-Lite/OpenInEditor-Lite/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInEditor-Lite 4 | 5 | Created by Jianing Wang on 2019/6/25. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "好"; 10 | "general.cancel" = "取消"; 11 | "general.yes" = "是的"; 12 | 13 | "alert.pick_editor_title" = "打开?"; 14 | "alert.pick_editor_description" = "请在下面的编辑器中选择一个作为默认编辑器。"; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite.xcodeproj/xcshareddata/xcschemes/OpenInTerminal-Lite.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon_terminal_light_16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "icon_terminal_light_32.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "icon_terminal_light_32-1.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "icon_terminal_light_32@2x.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "icon_terminal_light_128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "icon_terminal_light_128@2x.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "icon_terminal_light_256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "icon_terminal_light_512.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "icon_terminal_light_512-1.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "icon_terminal_light_512@2x.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_128.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_128@2x.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_16.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_256.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_32-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_32-1.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_32.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_32@2x.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_512-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_512-1.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_512.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/AppIcon.appiconset/icon_terminal_light_512@2x.png -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Error.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Error.swift 3 | // OpenInTerminal-Lite 4 | // 5 | // Created by Jianing Wang on 2019/4/21. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | enum OITLError: Error { 12 | 13 | case cannotGetTerminal 14 | 15 | } 16 | 17 | extension OITLError : CustomStringConvertible { 18 | 19 | var description: String { 20 | 21 | switch self { 22 | 23 | case .cannotGetTerminal: 24 | return "There is no default terminal. And user did not pick a terminal" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.utilities 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSAppleEventsUsageDescription 30 | Please give permissions to access your Finder & Terminal 31 | NSHumanReadableCopyright 32 | Copyright © 2019 Jianing Wang. All rights reserved. 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/OpenInTerminal-Lite.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.automation.apple-events 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/OpenInTerminal_Lite.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.temporary-exception.apple-events 6 | 7 | com.apple.systemevents 8 | com.apple.Terminal 9 | com.apple.Finder 10 | com.googlecode.iterm2 11 | co.zeit.hyper 12 | io.alacritty 13 | com.github.wez.wezterm 14 | org.tabby 15 | com.microsoft.VSCode 16 | com.github.atom 17 | com.sublimetext.3 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by Jianing Wang on 2019/5/16. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "Okay"; 10 | "general.cancel" = "Abbrechen"; 11 | "general.yes" = "Ja"; 12 | 13 | "alert.pick_terminal_title" = "Öffnen mit?"; 14 | "alert.pick_terminal_description" = "Bitte wählen Sie eines der folgenden Terminals als Standard zum Öffnen."; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by Jianing Wang on 2019/5/16. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Cancel"; 11 | "general.yes" = "Yes"; 12 | 13 | "alert.pick_terminal_title" = "Open In?"; 14 | "alert.pick_terminal_description" = "Please select one of the following terminals as the default terminal to open."; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/es.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by Jianing Wang on 2019/5/16. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Cancelar"; 11 | "general.yes" = "Sí"; 12 | 13 | "alert.pick_terminal_title" = "Abrir en?"; 14 | "alert.pick_terminal_description" = "Seleccione uno de los siguientes terminales como terminal predeterminado."; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/fr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by Jianing Wang on 2019/5/16. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Annuler"; 11 | "general.yes" = "Oui"; 12 | 13 | "alert.pick_terminal_title" = "Ouvrir avec?"; 14 | "alert.pick_terminal_description" = "Veuillez sélectionner l’un de ses terminaux ci-dessous pour être utilisé comme terminal par défaut."; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/it.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by arendruni on 2020/4/9. 6 | Copyright © 2020 arendruni. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Annulla"; 11 | "general.yes" = "Sì"; 12 | 13 | "alert.pick_terminal_title" = "Apri con?"; 14 | "alert.pick_terminal_description" = "Seleziona uno dei seguenti terminali per impostarlo come terminale default."; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/ko.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by Fernando on 2019/11/23. 6 | Copyright © 2019 Fernando. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "확인"; 10 | "general.cancel" = "닫기"; 11 | "general.yes" = "네"; 12 | 13 | "alert.pick_terminal_title" = "여시겠습니까?"; 14 | "alert.pick_terminal_description" = "다음 리스트에서 기본이 될 터미널 프로그램을 선택해주세요."; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/main.swift: -------------------------------------------------------------------------------- 1 | // 2 | // main.swift 3 | // OpenInTerminal-Lite 4 | // 5 | // Created by Jianing Wang on 2019/4/19. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import OpenInTerminalCore 11 | 12 | do { 13 | 14 | if let terminalName = DefaultsManager.shared.liteDefaultTerminal { 15 | let terminal = App(name: terminalName, type: .terminal) 16 | try terminal.openOutsideSandbox() 17 | } else { 18 | guard let selectedTerminal = AppManager.shared.pickTerminalAlert() else { 19 | throw OITLError.cannotGetTerminal 20 | } 21 | DefaultsManager.shared.liteDefaultTerminal = selectedTerminal.name 22 | try selectedTerminal.openOutsideSandbox() 23 | } 24 | 25 | } catch { 26 | logw(error.localizedDescription) 27 | } 28 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/ru.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by Jianing Wang on 2019/5/16. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Отменить"; 11 | "general.yes" = "Да"; 12 | 13 | "alert.pick_terminal_title" = "Открыть в?"; 14 | "alert.pick_terminal_description" = "Пожалуйста, выберите один из доступных терминалов для установки по-умолчанию."; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/tr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by Jianing Wang on 2019/5/16. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "Tamam"; 10 | "general.cancel" = "İptal"; 11 | "general.yes" = "Evet"; 12 | 13 | "alert.pick_terminal_title" = "Şununla Aç?"; 14 | "alert.pick_terminal_description" = "Lütfen gösterilen terimnallerden birini varsayılan terminal olarak seçin."; 15 | -------------------------------------------------------------------------------- /OpenInTerminal-Lite/OpenInTerminal-Lite/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal-Lite 4 | 5 | Created by Jianing Wang on 2019/5/16. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "好"; 10 | "general.cancel" = "取消"; 11 | "general.yes" = "是的"; 12 | 13 | "alert.pick_terminal_title" = "打开?"; 14 | "alert.pick_terminal_description" = "请在下面的终端中选择一个作为默认终端。"; 15 | -------------------------------------------------------------------------------- /OpenInTerminal.xcodeproj/xcshareddata/xcschemes/OpenInTerminal.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 65 | 66 | 67 | 68 | 70 | 76 | 77 | 78 | 79 | 80 | 90 | 92 | 98 | 99 | 100 | 101 | 107 | 109 | 115 | 116 | 117 | 118 | 120 | 121 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /OpenInTerminal.xcodeproj/xcshareddata/xcschemes/OpenInTerminalFinderExtension.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 69 | 73 | 74 | 75 | 81 | 82 | 83 | 84 | 92 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /OpenInTerminal.xcodeproj/xcshareddata/xcschemes/OpenInTerminalHelper.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /OpenInTerminal.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /OpenInTerminal.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppIcon-16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "AppIcon-16@2x.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "AppIcon-32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "AppIcon-32@2x.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "AppIcon-128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "AppIcon-128@2x.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "AppIcon-256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "AppIcon-256@2x.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "AppIcon-512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "AppIcon-512@2x.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/StatusBarIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "status_bar_icon.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "status_bar_icon@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "status_bar_icon@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/StatusBarIcon.imageset/status_bar_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/StatusBarIcon.imageset/status_bar_icon.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/StatusBarIcon.imageset/status_bar_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/StatusBarIcon.imageset/status_bar_icon@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/StatusBarIcon.imageset/status_bar_icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/StatusBarIcon.imageset/status_bar_icon@3x.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/ToolbarCustomize.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ToolbarCustomize.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/ToolbarCustomize.imageset/ToolbarCustomize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/ToolbarCustomize.imageset/ToolbarCustomize.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/logo.imageset/AppIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Assets.xcassets/logo.imageset/AppIcon-256.png -------------------------------------------------------------------------------- /OpenInTerminal/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppIcon-256.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Constants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Config.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/4/20. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import Foundation 11 | import OpenInTerminalCore 12 | 13 | struct Constants { 14 | 15 | struct Id { 16 | static let LauncherApp = "wang.jianing.app.OpenInTerminalHelper" 17 | static let FinderExtension = "wang.jianing.app.OpenInTerminal.OpenInTerminalFinderExtension" 18 | static let CustomAppCell = NSUserInterfaceItemIdentifier(rawValue: "customAppCell") 19 | static let CustomMenuCell = NSUserInterfaceItemIdentifier(rawValue: "customMenuCell") 20 | static let CustomInputViewController = "CustomInputViewController" 21 | } 22 | 23 | static let none = "None" 24 | 25 | struct Key { 26 | static let defaultTerminalShortcut = "OIT_DefaultTerminalShortcut" 27 | static let defaultEditorShortcut = "OIT_DefaultEditorShortcut" 28 | static let copyPathShortcut = "OIT_CopyPathShortcut" 29 | } 30 | 31 | static let PreferencesStoryboard = NSStoryboard(name: "Preferences", bundle: nil) 32 | } 33 | 34 | extension NSImage { 35 | 36 | enum AssetIdentifier: String { 37 | case StatusBarIcon 38 | } 39 | 40 | convenience init(assetIdentifier: AssetIdentifier) { 41 | self.init(named: assetIdentifier.rawValue)! 42 | } 43 | } 44 | 45 | extension NSStoryboard { 46 | 47 | enum StoryboardIdentifier: String { 48 | case Preferences 49 | } 50 | 51 | convenience init(storyboardIdentifier: StoryboardIdentifier) { 52 | self.init(name: storyboardIdentifier.rawValue, bundle: nil) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /OpenInTerminal/Error.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Error.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/10/15. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | enum OITMError: Error { 12 | 13 | case cannotAccessPath(_ path: String) 14 | 15 | } 16 | 17 | extension OITMError : CustomStringConvertible { 18 | 19 | var description: String { 20 | switch self { 21 | case .cannotAccessPath(let path): 22 | return "Cannot access path: \(path)" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Alacritty.imageset/Alacritty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Alacritty.imageset/Alacritty.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Alacritty.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Alacritty.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Android Studio.imageset/Android Studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Android Studio.imageset/Android Studio.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Android Studio.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Android Studio.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/AppCode.imageset/AppCode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/AppCode.imageset/AppCode.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/AppCode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppCode.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Atom.imageset/Atom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Atom.imageset/Atom.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Atom.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Atom.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/BBEdit.imageset/BBEdit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/BBEdit.imageset/BBEdit.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/BBEdit.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "BBEdit.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/CLion.imageset/CLion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/CLion.imageset/CLion.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/CLion.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "CLion.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/CotEditor.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "CotEditor.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/CotEditor.imageset/CotEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/CotEditor.imageset/CotEditor.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Cursor.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Cursor.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Cursor.imageset/Cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Cursor.imageset/Cursor.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Fleet.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Fleet.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Fleet.imageset/Fleet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Fleet.imageset/Fleet.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Fork.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Fork.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Fork.imageset/Fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Fork.imageset/Fork.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Ghostty.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Ghostty.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Ghostty.imageset/Ghostty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Ghostty.imageset/Ghostty.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/GitHub Desktop.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "GitHub Desktop.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/GitHub Desktop.imageset/GitHub Desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/GitHub Desktop.imageset/GitHub Desktop.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/GoLand.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "GoLand.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/GoLand.imageset/GoLand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/GoLand.imageset/GoLand.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/IntelliJ IDEA.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IntelliJ IDEA.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/IntelliJ IDEA.imageset/IntelliJ IDEA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/IntelliJ IDEA.imageset/IntelliJ IDEA.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/MacVim.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "MacVim.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/MacVim.imageset/MacVim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/MacVim.imageset/MacVim.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Nova.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Nova.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Nova.imageset/Nova.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Nova.imageset/Nova.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/PhpStorm.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "PhpStorm.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/PhpStorm.imageset/PhpStorm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/PhpStorm.imageset/PhpStorm.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/PyCharm.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "PyCharm.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/PyCharm.imageset/PyCharm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/PyCharm.imageset/PyCharm.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/RubyMine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "RubyMine.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/RubyMine.imageset/RubyMine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/RubyMine.imageset/RubyMine.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Sublime Text.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Sublime Text.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Sublime Text.imageset/Sublime Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Sublime Text.imageset/Sublime Text.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Tabby.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "tabby.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Tabby.imageset/tabby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Tabby.imageset/tabby.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Terminal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Terminal.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Terminal.imageset/Terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Terminal.imageset/Terminal.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/TextEdit.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "TextEdit.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/TextEdit.imageset/TextEdit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/TextEdit.imageset/TextEdit.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/TextMate.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "TextMate.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/TextMate.imageset/TextMate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/TextMate.imageset/TextMate.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Typora.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Typora.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Typora.imageset/Typora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Typora.imageset/Typora.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/VSCodium.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "VSCodium.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/VSCodium.imageset/VSCodium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/VSCodium.imageset/VSCodium.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Visual Studio Code - Insiders.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Visual Studio Code - Insiders.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Visual Studio Code - Insiders.imageset/Visual Studio Code - Insiders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Visual Studio Code - Insiders.imageset/Visual Studio Code - Insiders.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Visual Studio Code.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Visual Studio Code.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Visual Studio Code.imageset/Visual Studio Code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Visual Studio Code.imageset/Visual Studio Code.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Warp.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Warp.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Warp.imageset/Warp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Warp.imageset/Warp.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/WebStorm.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "WebStorm.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/WebStorm.imageset/WebStorm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/WebStorm.imageset/WebStorm.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/WezTerm.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "wezterm.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/WezTerm.imageset/wezterm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/WezTerm.imageset/wezterm.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Xcode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Xcode.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Xcode.imageset/Xcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Xcode.imageset/Xcode.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Zed.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Zed.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/Zed.imageset/Zed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/Zed.imageset/Zed.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_editor.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "context_menu_icon_color_editor.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "context_menu_icon_color_editor@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "context_menu_icon_color_editor@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_editor.imageset/context_menu_icon_color_editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_editor.imageset/context_menu_icon_color_editor.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_editor.imageset/context_menu_icon_color_editor@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_editor.imageset/context_menu_icon_color_editor@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_editor.imageset/context_menu_icon_color_editor@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_editor.imageset/context_menu_icon_color_editor@3x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_path.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "context_menu_icon_color_path.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "context_menu_icon_color_path@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "context_menu_icon_color_path@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_path.imageset/context_menu_icon_color_path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_path.imageset/context_menu_icon_color_path.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_path.imageset/context_menu_icon_color_path@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_path.imageset/context_menu_icon_color_path@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_path.imageset/context_menu_icon_color_path@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_path.imageset/context_menu_icon_color_path@3x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_terminal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "context_menu_icon_color_terminal.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "context_menu_icon_color_terminal@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "context_menu_icon_color_terminal@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_terminal.imageset/context_menu_icon_color_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_terminal.imageset/context_menu_icon_color_terminal.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_terminal.imageset/context_menu_icon_color_terminal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_terminal.imageset/context_menu_icon_color_terminal@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_color_terminal.imageset/context_menu_icon_color_terminal@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_color_terminal.imageset/context_menu_icon_color_terminal@3x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "context_menu_icon_editor-1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "light" 13 | } 14 | ], 15 | "filename" : "context_menu_icon_editor.png", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "appearances" : [ 21 | { 22 | "appearance" : "luminosity", 23 | "value" : "dark" 24 | } 25 | ], 26 | "filename" : "context_menu_icon_editor_light.png", 27 | "idiom" : "universal", 28 | "scale" : "1x" 29 | }, 30 | { 31 | "filename" : "context_menu_icon_editor@2x-1.png", 32 | "idiom" : "universal", 33 | "scale" : "2x" 34 | }, 35 | { 36 | "appearances" : [ 37 | { 38 | "appearance" : "luminosity", 39 | "value" : "light" 40 | } 41 | ], 42 | "filename" : "context_menu_icon_editor@2x.png", 43 | "idiom" : "universal", 44 | "scale" : "2x" 45 | }, 46 | { 47 | "appearances" : [ 48 | { 49 | "appearance" : "luminosity", 50 | "value" : "dark" 51 | } 52 | ], 53 | "filename" : "context_menu_icon_editor_light@2x.png", 54 | "idiom" : "universal", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "filename" : "context_menu_icon_editor@3x.png", 59 | "idiom" : "universal", 60 | "scale" : "3x" 61 | }, 62 | { 63 | "appearances" : [ 64 | { 65 | "appearance" : "luminosity", 66 | "value" : "light" 67 | } 68 | ], 69 | "idiom" : "universal", 70 | "scale" : "3x" 71 | }, 72 | { 73 | "appearances" : [ 74 | { 75 | "appearance" : "luminosity", 76 | "value" : "dark" 77 | } 78 | ], 79 | "idiom" : "universal", 80 | "scale" : "3x" 81 | } 82 | ], 83 | "info" : { 84 | "author" : "xcode", 85 | "version" : 1 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor-1.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor@2x-1.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor@3x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor_light.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor_light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_editor.imageset/context_menu_icon_editor_light@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "context_menu_icon_path-1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "light" 13 | } 14 | ], 15 | "filename" : "context_menu_icon_path.png", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "appearances" : [ 21 | { 22 | "appearance" : "luminosity", 23 | "value" : "dark" 24 | } 25 | ], 26 | "filename" : "context_menu_icon_path_light.png", 27 | "idiom" : "universal", 28 | "scale" : "1x" 29 | }, 30 | { 31 | "filename" : "context_menu_icon_path@2x-1.png", 32 | "idiom" : "universal", 33 | "scale" : "2x" 34 | }, 35 | { 36 | "appearances" : [ 37 | { 38 | "appearance" : "luminosity", 39 | "value" : "light" 40 | } 41 | ], 42 | "filename" : "context_menu_icon_path@2x.png", 43 | "idiom" : "universal", 44 | "scale" : "2x" 45 | }, 46 | { 47 | "appearances" : [ 48 | { 49 | "appearance" : "luminosity", 50 | "value" : "dark" 51 | } 52 | ], 53 | "filename" : "context_menu_icon_path_light@2x.png", 54 | "idiom" : "universal", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "filename" : "context_menu_icon_path@3x.png", 59 | "idiom" : "universal", 60 | "scale" : "3x" 61 | }, 62 | { 63 | "appearances" : [ 64 | { 65 | "appearance" : "luminosity", 66 | "value" : "light" 67 | } 68 | ], 69 | "idiom" : "universal", 70 | "scale" : "3x" 71 | }, 72 | { 73 | "appearances" : [ 74 | { 75 | "appearance" : "luminosity", 76 | "value" : "dark" 77 | } 78 | ], 79 | "idiom" : "universal", 80 | "scale" : "3x" 81 | } 82 | ], 83 | "info" : { 84 | "author" : "xcode", 85 | "version" : 1 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path-1.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path@2x-1.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path@3x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path_light.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path_light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_path.imageset/context_menu_icon_path_light@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "context_menu_icon_terminal-1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "light" 13 | } 14 | ], 15 | "filename" : "context_menu_icon_terminal.png", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "appearances" : [ 21 | { 22 | "appearance" : "luminosity", 23 | "value" : "dark" 24 | } 25 | ], 26 | "filename" : "context_menu_icon_terminal_light.png", 27 | "idiom" : "universal", 28 | "scale" : "1x" 29 | }, 30 | { 31 | "filename" : "context_menu_icon_terminal@2x-1.png", 32 | "idiom" : "universal", 33 | "scale" : "2x" 34 | }, 35 | { 36 | "appearances" : [ 37 | { 38 | "appearance" : "luminosity", 39 | "value" : "light" 40 | } 41 | ], 42 | "filename" : "context_menu_icon_terminal@2x.png", 43 | "idiom" : "universal", 44 | "scale" : "2x" 45 | }, 46 | { 47 | "appearances" : [ 48 | { 49 | "appearance" : "luminosity", 50 | "value" : "dark" 51 | } 52 | ], 53 | "filename" : "context_menu_icon_terminal_light@2x.png", 54 | "idiom" : "universal", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "filename" : "context_menu_icon_terminal@3x.png", 59 | "idiom" : "universal", 60 | "scale" : "3x" 61 | }, 62 | { 63 | "appearances" : [ 64 | { 65 | "appearance" : "luminosity", 66 | "value" : "light" 67 | } 68 | ], 69 | "idiom" : "universal", 70 | "scale" : "3x" 71 | }, 72 | { 73 | "appearances" : [ 74 | { 75 | "appearance" : "luminosity", 76 | "value" : "dark" 77 | } 78 | ], 79 | "idiom" : "universal", 80 | "scale" : "3x" 81 | } 82 | ], 83 | "info" : { 84 | "author" : "xcode", 85 | "version" : 1 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal-1.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal@2x-1.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal@3x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal_light.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal_light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/context_menu_icon_terminal.imageset/context_menu_icon_terminal_light@2x.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/hyper.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "hyper.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/hyper.imageset/hyper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/hyper.imageset/hyper.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/iTerm.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iTerm.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/iTerm.imageset/iTerm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/iTerm.imageset/iTerm.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/kitty.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "kitty.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/kitty.imageset/kitty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/kitty.imageset/kitty.png -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/neovim.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "neovim.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenInTerminal/Icons.xcassets/neovim.imageset/neovim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminal/Icons.xcassets/neovim.imageset/neovim.png -------------------------------------------------------------------------------- /OpenInTerminal/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 | APPL 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | 1 21 | LSApplicationCategoryType 22 | public.app-category.utilities 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | LSUIElement 26 | YES 27 | NSAppleEventsUsageDescription 28 | Please give permissions to access your Finder & Terminal 29 | NSExtension 30 | 31 | NSExtensionAttributes 32 | 33 | NSExtensionPointIdentifier 34 | com.apple.FinderSync 35 | NSExtensionPrincipalClass 36 | $(PRODUCT_MODULE_NAME).FinderSync 37 | 38 | NSHumanReadableCopyright 39 | Copyright © 2019 Jianing Wang. All rights reserved. 40 | NSMainNibFile 41 | MainMenu 42 | NSPrincipalClass 43 | NSApplication 44 | 45 | 46 | -------------------------------------------------------------------------------- /OpenInTerminal/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /OpenInTerminal/Notifier/LaunchNotifier.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LaunchNotifier.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/4/27. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class LaunchNotifier: Notifier { 12 | 13 | public enum Notification: String { 14 | case terminateApp 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /OpenInTerminal/Notifier/Notifier.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Notifier.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/4/19. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public protocol Notifier { 12 | associatedtype Notification: RawRepresentable 13 | } 14 | 15 | public extension Notifier where Notification.RawValue == String { 16 | 17 | // MARK: - Static Computed Variables 18 | 19 | private static func nameFor(notification: Notification) -> String { 20 | return "\(self).\(notification.rawValue)" 21 | } 22 | 23 | 24 | // MARK: - Instance Methods 25 | 26 | // Post 27 | 28 | func postNotification(notification: Notification, object: String? = nil) { 29 | Self.postNotification(notification, object: object) 30 | } 31 | 32 | func postNotification(notification: Notification, object: String? = nil, userInfo: [String : AnyObject]? = nil) { 33 | Self.postNotification(notification, object: object, userInfo: userInfo) 34 | } 35 | 36 | 37 | // MARK: - Static Function 38 | 39 | // Post 40 | 41 | static func postNotification(_ notification: Notification, object: String? = nil, userInfo: [AnyHashable : Any]? = nil) { 42 | let name = nameFor(notification: notification) 43 | 44 | DistributedNotificationCenter.default() 45 | .postNotificationName(NSNotification.Name(rawValue: name), object: object, userInfo: userInfo, deliverImmediately: true) 46 | } 47 | 48 | // Add 49 | 50 | static func addObserver(observer: AnyObject, selector: Selector, notification: Notification, object: String? = nil) { 51 | let name = nameFor(notification: notification) 52 | 53 | DistributedNotificationCenter.default() 54 | .addObserver(observer, selector: selector, name: NSNotification.Name(rawValue: name), object: object) 55 | } 56 | 57 | // Remove 58 | 59 | static func removeObserver(observer: AnyObject, notification: Notification, object: String? = nil) { 60 | let name = nameFor(notification: notification) 61 | 62 | DistributedNotificationCenter.default() 63 | .removeObserver(observer, name: NSNotification.Name(rawValue: name), object: object) 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /OpenInTerminal/Notifier/OpenNotifier.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OpenManager.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/4/19. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class OpenNotifier: Notifier { 12 | 13 | public enum Notification: String { 14 | case openDefaultTerminal 15 | case openDefaultEditor 16 | case copyPathToClipboard 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /OpenInTerminal/OpenInTerminal.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.wang.jianing.app.OpenInTerminal 8 | 9 | com.apple.security.automation.apple-events 10 | 11 | com.apple.security.temporary-exception.apple-events 12 | 13 | com.apple.systemevents 14 | com.apple.Terminal 15 | com.apple.Finder 16 | com.googlecode.iterm2 17 | co.zeit.hyper 18 | io.alacritty 19 | com.github.wez.wezterm 20 | org.tabby 21 | com.microsoft.VSCode 22 | com.github.atom 23 | com.sublimetext.3 24 | com.barebones.bbedit 25 | com.microsoft.VSCodeInsiders 26 | com.macromates.TextMate 27 | net.kovidgoyal.kitty 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /OpenInTerminal/PreferencesWindow/AboutPreferencesViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AboutPreferencesViewController.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/5/1. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class AboutPreferencesViewController: PreferencesViewController { 12 | 13 | @IBOutlet weak var versionLabel: NSTextField! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | let versionObject = Bundle.main.infoDictionary?["CFBundleShortVersionString"] 19 | versionLabel.stringValue = versionObject as? String ?? "" 20 | } 21 | 22 | @IBAction func githubButtonClicked(_ sender: NSButton) { 23 | guard let url = URL(string: "https://github.com/Ji4n1ng/OpenInTerminal") else { return } 24 | NSWorkspace.shared.open(url) 25 | } 26 | 27 | @IBAction func contactButtonClicked(_ sender: NSButton) { 28 | guard let url = URL(string: "mailto:contact@jianing.wang?subject=OpenInTerminal%20Feedback") else { return } 29 | NSWorkspace.shared.open(url) 30 | } 31 | 32 | @IBAction func twitterButtonClicked(_ sender: NSButton) { 33 | guard let url = URL(string: "https://twitter.com/Ji4n1ng") else { return } 34 | NSWorkspace.shared.open(url) 35 | } 36 | 37 | @IBAction func githubSponsorsButtonClicked(_ sender: NSButton) { 38 | guard let url = URL(string: "https://github.com/sponsors/Ji4n1ng") else { return } 39 | NSWorkspace.shared.open(url) 40 | } 41 | 42 | @IBAction func paypalButtonClicked(_ sender: NSButton) { 43 | guard let url = URL(string: "https://paypal.me/ji4ning") else { return } 44 | NSWorkspace.shared.open(url) 45 | } 46 | 47 | @IBAction func alipayButtonClicked(_ sender: NSButton) { 48 | guard let url = URL(string: "https://github.com/Ji4n1ng/OpenInTerminal/blob/master/Resources/Support-Alipay.jpg") else { return } 49 | NSWorkspace.shared.open(url) 50 | } 51 | 52 | @IBAction func weChatPayButtonClicked(_ sender: NSButton) { 53 | guard let url = URL(string: "https://github.com/Ji4n1ng/OpenInTerminal/blob/master/Resources/Support-WeChatPay.jpg") else { return } 54 | NSWorkspace.shared.open(url) 55 | } 56 | 57 | @IBAction func camji55ButtonClicked(_ sender: NSButton) { 58 | guard let url = URL(string: "https://github.com/Camji55") else { return } 59 | NSWorkspace.shared.open(url) 60 | } 61 | } 62 | 63 | class LinkButton: NSButton { 64 | required init?(coder: NSCoder) { 65 | super.init(coder: coder) 66 | } 67 | 68 | override func resetCursorRects() { 69 | addCursorRect(self.bounds, cursor: .pointingHand) 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /OpenInTerminal/PreferencesWindow/AdvancedPreferencesViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AdvancedPreferencesViewController.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/5/5. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import OpenInTerminalCore 11 | import ServiceManagement 12 | import ShortcutRecorder 13 | 14 | class AdvancedPreferencesViewController: PreferencesViewController { 15 | 16 | @IBOutlet weak var defaultTerminalShortcut: RecorderControl! 17 | @IBOutlet weak var defaultEditorShortcut: RecorderControl! 18 | @IBOutlet weak var copyPathShortcut: RecorderControl! 19 | @IBOutlet weak var resetPreferencesButton: NSButton! 20 | 21 | // MARK: Lifecycle 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | 26 | defaultTerminalShortcut.bind(.value, to: Defaults, withKeyPath: Constants.Key.defaultTerminalShortcut) 27 | defaultEditorShortcut.bind(.value, to: Defaults, withKeyPath: Constants.Key.defaultEditorShortcut) 28 | copyPathShortcut.bind(.value, to: Defaults, withKeyPath: Constants.Key.copyPathShortcut) 29 | } 30 | 31 | 32 | // MARK: Button Actions 33 | 34 | @IBAction func resetPreferencesButtonClicked(_ sender: NSButton) { 35 | let alert = NSAlert() 36 | 37 | alert.messageText = NSLocalizedString("alert.reset_preferences_title", comment: "Reset User Preferences?") 38 | alert.informativeText = NSLocalizedString("alert.reset_preferences_description", comment: "⚠️ Note that this will reset all user preferences") 39 | 40 | // Add button and avoid the focus ring 41 | let cancelString = NSLocalizedString("general.cancel", comment: "Cancel") 42 | alert.addButton(withTitle: cancelString).refusesFirstResponder = true 43 | 44 | let yesString = NSLocalizedString("general.yes", comment: "Yes") 45 | alert.addButton(withTitle: yesString).refusesFirstResponder = true 46 | 47 | let modalResult = alert.runModal() 48 | 49 | switch modalResult { 50 | case .alertFirstButtonReturn: 51 | print("Cancel Resetting User Preferences") 52 | case .alertSecondButtonReturn: 53 | logw("Reset User Preferences") 54 | SMLoginItemSetEnabled(Constants.Id.LauncherApp as CFString, false) 55 | DefaultsManager.shared.removeAllUserDefaults() 56 | DefaultsManager.shared.firstSetup() 57 | let appDelegate = NSApplication.shared.delegate as! AppDelegate 58 | appDelegate.setStatusToggle() 59 | default: 60 | print("Cancel Resetting User Preferences") 61 | } 62 | } 63 | 64 | @IBAction func quitButtonClicked(_ sender: NSButton) { 65 | LaunchNotifier.postNotification(.terminateApp, object: Bundle.main.bundleIdentifier!) 66 | NSApp.terminate(self) 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /OpenInTerminal/PreferencesWindow/CustomInputViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomInputViewController.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2021/1/14. 6 | // Copyright © 2021 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import OpenInTerminalCore 11 | 12 | class CustomInputViewController: NSViewController { 13 | 14 | @IBOutlet weak var appNameTextField: NSTextField! 15 | @IBOutlet weak var terminalTypeButton: NSButton! 16 | @IBOutlet weak var editorTypeButton: NSButton! 17 | @IBOutlet weak var cancelButton: NSButton! 18 | @IBOutlet weak var confirmButton: NSButton! 19 | var appName: String? 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | appNameTextField.delegate = self 24 | } 25 | 26 | override func viewWillAppear() { 27 | super.viewWillAppear() 28 | terminalTypeButton.state = .off 29 | editorTypeButton.state = .off 30 | if let name = appName { 31 | appNameTextField.stringValue = name 32 | } 33 | refreshConfirmState() 34 | } 35 | 36 | @IBAction func terminalTypeButtonClicked(_ sender: NSButton) { 37 | editorTypeButton.state = .off 38 | refreshConfirmState() 39 | } 40 | 41 | @IBAction func editorTypeButtonClicked(_ sender: NSButton) { 42 | terminalTypeButton.state = .off 43 | refreshConfirmState() 44 | } 45 | 46 | @IBAction func cancelButtonClicked(_ sender: NSButton) { 47 | dismiss(nil) 48 | } 49 | 50 | @IBAction func confirmButtonClicked(_ sender: NSButton) { 51 | confirmButton.isEnabled = false 52 | if let presenting = presentingViewController as? CustomPreferencesViewController { 53 | let name = appNameTextField.stringValue 54 | let type: AppType = terminalTypeButton.state == .on ? .terminal : .editor 55 | let app = App(name: name, type: type) 56 | presenting.addCustomApp(app) 57 | dismiss(nil) 58 | } 59 | } 60 | 61 | func refreshConfirmState() { 62 | if appNameTextField.stringValue.count > 0 && (terminalTypeButton.state == .on || editorTypeButton.state == .on) { 63 | confirmButton.isEnabled = true 64 | } else { 65 | confirmButton.isEnabled = false 66 | } 67 | } 68 | 69 | } 70 | 71 | extension CustomInputViewController: NSTextFieldDelegate { 72 | 73 | func controlTextDidChange(_ obj: Notification) { 74 | refreshConfirmState() 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /OpenInTerminal/PreferencesWindow/PreferencesViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PreferenceViewController.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/4/20. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class PreferencesViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Set the size for each views 17 | self.preferredContentSize = NSMakeSize(self.view.frame.size.width, self.view.frame.size.height) 18 | 19 | } 20 | 21 | override func viewWillAppear() { 22 | super.viewWillAppear() 23 | 24 | } 25 | 26 | override func viewDidAppear() { 27 | super.viewDidAppear() 28 | 29 | // Update window title with the active TabView title 30 | // self.parent?.view.window?.title = self.title! 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /OpenInTerminal/PreferencesWindow/PreferencesWindowController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PreferencesWindowController.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/4/29. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class PreferencesWindowController: NSWindowController { 12 | 13 | override func windowDidLoad() { 14 | super.windowDidLoad() 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /OpenInTerminal/ScriptGenerator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScriptGenerator.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/10/15. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import OpenInTerminalCore 11 | 12 | /// Install AppleScripts to $HOME/Library/Application Scripts/wang.jianing.app.OpenInTerminalFinderExtension 13 | func checkScripts() throws { 14 | guard var scriptFolderPath = try? FileManager.default.url(for: .applicationScriptsDirectory, in: .userDomainMask, appropriateFor: nil, create: true) else { 15 | throw OITMError.cannotAccessPath("$HOME/Library/Application Scripts/wang.jianing.app.OpenInTerminal") 16 | } 17 | scriptFolderPath.deleteLastPathComponent() 18 | let finderExScriptPath = scriptFolderPath.appendingPathComponent(Constants.Id.FinderExtension) 19 | if !FileManager.default.fileExists(atPath: finderExScriptPath.path) { 20 | try FileManager.default.createDirectory(atPath: finderExScriptPath.path, 21 | withIntermediateDirectories: true, 22 | attributes: nil) 23 | } 24 | 25 | func writeScriptIfNeeded(at path: URL, with script: String) throws { 26 | if FileManager.default.fileExists(atPath: path.path) { 27 | // check if the existing file's content is the same as `script` 28 | let existingScript = try String(contentsOf: path, encoding: String.Encoding.utf8) 29 | if existingScript == script { 30 | // don't need to write again 31 | return 32 | } 33 | } 34 | try script.write(to: path, atomically: true, encoding: String.Encoding.utf8) 35 | } 36 | 37 | // write general script 38 | let generalScriptName = ScriptManager.shared.getGeneralScriptName() 39 | let generalScriptPath = finderExScriptPath 40 | .appendingPathComponent(generalScriptName) 41 | .appendingPathExtension("scpt") 42 | let generalScript = ScriptManager.shared.getGeneralScript() 43 | try writeScriptIfNeeded(at: generalScriptPath, with: generalScript) 44 | 45 | // write terminal new tab script 46 | let tabScriptName = ScriptManager.shared.getTerminalNewTabScriptName() 47 | let tabScriptPath = finderExScriptPath 48 | .appendingPathComponent(tabScriptName) 49 | .appendingPathExtension("scpt") 50 | let tabScript = ScriptManager.shared.getTerminalNewTabAppleScript() 51 | try writeScriptIfNeeded(at: tabScriptPath, with: tabScript) 52 | 53 | } 54 | -------------------------------------------------------------------------------- /OpenInTerminal/StatusMenuController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatusMenuController.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/4/30. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import OpenInTerminalCore 11 | import ShortcutRecorder 12 | 13 | class StatusMenuController: NSObject, NSMenuDelegate { 14 | 15 | @IBOutlet weak var statusMenu: NSMenu! 16 | @IBOutlet weak var defaultTerminalMenuItem: NSMenuItem! 17 | @IBOutlet weak var defaultEditorMenuItem: NSMenuItem! 18 | @IBOutlet weak var copyPathMenuItem: NSMenuItem! 19 | @IBOutlet weak var preferencesMenuItem: NSMenuItem! 20 | @IBOutlet weak var quitMenuItem: NSMenuItem! 21 | 22 | // MARK: Menu life cycle 23 | 24 | func setMenuItemTitle() { 25 | var terminalTitle = "" 26 | if let terminal = DefaultsManager.shared.defaultTerminal { 27 | terminalTitle = NSLocalizedString("menu.open_in", comment: "Open in ") + terminal.name 28 | } else { 29 | terminalTitle = NSLocalizedString("menu.open_with_default_terminal", 30 | comment: "Open with default Terminal") 31 | } 32 | defaultTerminalMenuItem.title = terminalTitle 33 | 34 | var editorTitle = "" 35 | if let editor = DefaultsManager.shared.defaultEditor { 36 | editorTitle = NSLocalizedString("menu.open_in", comment: "Open in ") + editor.name 37 | } else { 38 | editorTitle = NSLocalizedString("menu.open_with_default_editor", 39 | comment: "Open with default Editor") 40 | } 41 | defaultEditorMenuItem.title = editorTitle 42 | } 43 | 44 | override func awakeFromNib() { 45 | Log.logger.directory = "~/Library/Logs/OpenInTerminal" 46 | #if DEBUG 47 | Log.logger.name = "OpenInTerminal-debug" 48 | #else 49 | Log.logger.name = "OpenInTerminal" 50 | #endif 51 | //Edit printToConsole parameter in Edit Scheme > Run > Arguments > Environment Variables 52 | Log.logger.printToConsole = ProcessInfo.processInfo.environment["print_log"] == "true" 53 | 54 | statusMenu.delegate = self 55 | 56 | copyPathMenuItem.title = NSLocalizedString("menu.copy_path_to_clipboard", comment: "Copy path to Clipboard") 57 | preferencesMenuItem.title = NSLocalizedString("menu.preferences", comment: "Preferences...") 58 | quitMenuItem.title = NSLocalizedString("menu.quit", comment: "Quit") 59 | } 60 | 61 | func menuWillOpen(_ menu: NSMenu) { 62 | setMenuItemTitle() 63 | let menuItems: [(NSMenuItem, String)] = 64 | [(defaultTerminalMenuItem, Constants.Key.defaultTerminalShortcut), 65 | (defaultEditorMenuItem, Constants.Key.defaultEditorShortcut), 66 | (copyPathMenuItem, Constants.Key.copyPathShortcut)] 67 | 68 | menuItems.forEach { item, key in 69 | assignKeyboardShortcutToMenuItem(item, userDefaultsKey: key) 70 | } 71 | } 72 | 73 | func assignKeyboardShortcutToMenuItem(_ menuItem: NSMenuItem, userDefaultsKey key: String) { 74 | if let shortcutDict = Defaults.value(forKey: key), 75 | let shortcut = Shortcut(dictionary: shortcutDict as! [AnyHashable : Any]) { 76 | menuItem.keyEquivalentModifierMask = shortcut.modifierFlags 77 | menuItem.keyEquivalent = shortcut.characters ?? "" 78 | } else { 79 | menuItem.keyEquivalentModifierMask = [] 80 | menuItem.keyEquivalent = "" 81 | } 82 | } 83 | 84 | // MARK: Menu Item Actions 85 | 86 | @IBAction func openDefaultTerminal(_ sender: NSMenuItem) { 87 | (NSApplication.shared.delegate as? AppDelegate)?.openDefaultTerminal() 88 | } 89 | 90 | @IBAction func openDefaultEditor(_ sender: NSMenuItem) { 91 | (NSApplication.shared.delegate as? AppDelegate)?.openDefaultEditor() 92 | } 93 | 94 | @IBAction func copyPathToClipboard(_ sender: NSMenuItem) { 95 | (NSApplication.shared.delegate as? AppDelegate)?.copyPathToClipboard() 96 | } 97 | 98 | @IBAction func showPreferences(_ sender: NSMenuItem) { 99 | (NSApplication.shared.delegate as? AppDelegate)?.showPreferencesWindow() 100 | } 101 | 102 | @IBAction func quit(_ sender: NSMenuItem) { 103 | LaunchNotifier.postNotification(.terminateApp, object: Bundle.main.bundleIdentifier!) 104 | NSApp.terminate(self) 105 | } 106 | 107 | } 108 | -------------------------------------------------------------------------------- /OpenInTerminal/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by Jianing Wang on 2019/4/22. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "Okay"; 10 | "general.cancel" = "Abbrechen"; 11 | "general.yes" = "Ja"; 12 | 13 | "menu.open_in" = "Öffnen mit "; 14 | "menu.open_with_default_terminal" = "Im Terminal öffnen"; 15 | "menu.open_with_default_editor" = "Im Editor öffnen"; 16 | "menu.copy_path_to_clipboard" = "Pfad kopieren"; 17 | "menu.new_file" = "Neue Datei"; 18 | 19 | "menu.preferences" = "Einstellungen..."; 20 | "menu.quit" = "Beenden"; 21 | 22 | "pref.toolbar.not_installed" = "Nicht installiert"; 23 | 24 | "alert.pick_terminal_title" = "Öffnen mit?"; 25 | "alert.pick_terminal_description" = "Bitte wählen Sie eines der folgenden Terminals als Standard zum Öffnen."; 26 | 27 | "alert.pick_editor_title" = "Öffnen mit?"; 28 | "alert.pick_editor_description" = "Bitte wählen Sie eines der folgenden Editoren als Standard zum Öffnen."; 29 | 30 | "alert.reset_preferences_title" = "Benutzereinstellungen zurücksetzen?"; 31 | "alert.reset_preferences_description" = "⚠️ Beachten Sie, dass dadurch alle Benutzereinstellungen zurückgesetzt werden"; 32 | 33 | "toolbar.item_name" = "Im Terminal öffnen"; 34 | "toolbar.item_tooltip" = "Aktuellen Ordner im Terminal öffnen."; 35 | 36 | "pref.custom.menu.installed_supported" = "Installierte unterstützte Programme"; 37 | "pref.custom.menu.all_supported" = "Alle unterstützten Programme"; 38 | "pref.custom.menu.running_apps" = "Laufende Programme"; 39 | "pref.custom.menu.manually_select" = "Manuell vom Finder auswählen"; 40 | "pref.custom.menu.manually_input" = "Manuelle Eingabe"; 41 | 42 | 43 | -------------------------------------------------------------------------------- /OpenInTerminal/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by Jianing Wang on 2019/4/22. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Cancel"; 11 | "general.yes" = "Yes"; 12 | 13 | "menu.open_in" = "Open in "; 14 | "menu.open_with_default_terminal" = "Open in Terminal"; 15 | "menu.open_with_default_editor" = "Open in Editor"; 16 | "menu.copy_path_to_clipboard" = "Copy path"; 17 | "menu.new_file" = "New file"; 18 | 19 | "menu.preferences" = "Preferences..."; 20 | "menu.quit" = "Quit"; 21 | 22 | "pref.toolbar.not_installed" = "Not Installed"; 23 | 24 | "alert.pick_terminal_title" = "Open In?"; 25 | "alert.pick_terminal_description" = "Please select one of the following terminals as the default terminal to open."; 26 | 27 | "alert.pick_editor_title" = "Open In?"; 28 | "alert.pick_editor_description" = "Please select one of the following editors as the default editor to open."; 29 | 30 | "alert.reset_preferences_title" = "Reset User Preferences?"; 31 | "alert.reset_preferences_description" = "⚠️ Note that this will reset all user preferences"; 32 | 33 | "toolbar.item_name" = "Open in Terminal"; 34 | "toolbar.item_tooltip" = "Open current directory in Terminal."; 35 | 36 | "pref.custom.menu.installed_supported" = "Installed Supported Apps"; 37 | "pref.custom.menu.all_supported" = "All Supported Apps"; 38 | "pref.custom.menu.running_apps" = "Running Apps"; 39 | "pref.custom.menu.manually_select" = "Manually Select From Finder"; 40 | "pref.custom.menu.manually_input" = "Manually Input"; 41 | 42 | 43 | -------------------------------------------------------------------------------- /OpenInTerminal/es.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by Jianing Wang on 2019/4/22. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Cancelar"; 11 | "general.yes" = "Sí"; 12 | 13 | "menu.open_in" = "Abrir en "; 14 | "menu.open_with_default_terminal" = "Abrir en Terminal"; 15 | "menu.open_with_default_editor" = "Abrir en Editor"; 16 | "menu.copy_path_to_clipboard" = "Copiar ruta"; 17 | "menu.new_file" = "Nuevo archivo"; 18 | 19 | "menu.preferences" = "Preferencias..."; 20 | "menu.quit" = "Salir"; 21 | 22 | "pref.toolbar.not_installed" = "No instalado"; 23 | 24 | "alert.pick_terminal_title" = "Abrir en?"; 25 | "alert.pick_terminal_description" = "Seleccione una de las siguientes terminales como terminal predeterminado."; 26 | 27 | "alert.pick_editor_title" = "Abrir en?"; 28 | "alert.pick_editor_description" = "Seleccione uno de los siguientes editores como editor predeterminado."; 29 | 30 | "alert.reset_preferences_title" = "Restablecer preferencias de usuario?"; 31 | "alert.reset_preferences_description" = "⚠️ Esto restablecerá todas las preferencias del usuario"; 32 | 33 | "toolbar.item_name" = "Abrir en Terminal"; 34 | "toolbar.item_tooltip" = "Abrir el directorio actual en la Terminal."; 35 | -------------------------------------------------------------------------------- /OpenInTerminal/fr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by Jianing Wang on 2019/4/22. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Annuler"; 11 | "general.yes" = "Oui"; 12 | 13 | "menu.open_in" = "Ouvrir dans "; 14 | "menu.open_with_default_terminal" = "Ouvrir dans le terminal"; 15 | "menu.open_with_default_editor" = "Ouvrir dans l'éditeur"; 16 | "menu.copy_path_to_clipboard" = "Copier le chemin d’accès"; 17 | "menu.new_file" = "Nouveau fichier"; 18 | 19 | "menu.preferences" = "Préférences..."; 20 | "menu.quit" = "Quitter"; 21 | 22 | "pref.toolbar.not_installed" = "Pas installé"; 23 | 24 | "alert.pick_terminal_title" = "Ouvrir avec?"; 25 | "alert.pick_terminal_description" = "Veuillez sélectionner l’un de ses terminaux ci-dessous pour être utilisé comme terminal par défaut."; 26 | 27 | "alert.pick_editor_title" = "Ouvrir avec?"; 28 | "alert.pick_editor_description" = "Veuillez sélectionner l’un de ses éditeurs ci-dessous pour être utilisé comme éditeur par défaut."; 29 | 30 | "alert.reset_preferences_title" = "Réinitialiser les préférences l’utilisateur?"; 31 | "alert.reset_preferences_description" = "⚠️ Notez que cela réinitialisera toutes les préférences de l'utilisateur"; 32 | 33 | "toolbar.item_name" = "Ouvrir dans le terminal"; 34 | "toolbar.item_tooltip" = "Ouvrir le dossier actuel dans le terminal"; 35 | -------------------------------------------------------------------------------- /OpenInTerminal/it.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by arendruni on 2020/4/8. 6 | Copyright © 2020 arendruni. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Annulla"; 11 | "general.yes" = "Sì"; 12 | 13 | "menu.open_in" = "Apri in "; 14 | "menu.open_with_default_terminal" = "Apri in Terminale"; 15 | "menu.open_with_default_editor" = "Apri nell'Editor"; 16 | "menu.copy_path_to_clipboard" = "Copia percorso"; 17 | "menu.new_file" = "Nuovo file"; 18 | 19 | "menu.preferences" = "Preferenze..."; 20 | "menu.quit" = "Esci"; 21 | 22 | "pref.toolbar.not_installed" = "Non Installato"; 23 | 24 | "alert.pick_terminal_title" = "Apri con?"; 25 | "alert.pick_terminal_description" = "Seleziona uno dei seguenti terminali per impostarlo come terminale default."; 26 | 27 | "alert.pick_editor_title" = "Apri con?"; 28 | "alert.pick_editor_description" = "Seleziona uno dei seguenti editor per impostarlo come editor di default."; 29 | 30 | "alert.reset_preferences_title" = "Ripristinare le Preferenze utente?"; 31 | "alert.reset_preferences_description" = "⚠️ Tutte le Preferenze utente saranno ripristinate"; 32 | 33 | "toolbar.item_name" = "Apri in Terminale"; 34 | "toolbar.item_tooltip" = "Apri la cartella corrente in Terminale."; 35 | -------------------------------------------------------------------------------- /OpenInTerminal/ko.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by Jianing Wang on 2019/4/22. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "확인"; 10 | "general.cancel" = "취소"; 11 | "general.yes" = "승인"; 12 | 13 | "menu.open_in" = "다음으로 열기: "; 14 | "menu.open_with_default_terminal" = "터미널에서 열기"; 15 | "menu.open_with_default_editor" = "에디터에서 열기"; 16 | "menu.copy_path_to_clipboard" = "위치 복사하기"; 17 | "menu.new_file" = "새 파일"; 18 | 19 | "menu.preferences" = "설정..."; 20 | "menu.quit" = "종료"; 21 | 22 | "pref.toolbar.not_installed" = "설치되지 않음"; 23 | 24 | "alert.pick_terminal_title" = "어디서 열까요?"; 25 | "alert.pick_terminal_description" = "다음 터미널 중 기본 터미널로 사용할 하나를 선택해주세요."; 26 | 27 | "alert.pick_editor_title" = "어디서 열까요?"; 28 | "alert.pick_editor_description" = "다음 에디터들 중 기본 에디터로 사용할 하나를 선택해주세요."; 29 | 30 | "alert.reset_preferences_title" = "사용자 설정을 초기화할까요?"; 31 | "alert.reset_preferences_description" = "⚠️ 모든 사용자 설정이 초기화됩니다."; 32 | 33 | "toolbar.item_name" = "터미널에서 열기"; 34 | "toolbar.item_tooltip" = "현재 디렉토리를 터미널에서 엽니다."; 35 | 36 | "pref.custom.menu.installed_supported" = "설치된 지원되는 앱"; 37 | "pref.custom.menu.all_supported" = "모든 지원되는 앱"; 38 | "pref.custom.menu.running_apps" = "실행중인 앱"; 39 | "pref.custom.menu.manually_select" = "Finder에서 수동으로 선택"; 40 | "pref.custom.menu.manually_input" = "수동으로 입력"; 41 | 42 | 43 | -------------------------------------------------------------------------------- /OpenInTerminal/ru.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by Egor Lazarev on 2020/1/30. 6 | Copyright © 2019 Egor Lazarev. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "OK"; 10 | "general.cancel" = "Отменить"; 11 | "general.yes" = "Да"; 12 | 13 | "menu.open_in" = "Открыть в "; 14 | "menu.open_with_default_terminal" = "Открыть через Терминал"; 15 | "menu.open_with_default_editor" = "Открыть в редакторе"; 16 | "menu.copy_path_to_clipboard" = "Скопировать путь"; 17 | "menu.new_file" = "Новый файл"; 18 | 19 | "menu.preferences" = "Настройки..."; 20 | "menu.quit" = "Выйти"; 21 | 22 | "pref.toolbar.not_installed" = "Не установлено"; 23 | 24 | "alert.pick_terminal_title" = "Открыть в?"; 25 | "alert.pick_terminal_description" = "Пожалуйста, выберите один из доступных терминалов для установки по-умолчанию."; 26 | 27 | "alert.pick_editor_title" = "Открыть в?"; 28 | "alert.pick_editor_description" = "Пожалуйста, выберите один из доступных редакторов для установки по-умолчанию."; 29 | 30 | "alert.reset_preferences_title" = "Сбросить пользовательские настройки?"; 31 | "alert.reset_preferences_description" = "⚠️ Все пользовательские настройки будут сброшены"; 32 | 33 | "toolbar.item_name" = "Открыть через Терминал"; 34 | "toolbar.item_tooltip" = "Открыть текущую директорию через Терминал."; 35 | -------------------------------------------------------------------------------- /OpenInTerminal/tr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by Jianing Wang on 2019/4/22. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "Tamam"; 10 | "general.cancel" = "İptal"; 11 | "general.yes" = "Evet"; 12 | 13 | "menu.open_in" = "Şununla Aç: "; 14 | "menu.open_with_default_terminal" = "Terminal ile aç"; 15 | "menu.open_with_default_editor" = "Düzenleyici ile aç"; 16 | "menu.copy_path_to_clipboard" = "Yolu kopyala"; 17 | "menu.new_file" = "Yeni dosya"; 18 | 19 | "menu.preferences" = "Tercihler..."; 20 | "menu.quit" = "Çık"; 21 | 22 | "pref.toolbar.not_installed" = "Yüklü Değil"; 23 | 24 | "alert.pick_terminal_title" = "Şununla Aç?"; 25 | "alert.pick_terminal_description" = "Lütfen belirtilen terminallerden birini varsayılan olarak ayarlamak için seçin."; 26 | 27 | "alert.pick_editor_title" = "Şununla Aç?"; 28 | "alert.pick_editor_description" = "Lütfen belirtilen düzenleyicilerden birini varsayılan olarak ayarlamak için seçin."; 29 | 30 | "alert.reset_preferences_title" = "Kullanıcı Tercihlerini Sıfırla?"; 31 | "alert.reset_preferences_description" = "⚠️ Bu bütün kullanıcı tercihlerini sıfırlayacaktır."; 32 | 33 | "toolbar.item_name" = "Terminal ile aç"; 34 | "toolbar.item_tooltip" = "Konumu terminal ile aç."; 35 | 36 | "pref.custom.menu.installed_supported" = "Yüklünmiş Desteklenen Uygulamalar"; 37 | "pref.custom.menu.all_supported" = "Bütün Desteklenen Uygulamalar"; 38 | "pref.custom.menu.running_apps" = "Çalışan Uygulamalar"; 39 | "pref.custom.menu.manually_select" = "Elle Finder üzerinden seç"; 40 | "pref.custom.menu.manually_input" = "Elle Giriş"; 41 | 42 | 43 | -------------------------------------------------------------------------------- /OpenInTerminal/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | OpenInTerminal 4 | 5 | Created by Jianing Wang on 2019/4/22. 6 | Copyright © 2019 Jianing Wang. All rights reserved. 7 | */ 8 | 9 | "general.ok" = "好"; 10 | "general.cancel" = "取消"; 11 | "general.yes" = "是的"; 12 | 13 | "menu.open_in" = "打开 "; 14 | "menu.open_with_default_terminal" = "打开终端"; 15 | "menu.open_with_default_editor" = "打开编辑器"; 16 | "menu.copy_path_to_clipboard" = "拷贝路径"; 17 | "menu.new_file" = "新建文件"; 18 | 19 | "menu.preferences" = "偏好设置..."; 20 | "menu.quit" = "退出"; 21 | 22 | "pref.toolbar.not_installed" = "未安装"; 23 | 24 | "alert.pick_terminal_title" = "打开?"; 25 | "alert.pick_terminal_description" = "请在下面的终端中选择一个作为默认终端。"; 26 | 27 | "alert.pick_editor_title" = "打开?"; 28 | "alert.pick_editor_description" = "请在下面的编辑器中选择一个作为默认编辑器。"; 29 | 30 | "alert.reset_preferences_title" = "重置用户偏好设置?"; 31 | "alert.reset_preferences_description" = "⚠️ 注意这将会重置所有用户偏好设置"; 32 | 33 | "toolbar.item_name" = "Open in Terminal"; 34 | "toolbar.item_tooltip" = "打开当前路径到终端"; 35 | 36 | "pref.custom.menu.installed_supported" = "已安装的受支持的应用"; 37 | "pref.custom.menu.all_supported" = "所有受支持的应用"; 38 | "pref.custom.menu.running_apps" = "正在运行的应用"; 39 | "pref.custom.menu.manually_select" = "从访达中手动选择"; 40 | "pref.custom.menu.manually_input" = "手动输入"; 41 | -------------------------------------------------------------------------------- /OpenInTerminalCore/AppManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppManager.swift 3 | // OpenInTerminalCore 4 | // 5 | // Created by Jianing Wang on 2020/12/18. 6 | // Copyright © 2020 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class AppManager { 12 | 13 | public static var shared = AppManager() 14 | 15 | public func pickTerminalAlert() -> App? { 16 | let alert = NSAlert() 17 | alert.messageText = NSLocalizedString("alert.pick_terminal_title", comment: "Open In?") 18 | alert.informativeText = NSLocalizedString("alert.pick_terminal_description", comment: "Please select one of the following terminals as the default terminal to open.") 19 | // Add button and avoid the focus ring 20 | let cancelString = NSLocalizedString("general.cancel", comment: "Cancel") 21 | alert.addButton(withTitle: cancelString).refusesFirstResponder = true 22 | alert.addButton(withTitle: SupportedApps.terminal.name).refusesFirstResponder = true 23 | alert.addButton(withTitle: SupportedApps.iTerm.name).refusesFirstResponder = true 24 | alert.addButton(withTitle: SupportedApps.hyper.name).refusesFirstResponder = true 25 | let modalResult = alert.runModal() 26 | switch modalResult { 27 | case .alertFirstButtonReturn: 28 | return nil 29 | case .alertSecondButtonReturn: 30 | return SupportedApps.terminal.app 31 | case .alertThirdButtonReturn: 32 | return SupportedApps.iTerm.app 33 | default: 34 | return SupportedApps.hyper.app 35 | } 36 | } 37 | 38 | public func pickEditorAlert() -> App? { 39 | let alert = NSAlert() 40 | alert.messageText = NSLocalizedString("alert.pick_editor_title", comment: "Open In?") 41 | alert.informativeText = NSLocalizedString("alert.pick_editor_description", comment: "Please select one of the following editors as the default editor to open.") 42 | // Add button and avoid the focus ring 43 | let cancelString = NSLocalizedString("general.cancel", comment: "Cancel") 44 | alert.addButton(withTitle: cancelString).refusesFirstResponder = true 45 | alert.addButton(withTitle: SupportedApps.vscode.name).refusesFirstResponder = true 46 | alert.addButton(withTitle: SupportedApps.sublime.name).refusesFirstResponder = true 47 | alert.addButton(withTitle: SupportedApps.atom.name).refusesFirstResponder = true 48 | let modalResult = alert.runModal() 49 | switch modalResult { 50 | case .alertFirstButtonReturn: 51 | return nil 52 | case .alertSecondButtonReturn: 53 | return SupportedApps.vscode.app 54 | case .alertThirdButtonReturn: 55 | return SupportedApps.sublime.app 56 | default: 57 | return SupportedApps.atom.app 58 | } 59 | } 60 | 61 | public static func getApplicationName(from path: String?) -> String { 62 | guard let validPath = path else { 63 | return "Invalid Name" 64 | } 65 | guard let validBundle = Bundle.init(url: URL.init(fileURLWithPath: validPath)) else { 66 | return getApplicationFileName(from: validPath) 67 | } 68 | let CFBundleDisplayName = validBundle.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String 69 | let CFBundleName = validBundle.object(forInfoDictionaryKey: "CFBundleName") as? String 70 | let FileName = getApplicationFileName(from: validPath) 71 | return CFBundleDisplayName ?? CFBundleName ?? FileName 72 | } 73 | 74 | public static func getApplicationName(from path: URL) -> String { 75 | return getApplicationName(from: path.path) 76 | } 77 | 78 | public static func getApplicationFileName(from path: String) -> String { 79 | var rawName = FileManager().displayName(atPath: path).removingPercentEncoding! 80 | let lowercased = rawName.lowercased() 81 | if lowercased.hasSuffix(".app") { 82 | let start = rawName.startIndex 83 | let end = rawName.index(rawName.endIndex, offsetBy: -4) 84 | rawName = String(rawName[start.. NSImage { 91 | guard let validPath = path else { 92 | return #imageLiteral(resourceName: "SF.cube") 93 | } 94 | return NSWorkspace.shared.icon(forFile: validPath) 95 | } 96 | 97 | public static func getApplicationIcon(from path: URL) -> NSImage { 98 | return getApplicationIcon(from: path.path) 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /OpenInTerminalCore/Constants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Config.swift 3 | // OpenInTerminal 4 | // 5 | // Created by Jianing Wang on 2019/4/17. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Constants { 12 | 13 | /// Identifier 14 | struct Id { 15 | static let Group = "group.wang.jianing.app.OpenInTerminal" 16 | static let OpenInTerminalLite = "wang.jianing.app.OpenInTerminal-Lite" 17 | static let OpenInEditorLite = "wang.jianing.app.OpenInEditor-Lite" 18 | static let Finder = "com.apple.Finder" 19 | } 20 | 21 | /// General AppleScript for opening apps 22 | static let generalScript = "generalScript" 23 | /// AppleScript for opening a new tab in Terminal 24 | static let terminalNewTabScript = "terminalNewTabScript" 25 | 26 | struct Commands { 27 | static let alacritty = "open -na Alacritty --args --working-directory" 28 | static let kitty = "open -na kitty --args --single-instance --instance-group 1 --directory" 29 | static let wezterm = "open -na wezterm --args start --cwd" 30 | static let tabby = "open -na tabby --args --directory" 31 | /// "Open In NeoVim" only supports Alacritty, wezterm, and kitty. 32 | static let neovim = "open -na kitty --args /opt/homebrew/bin/nvim PATH" 33 | // static let neovim = "open -na wezterm --args start /opt/homebrew/bin/nvim PATH" 34 | // static let neovim = "open -na Alacritty --args -e /opt/homebrew/bin/nvim PATH" 35 | 36 | } 37 | 38 | } 39 | 40 | public enum QuickToggleType: String { 41 | 42 | case openWithDefaultTerminal 43 | case openWithDefaultEditor 44 | case copyPathToClipboard 45 | 46 | public var name: String { 47 | switch self { 48 | case .openWithDefaultTerminal: 49 | return NSLocalizedString("menu.open_with_default_terminal", comment: "Open with default Terminal") 50 | case .openWithDefaultEditor: 51 | return NSLocalizedString("menu.open_with_default_editor", comment: "Open with default Editor") 52 | case .copyPathToClipboard: 53 | return NSLocalizedString("menu.copy_path_to_clipboard", comment: "Copy path to Clipboard") 54 | } 55 | } 56 | } 57 | 58 | public enum NewOptionType: String { 59 | case tab 60 | case window 61 | } 62 | 63 | let encoder = JSONEncoder() 64 | let decoder = JSONDecoder() 65 | 66 | public enum CustomMenuIconOption: String { 67 | case no 68 | case simple 69 | case original 70 | } 71 | -------------------------------------------------------------------------------- /OpenInTerminalCore/Defaults.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Defaults.swift 3 | // OpenInTerminalCore 4 | // 5 | // Created by Jianing Wang on 2019/4/21. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /// group defaults 12 | let GroupDefaults = UserDefaults(suiteName: Constants.Id.Group) 13 | 14 | /// current defaults 15 | public var Defaults: UserDefaults = { 16 | if Bundle.main.bundleIdentifier == Constants.Id.OpenInTerminalLite || 17 | Bundle.main.bundleIdentifier == Constants.Id.OpenInEditorLite { 18 | return UserDefaults.standard 19 | } else { 20 | return GroupDefaults ?? UserDefaults.standard 21 | } 22 | }() 23 | 24 | public class DefaultsKeys { 25 | fileprivate init() {} 26 | } 27 | 28 | public class DefaultsKey: DefaultsKeys { 29 | let _key: String 30 | 31 | init(_ key: String) { 32 | self._key = key 33 | } 34 | } 35 | 36 | public extension DefaultsKeys { 37 | // Preferences - General 38 | static let firstSetup = DefaultsKey("FirstSetup") 39 | static let launchAtLogin = DefaultsKey("LaunchAtLogin") 40 | static let quickToggle = DefaultsKey("QuickToggle") 41 | static let quickToggleType = DefaultsKey("QuickToggleType") 42 | static let hideStatusItem = DefaultsKey("HideStatusItem") 43 | static let hideContextMenuItems = DefaultsKey("HideContextMenuItems") 44 | static let defaultTerminal = DefaultsKey("DefaultTerminal") 45 | static let defaultEditor = DefaultsKey("DefaultEditor") 46 | // Preferences - Custom 47 | static let terminalNewOption = DefaultsKey("TerminalNewOption") 48 | static let iTermNewOption = DefaultsKey("iTermNewOption") 49 | static let customMenuOptions = DefaultsKey("CustomMenuOptions") 50 | static let customMenuApplyToToolbar = DefaultsKey("CustomMenuApplyToToolbar") 51 | static let customMenuApplyToContext = DefaultsKey("CustomMenuApplyToContext") 52 | static let customMenuIconOption = DefaultsKey("CustomMenuIconOption") 53 | static let pathEscapeOption = DefaultsKey("PathEscapeOption") 54 | static let kittyCommand = DefaultsKey("KittyCommand") 55 | static let neovimCommand = DefaultsKey("NeovimCommand") 56 | 57 | // for Lite 58 | static let liteDefaultTerminal = DefaultsKey("LiteDefaultTerminal") 59 | static let liteDefaultEditor = DefaultsKey("LiteDefaultEditor") 60 | } 61 | 62 | public extension UserDefaults { 63 | subscript(key: DefaultsKey) -> String? { 64 | get { return string(forKey: key._key) } 65 | set { set(newValue, forKey: key._key) } 66 | } 67 | subscript(key: DefaultsKey) -> Bool { 68 | get { return bool(forKey: key._key) } 69 | set { set(newValue, forKey: key._key) } 70 | } 71 | subscript(key: DefaultsKey) -> Int { 72 | get { return integer(forKey: key._key) } 73 | set { set(newValue, forKey: key._key) } 74 | } 75 | subscript(key: DefaultsKey) -> Float { 76 | get { return float(forKey: key._key) } 77 | set { set(newValue, forKey: key._key) } 78 | } 79 | subscript(key: DefaultsKey) -> Double { 80 | get { return double(forKey: key._key) } 81 | set { set(newValue, forKey: key._key) } 82 | } 83 | subscript(key: DefaultsKey) -> URL? { 84 | get { return url(forKey: key._key) } 85 | set { set(newValue, forKey: key._key) } 86 | } 87 | subscript(key: DefaultsKey) -> Any? { 88 | get { return value(forKey: key._key) } 89 | set { set(newValue, forKey: key._key) } 90 | } 91 | subscript(key: DefaultsKey<[Any]>) -> [Any]? { 92 | get { return array(forKey: key._key) } 93 | set { set(newValue, forKey: key._key) } 94 | } 95 | subscript(key: DefaultsKey) -> Data? { 96 | get { return data(forKey: key._key) } 97 | set { set(newValue, forKey: key._key) } 98 | } 99 | subscript(key: DefaultsKey<[String : Any]>) -> [String : Any]? { 100 | get { return dictionary(forKey: key._key) } 101 | set { set(newValue, forKey: key._key) } 102 | } 103 | subscript(key: DefaultsKey<[String]>) -> [String]? { 104 | get { return stringArray(forKey: key._key) } 105 | set { set(newValue, forKey: key._key) } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /OpenInTerminalCore/Error.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Error.swift 3 | // cd2swiftTest 4 | // 5 | // Created by Jianing Wang on 2019/4/10. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | enum OITError: Error { 12 | case cannotAccessFinder 13 | case cannotAccessApp(_ appName: String) 14 | case wrongUrl 15 | case cannotCreateAppleScript(_ source: String) 16 | case cannotExcuteAppleScript(_ error: Error) 17 | } 18 | 19 | extension OITError : CustomStringConvertible { 20 | var description: String { 21 | switch self { 22 | case .cannotAccessFinder: 23 | return "Cannot access Finder, please check permissions." 24 | case .cannotAccessApp(let appName): 25 | return "Cannot access \(appName), please check permissions." 26 | case .wrongUrl: 27 | return "Oops, got a wrong url" 28 | case .cannotCreateAppleScript(let source): 29 | return "Cannot create AppleScript:\n\(source)" 30 | case .cannotExcuteAppleScript(let error): 31 | return "Cannot excute AppleScript:\n\(error)" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /OpenInTerminalCore/Extensions/ArrayExtensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArrayExtensions.swift 3 | // OpenInTerminalCore 4 | // 5 | // Created by Jianing Wang on 2020/4/6. 6 | // Copyright © 2020 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public extension Array { 12 | 13 | mutating func move(from start: Index, to end: Index) { 14 | guard (0.. [String] { 33 | return sorted { $0.localizedCaseInsensitiveCompare($1) == ComparisonResult.orderedAscending } 34 | } 35 | 36 | mutating func sortIgnoreCase() { 37 | sort { $0.localizedCaseInsensitiveCompare($1) == ComparisonResult.orderedAscending } 38 | } 39 | 40 | } 41 | 42 | public extension Array where Element == App { 43 | 44 | func sortedIgnoreCase() -> [App] { 45 | return sorted { $0.name.localizedCaseInsensitiveCompare($1.name) == ComparisonResult.orderedAscending } 46 | } 47 | 48 | mutating func sortIgnoreCase() { 49 | sort { $0.name.localizedCaseInsensitiveCompare($1.name) == ComparisonResult.orderedAscending } 50 | } 51 | 52 | } 53 | 54 | 55 | public extension Array where Element: Equatable { 56 | 57 | mutating func remove(element: Element) { 58 | if let index = self.firstIndex(of: element) { 59 | self.remove(at: index) 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /OpenInTerminalCore/Extensions/PathExtensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PathExtensions.swift 3 | // OpenInTerminalCore 4 | // 5 | // Created by Jianing Wang on 11/22/24. 6 | // Copyright © 2024 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // MARK: - Escape 12 | 13 | public extension String { 14 | 15 | /// Handle space in name. 16 | /// `count`: number of escape characters. 17 | func nameSpaceEscaped(_ count: Int = 1) -> String { 18 | let escapeChar = String(repeating: "\\", count: count) 19 | let escapeSpace = escapeChar + " " 20 | let replaced = self.replacingOccurrences(of: " ", with: escapeSpace) 21 | return replaced 22 | } 23 | 24 | /// Handle special char in path. 25 | /// `count`: number of escape characters. 26 | func specialCharEscaped(_ count: Int = 1) -> String { 27 | let escapeChar = String(repeating: "\\", count: count) 28 | var result = "" 29 | let set: [Character] = [" ", "(", ")", "&", "|", ";", 30 | "\"", "'", "<", ">", "`"] 31 | for char in self { 32 | if set.contains(char) { 33 | result += escapeChar 34 | } 35 | result.append(char) 36 | } 37 | return result 38 | } 39 | 40 | // FIXME: if path contains "\" or """, application will crash. 41 | // Special symbols have been tested, excluding backslashes and double quotes. 42 | func terminalPathEscaped() -> String { 43 | var result = "" 44 | let set = CharacterSet.alphanumerics 45 | for char in self.unicodeScalars { 46 | if set.contains(char) || char == "/" { 47 | result.unicodeScalars.append(char) 48 | } else { 49 | result += "\\\\" 50 | result.unicodeScalars.append(char) 51 | } 52 | } 53 | return result 54 | } 55 | } 56 | 57 | // MARK: - URL 58 | 59 | public extension URL { 60 | 61 | /// Get the directory part of the URL by removing the last part if it's a file. 62 | mutating func getDirectory() { 63 | var isDirectory: ObjCBool = false 64 | if FileManager.default.fileExists(atPath: self.path, isDirectory: &isDirectory) { 65 | if !isDirectory.boolValue { 66 | self = self.deletingLastPathComponent() 67 | } 68 | } 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /OpenInTerminalCore/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 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSHumanReadableCopyright 22 | Copyright © 2019 Jianing Wang. All rights reserved. 23 | 24 | 25 | -------------------------------------------------------------------------------- /OpenInTerminalCore/Log.swift: -------------------------------------------------------------------------------- 1 | // 2 | // log.swift 3 | // cd2swiftTest 4 | // 5 | // Created by Jianing Wang on 2019/4/10. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | ///The log class containing all the needed methods 12 | open class Log { 13 | 14 | ///The max size a log file can be in Kilobytes. Default is 1024 (1 MB) 15 | open var maxFileSize: UInt64 = 1024 16 | 17 | ///The max number of log file that will be stored. Once this point is reached, the oldest file is deleted. 18 | open var maxFileCount = 4 19 | 20 | ///The directory in which the log files will be written 21 | open var directory = Log.defaultDirectory() { 22 | didSet { 23 | directory = NSString(string: directory).expandingTildeInPath 24 | 25 | let fileManager = FileManager.default 26 | if !fileManager.fileExists(atPath: directory) { 27 | do { 28 | try fileManager.createDirectory(atPath: directory, withIntermediateDirectories: true, attributes: nil) 29 | } catch { 30 | NSLog("Couldn't create directory at \(directory)") 31 | } 32 | } 33 | } 34 | } 35 | 36 | open var currentPath: String { 37 | return "\(directory)/\(logName(0))" 38 | } 39 | 40 | ///The name of the log files 41 | open var name = "logfile" 42 | 43 | ///Whether or not logging also prints to the console 44 | open var printToConsole = true 45 | 46 | ///logging singleton 47 | open class var logger: Log { 48 | 49 | struct Static { 50 | static let instance: Log = Log() 51 | } 52 | return Static.instance 53 | } 54 | //the date formatter 55 | var dateFormatter: DateFormatter { 56 | let formatter = DateFormatter() 57 | formatter.timeStyle = .medium 58 | formatter.dateStyle = .medium 59 | return formatter 60 | } 61 | 62 | ///write content to the current log file. 63 | open func write(_ text: String) { 64 | let path = currentPath 65 | let fileManager = FileManager.default 66 | if !fileManager.fileExists(atPath: path) { 67 | do { 68 | try "".write(toFile: path, atomically: true, encoding: String.Encoding.utf8) 69 | } catch _ { 70 | } 71 | } 72 | if let fileHandle = FileHandle(forWritingAtPath: path) { 73 | let dateStr = dateFormatter.string(from: Date()) 74 | let writeText = "[\(dateStr)]: \(text)\n" 75 | fileHandle.seekToEndOfFile() 76 | fileHandle.write(writeText.data(using: String.Encoding.utf8)!) 77 | fileHandle.closeFile() 78 | if printToConsole { 79 | print(writeText, terminator: "") 80 | } 81 | cleanup() 82 | } 83 | } 84 | ///do the checks and cleanup 85 | func cleanup() { 86 | let path = "\(directory)/\(logName(0))" 87 | let size = fileSize(path) 88 | let maxSize: UInt64 = maxFileSize*1024 89 | if size > 0 && size >= maxSize && maxSize > 0 && maxFileCount > 0 { 90 | rename(0) 91 | //delete the oldest file 92 | let deletePath = "\(directory)/\(logName(maxFileCount))" 93 | let fileManager = FileManager.default 94 | do { 95 | try fileManager.removeItem(atPath: deletePath) 96 | } catch _ { 97 | } 98 | } 99 | } 100 | 101 | ///check the size of a file 102 | func fileSize(_ path: String) -> UInt64 { 103 | let fileManager = FileManager.default 104 | let attrs: NSDictionary? = try? fileManager.attributesOfItem(atPath: path) as NSDictionary 105 | if let dict = attrs { 106 | return dict.fileSize() 107 | } 108 | return 0 109 | } 110 | 111 | ///Recursive method call to rename log files 112 | func rename(_ index: Int) { 113 | let fileManager = FileManager.default 114 | let path = "\(directory)/\(logName(index))" 115 | let newPath = "\(directory)/\(logName(index+1))" 116 | if fileManager.fileExists(atPath: newPath) { 117 | rename(index+1) 118 | } 119 | do { 120 | try fileManager.moveItem(atPath: path, toPath: newPath) 121 | } catch _ { 122 | } 123 | } 124 | 125 | ///gets the log name 126 | func logName(_ num :Int) -> String { 127 | return "\(name)-\(num).log" 128 | } 129 | 130 | ///get the default log directory 131 | class func defaultDirectory() -> String { 132 | var path = "" 133 | let fileManager = FileManager.default 134 | #if os(iOS) 135 | let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) 136 | path = "\(paths[0])/Logs" 137 | #elseif os(macOS) 138 | let urls = fileManager.urls(for: .libraryDirectory, in: .userDomainMask) 139 | if let url = urls.last { 140 | path = "\(url.path)/Logs" 141 | } 142 | #endif 143 | if !fileManager.fileExists(atPath: path) && path != "" { 144 | do { 145 | try fileManager.createDirectory(atPath: path, withIntermediateDirectories: false, attributes: nil) 146 | } catch _ { 147 | } 148 | } 149 | return path 150 | } 151 | 152 | } 153 | 154 | ///Writes content to the current log file 155 | public func logw(_ text: String) { 156 | Log.logger.write(text) 157 | } 158 | -------------------------------------------------------------------------------- /OpenInTerminalCore/OpenInTerminalCore.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenInTerminalCore.h 3 | // OpenInTerminalCore 4 | // 5 | // Created by Cameron Ingham on 4/17/19. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for OpenInTerminalCore. 12 | FOUNDATION_EXPORT double OpenInTerminalCoreVersionNumber; 13 | 14 | //! Project version string for OpenInTerminalCore. 15 | FOUNDATION_EXPORT const unsigned char OpenInTerminalCoreVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /OpenInTerminalCore/SupportedApps.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SupportedApps.swift 3 | // OpenInTerminalCore 4 | // 5 | // Created by Jianing Wang on 2020/12/5. 6 | // Copyright © 2020 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public enum SupportedApps: String, CaseIterable { 12 | 13 | // MARK: - Terminals 14 | case terminal = "Terminal" 15 | case iTerm = "iTerm" 16 | case hyper = "Hyper" 17 | case alacritty = "Alacritty" 18 | case kitty = "kitty" 19 | case wezterm = "WezTerm" 20 | case tabby = "Tabby" 21 | case warp = "Warp" 22 | case githubDesktop = "GitHub Desktop" 23 | case fork = "Fork" 24 | case ghostty = "Ghostty" 25 | 26 | // MARK: - Editors 27 | case textEdit = "TextEdit" 28 | case xcode = "Xcode" 29 | case vscode = "Visual Studio Code" 30 | case atom = "Atom" 31 | case sublime = "Sublime Text" 32 | case vscodium = "VSCodium" 33 | case bbedit = "BBEdit" 34 | case vscodeInsiders = "Visual Studio Code - Insiders" 35 | case textMate = "TextMate" 36 | case cotEditor = "CotEditor" 37 | case macVim = "MacVim" 38 | case typora = "Typora" 39 | case nova = "Nova" 40 | case cursor = "Cursor" 41 | case neovim = "neovim" 42 | case zed = "Zed" 43 | // JetBrains 44 | case appCode = "AppCode" 45 | case cLion = "CLion" 46 | case fleet = "Fleet" 47 | case goLand = "GoLand" 48 | case intelliJIDEA = "IntelliJ IDEA" 49 | case phpStorm = "PhpStorm" 50 | case pyCharm = "PyCharm" 51 | case rubyMine = "RubyMine" 52 | case webStorm = "WebStorm" 53 | case androidstudio = "Android Studio" 54 | 55 | public var name: String { 56 | return self.rawValue 57 | } 58 | 59 | public var shortName: String { 60 | switch self { 61 | case .vscode: return "VSCode" 62 | case .sublime: return "Sublime" 63 | case .vscodeInsiders: return "VSCodeInsiders" 64 | case .intelliJIDEA: return "IntelliJ_IDEA" 65 | case .androidstudio: return "Android_Studio" 66 | default: 67 | return self.rawValue 68 | } 69 | } 70 | 71 | public var type: AppType { 72 | switch self { 73 | case .terminal, .iTerm, .hyper, .alacritty, .kitty, .wezterm, .tabby, .warp, .githubDesktop, .fork, .ghostty: 74 | return .terminal 75 | default: 76 | return .editor 77 | } 78 | } 79 | 80 | public static func isSupported(_ app: App) -> Bool { 81 | for sa in SupportedApps.allCases { 82 | if sa.name == app.name { 83 | return true 84 | } 85 | } 86 | return false 87 | } 88 | 89 | public static func `is`(_ app: App, is supported: SupportedApps) -> Bool { 90 | return app.name == supported.name 91 | } 92 | 93 | public static var terminals: [SupportedApps] { 94 | return SupportedApps.allCases.filter { 95 | $0.type == .terminal 96 | } 97 | } 98 | 99 | public static var editors: [SupportedApps] { 100 | return SupportedApps.allCases.filter { 101 | $0.type == .editor 102 | } 103 | } 104 | 105 | public var bundleId: String { 106 | switch self { 107 | // Terminals 108 | case .terminal: return "com.apple.Terminal" 109 | case .iTerm: return "com.googlecode.iterm2" 110 | case .hyper: return "co.zeit.hyper" 111 | case .alacritty: return "io.alacritty" 112 | case .kitty: return "net.kovidgoyal.kitty" 113 | case .wezterm: return "com.github.wez.wezterm" 114 | case .tabby: return "org.tabby" 115 | case .warp: return "dev.warp" 116 | case .githubDesktop: return "" 117 | case .fork: return "" 118 | case .ghostty: return "com.mitchellh.ghostty" 119 | // Editors 120 | case .textEdit: return "com.apple.TextEdit" 121 | case .xcode: return "com.apple.Xcode" 122 | case .vscode: return "com.microsoft.VSCode" 123 | case .atom: return "com.github.atom" 124 | case .sublime: return "com.sublimetext.3" 125 | case .vscodium: return "com.visualstudio.code.oss" 126 | case .bbedit: return "com.barebones.bbedit" 127 | case .vscodeInsiders: return "com.microsoft.VSCodeInsiders" 128 | case .textMate: return "com.macromates.TextMate" 129 | case .cotEditor: return "" 130 | case .macVim: return "org.vim.MacVim" 131 | case .typora: return "abnerworks.Typora" 132 | case .nova: return "com.panic.Nova" 133 | case .cursor: return "com.todesktop.230313mzl4w4u92" 134 | case .appCode: return "com.jetbrains.appcode" 135 | case .cLion: return "com.jetbrains.clion" 136 | case .fleet: return "com.jetbrains.fleet" 137 | case .goLand: return "com.jetbrains.goland" 138 | case .intelliJIDEA: return "com.jetbrains.intellij" 139 | case .phpStorm: return "com.jetbrains.PhpStorm" 140 | case .pyCharm: return "com.jetbrains.pycharm" 141 | case .rubyMine: return "com.jetbrains.rubymine" 142 | case .webStorm: return "com.jetbrains.webstorm" 143 | case .androidstudio: return "" 144 | case .neovim: return "" 145 | case .zed: return "" 146 | } 147 | } 148 | 149 | public var app: App { 150 | var app = App(name: self.name, type: self.type) 151 | app.bundleId = self.bundleId 152 | return app 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /OpenInTerminalFinderExtension/FinderAssets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /OpenInTerminalFinderExtension/FinderAssets.xcassets/Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Finder_extension_icon.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Finder_extension_icon@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Finder_extension_icon@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /OpenInTerminalFinderExtension/FinderAssets.xcassets/Icon.imageset/Finder_extension_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminalFinderExtension/FinderAssets.xcassets/Icon.imageset/Finder_extension_icon.png -------------------------------------------------------------------------------- /OpenInTerminalFinderExtension/FinderAssets.xcassets/Icon.imageset/Finder_extension_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminalFinderExtension/FinderAssets.xcassets/Icon.imageset/Finder_extension_icon@2x.png -------------------------------------------------------------------------------- /OpenInTerminalFinderExtension/FinderAssets.xcassets/Icon.imageset/Finder_extension_icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/OpenInTerminalFinderExtension/FinderAssets.xcassets/Icon.imageset/Finder_extension_icon@3x.png -------------------------------------------------------------------------------- /OpenInTerminalFinderExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | OpenInTerminalFinderExtension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | 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 © 2019 Jianing Wang. All rights reserved. 38 | NSPrincipalClass 39 | NSApplication 40 | 41 | 42 | -------------------------------------------------------------------------------- /OpenInTerminalFinderExtension/OpenInTerminalFinderExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.application-groups 8 | 9 | group.wang.jianing.app.OpenInTerminal 10 | 11 | com.apple.security.automation.apple-events 12 | 13 | com.apple.security.files.user-selected.read-only 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OpenInTerminalHelper/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // OpenInTerminalHelper 4 | // 5 | // Created by Jianing Wang on 2019/5/5. 6 | // Copyright © 2019 Jianing Wang. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | public func applicationDidFinishLaunching(_ aNotification: Notification) { 15 | let mainAppIdentifier = "wang.jianing.OpenInTerminal" 16 | let running = NSWorkspace.shared.runningApplications 17 | var alreadyRunning = false 18 | 19 | for app in running { 20 | if app.bundleIdentifier == mainAppIdentifier { 21 | alreadyRunning = true 22 | break 23 | } 24 | } 25 | 26 | if !alreadyRunning { 27 | LaunchNotifier.addObserver(observer: NSApp, 28 | selector: #selector(NSApplication.terminate(_:)), 29 | notification: .terminateApp, 30 | object: mainAppIdentifier) 31 | 32 | let path = Bundle.main.bundlePath as NSString 33 | var components = path.pathComponents 34 | components.removeLast() 35 | components.removeLast() 36 | components.removeLast() 37 | components.append("MacOS") 38 | components.append("OpenInTerminal") 39 | 40 | let newPath = NSString.path(withComponents: components) 41 | NSWorkspace.shared.launchApplication(newPath) 42 | } else { 43 | NSApp.terminate(self) 44 | } 45 | } 46 | 47 | func applicationWillTerminate(_ aNotification: Notification) { 48 | print("helper app terminated") 49 | } 50 | 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /OpenInTerminalHelper/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /OpenInTerminalHelper/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /OpenInTerminalHelper/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.utilities 25 | LSBackgroundOnly 26 | 27 | LSMinimumSystemVersion 28 | $(MACOSX_DEPLOYMENT_TARGET) 29 | NSHumanReadableCopyright 30 | Copyright © 2019 Jianing Wang. All rights reserved. 31 | NSMainStoryboardFile 32 | Main 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /OpenInTerminalHelper/OpenInTerminalHelper.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.application-groups 8 | 9 | $(TeamIdentifierPrefix) 10 | 11 | com.apple.security.automation.apple-events 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Resources/README-Config-zh.md: -------------------------------------------------------------------------------- 1 | # OpenInTerminal 配置 2 | 3 | ## Finder 扩展配置 4 | 5 | 要启用 Finder 扩展,请右键单击 Finder 工具栏,然后选择 自定义工具栏...,如下图所示: 6 | 7 |
8 | 9 |
10 | 11 | 然后将 OpenInTerminal 图标拖动到工具栏中: 12 | 13 |
14 | 15 |
16 | 17 | ### macOS 15 中 Finder 扩展未显示在系统设置中 18 | 19 | #### 1) 手动启用 Finder 扩展 20 | 21 | 从 macOS 15 开始,Apple 从系统设置中移除了 Finder 同步扩展的配置。要启用 Finder 扩展,可以使用 `pluginkit` 命令行工具,如下所示: 22 | 23 | ``` 24 | $ pluginkit -mAD -p com.apple.FinderSync -vvv 25 | ``` 26 | 27 | 会看到类似以下的输出: 28 | 29 | ``` 30 | wang.jianing.app.OpenInTerminal.OpenInTerminalFinderExtension(2.3.5) 31 | Path = /Applications/OpenInTerminal.app/Contents/PlugIns/OpenInTerminalFinderExtension.appex 32 | UUID = F2547F13-4E43-4E88-9D8F-56DF05C020D8 33 | Timestamp = 2024-09-17 09:34:07 +0000 34 | SDK = com.apple.FinderSync 35 | Parent Bundle = /Applications/OpenInTerminal.app 36 | Display Name = OpenInTerminalFinderExtension 37 | Short Name = OpenInTerminalFinderExtension 38 | Parent Name = OpenInTerminal 39 | Platform = macOS 40 | ``` 41 | 42 | 要手动启用 Finder 扩展,请使用输出中的 UUID 运行以下命令: 43 | 44 | ``` 45 | $ pluginkit -e "use" -u "F2547F13-4E43-4E88-9D8F-56DF05C020D8" 46 | ``` 47 | 48 | #### 2) 使用 FinderSyncer 49 | 50 | 或者,您可以使用一个名为 [FinderSyncer](https://zigz.ag/FinderSyncer/) 的图形界面工具来启用扩展。 51 | 52 | ### 在 macOS 14 及更早版本中检查 Finder 扩展权限 53 | 54 | 对于 macOS 14 及更早版本,请确保通过系统偏好设置启用了 Finder 扩展: 55 | 56 | 1. 打开 OpenInTerminal 应用。 57 | 2. 依次进入 系统偏好设置 -> 扩展 -> Finder 扩展。 58 | 3. 勾选 OpenInTerminalFinderExtension 旁的复选框,如下图所示: 59 | 60 |
61 | 62 |
63 | 64 | ## 自定义配置 65 | 66 | ### 针对 Neovim 用户 67 | 68 | 如果您在 OpenInTerminal 中选择 Neovim 作为编辑器,应用将使用 Kitty 作为默认终端。要切换到其他终端(支持的选项包括 Alacritty、WezTerm 和 Kitty),请使用以下命令更新配置。将 `` 替换为您的用户名,并根据您的安装调整 Neovim 路径(此示例为 `/opt/homebrew/bin/nvim`): 69 | 70 | ``` 71 | defaults write /Users//Library/Group\ Containers/group.wang.jianing.app.OpenInTerminal/Library/Preferences/group.wang.jianing.app.OpenInTerminal.plist NeovimCommand "open -na wezterm --args start /opt/homebrew/bin/nvim PATH" 72 | ``` 73 | 74 | 其他终端配置: 75 | 76 | ``` 77 | // kitty: 78 | "open -na kitty --args /opt/homebrew/bin/nvim PATH" 79 | // WezTerm: 80 | "open -na wezterm --args start /opt/homebrew/bin/nvim PATH" 81 | // Alacritty: 82 | "open -na Alacritty --args -e /opt/homebrew/bin/nvim PATH" 83 | ``` 84 | 85 | ### 针对 Kitty 用户 86 | 87 | 默认情况下,Kitty 的启动行为是为每个命令打开一个新实例,如下所示: 88 | 89 | ``` 90 | open -na kitty --args --single-instance --instance-group 1 --directory 91 | ``` 92 | 93 | 如果您想自定义此行为,可以在终端中运行以下命令。请确保将 替换为您的用户名,并根据需要调整命令: 94 | 95 | ``` 96 | defaults write /Users//Library/Group\ Containers/group.wang.jianing.app.OpenInTerminal/Library/Preferences/group.wang.jianing.app.OpenInTerminal.plist KittyCommand "open -na kitty --args --single-instance --instance-group 1 --directory" 97 | ``` 98 | 99 | ## 常见问题 ❓ 100 | 101 |
我不小心点了不授权的按钮
102 |

你可以运行以下命令。这会重置系统设置里的权限。

103 |
tccutil reset AppleEvents wang.jianing.app.OpenInTerminal
104 |
105 | 106 |
路径里的特殊字符
107 |

请不要在路径中使用反斜线 \ 和双引号 "

108 |
109 | 110 |
在 Mojave 上打开了两个终端窗口
111 |

这个问题只发生在第一次启动终端的时候。所以,你可以通过 ⌘W 来关闭终端的窗口,而不是用 ⌘Q 来退出终端。

112 |
113 | 114 |
OpenInTerminal 并不按照我的预期来工作
115 |

OpenInTerminal 将会按照以下顺序来打开终端或编辑器:

116 |
    117 |
  • 1. 打开你所选中的文件或文件夹。
  • 118 |
  • 2. 打开最上面的访达窗口。
  • 119 |
  • 3. 都不是。那么打开桌面。
  • 120 |
121 |
122 | 123 |
我的自定义应用不工作
124 |

如果你的自定义应用不能通过运行以下命令正常运行,那么该应用不支持通过 OpenInTerminal 打开。例如,GitHub Desktop:

125 | open -a GitHub\ Desktop ~/Desktop 126 |
127 | 128 | -------------------------------------------------------------------------------- /Resources/README-Config.md: -------------------------------------------------------------------------------- 1 | # OpenInTerminal Configurations 2 | 3 | ## Finder Extension Configuration 4 | 5 | To enable Finder Extension, right click on Finder toolbar, select `Customize Toolbar...` as shown below: 6 | 7 |
8 | 9 |
10 | 11 | Then drag the `OpenInTerminal` icon to the toolbar: 12 | 13 |
14 | 15 |
16 | 17 | ### Finder Extension Not Showing Up in System Settings on macOS 15 18 | 19 | #### 1) Manually Enable the Finder Extension 20 | 21 | Starting with macOS 15, Apple removed the Finder Sync Extension configuration from System Settings. To enable the Finder Extension, use the `pluginkit` command-line tool as follows: 22 | 23 | ``` 24 | $ pluginkit -mAD -p com.apple.FinderSync -vvv 25 | ``` 26 | 27 | You should see output similar to the following: 28 | 29 | ``` 30 | wang.jianing.app.OpenInTerminal.OpenInTerminalFinderExtension(2.3.5) 31 | Path = /Applications/OpenInTerminal.app/Contents/PlugIns/OpenInTerminalFinderExtension.appex 32 | UUID = F2547F13-4E43-4E88-9D8F-56DF05C020D8 33 | Timestamp = 2024-09-17 09:34:07 +0000 34 | SDK = com.apple.FinderSync 35 | Parent Bundle = /Applications/OpenInTerminal.app 36 | Display Name = OpenInTerminalFinderExtension 37 | Short Name = OpenInTerminalFinderExtension 38 | Parent Name = OpenInTerminal 39 | Platform = macOS 40 | ``` 41 | 42 | To manually enable the Finder Extension, run the following command with the UUID from the output: 43 | 44 | ``` 45 | $ pluginkit -e "use" -u "F2547F13-4E43-4E88-9D8F-56DF05C020D8" 46 | ``` 47 | 48 | #### 2) Use FinderSyncer 49 | 50 | Alternatively, you could use a GUI tool called [FinderSyncer](https://zigz.ag/FinderSyncer/) to enable the extension. 51 | 52 | ### Checking Finder Extension Permissions on macOS 14 and Earlier 53 | 54 | For macOS 14 and earlier, ensure the Finder Extension is enabled via System Preferences: 55 | 56 | 1. Open the OpenInTerminal app. 57 | 2. Navigate to `System Preferences` -> `Extensions` -> `Finder Extensions`. 58 | 3. Check the checkbox next to `OpenInTerminalFinderExtension`, as shown below: 59 | 60 |
61 | 62 |
63 | 64 | ## Custom Configuration 65 | 66 | ### For Neovim Users 67 | 68 | If you select Neovim as your editor in OpenInTerminal, the app will use Kitty as the default terminal. To switch to a different terminal (supported options: Alacritty, WezTerm, and Kitty), update the configuration with the following command. Replace `` with your username and adjust the Neovim path (`/opt/homebrew/bin/nvim` in this example) to match your installation: 69 | 70 | ``` 71 | defaults write /Users//Library/Group\ Containers/group.wang.jianing.app.OpenInTerminal/Library/Preferences/group.wang.jianing.app.OpenInTerminal.plist NeovimCommand "open -na wezterm --args start /opt/homebrew/bin/nvim PATH" 72 | ``` 73 | 74 | Other terminal configurations: 75 | 76 | ``` 77 | // kitty: 78 | "open -na kitty --args /opt/homebrew/bin/nvim PATH" 79 | // WezTerm: 80 | "open -na wezterm --args start /opt/homebrew/bin/nvim PATH" 81 | // Alacritty: 82 | "open -na Alacritty --args -e /opt/homebrew/bin/nvim PATH" 83 | ``` 84 | 85 | ### For Kitty Users 86 | 87 | The default launch behavior for kitty is to open a new instance for each command, like the following: 88 | 89 | ``` 90 | open -na kitty --args --single-instance --instance-group 1 --directory 91 | ``` 92 | 93 | If you want to customize this behavior, you can run the following command in your terminal. Make sure to replace `` with your username and adjust the open command as what you want: 94 | 95 | ``` 96 | defaults write /Users//Library/Group\ Containers/group.wang.jianing.app.OpenInTerminal/Library/Preferences/group.wang.jianing.app.OpenInTerminal.plist KittyCommand "open -na kitty --args --single-instance --instance-group 1 --directory" 97 | ``` 98 | 99 | ## FAQ ❓ 100 | 101 |
Oops, hit Don't Allow button by mistake.
102 |

No sweat! Just run the following command in your terminal, and it'll reset the permissions in System Preferences.

103 |
tccutil reset AppleEvents wang.jianing.app.OpenInTerminal
104 |
105 | 106 |
Special characters in the path.
107 |

Please do not use backslash \ and double quotes " in the path.

108 |
109 | 110 |
Open two Terminal windows on Mojave
111 |

This problem usually occurs when you first start Terminal. Try using ⌘W to close Terminal window, instead of using ⌘Q to quit Terminal.

112 |
113 | 114 |
OpenInTerminal doesn't work as I expected
115 |

OpenInTerminal works as the following order:

116 |
    117 |
  • 1. Open the file or folder you selected.
  • 118 |
  • 2. If nothing's selected, it opens the top Finder window.
  • 119 |
  • 3. If there's no Finder window, it opens the desktop.
  • 120 |
121 |
122 | 123 |
My custom app doesn't work.
124 |

If your custom application doesn't work with the following command, then it's not supported. For example, GitHub Desktop:

125 | open -a GitHub\ Desktop ~/Desktop 126 |
127 | -------------------------------------------------------------------------------- /Resources/README-zh.md: -------------------------------------------------------------------------------- 1 |
2 |

3 | English | 中文 4 |
5 | 6 | ## 如何使用 🚀 7 | 8 | | 核心功能 | OpenInTerminal | 9 | | --- | --- | 10 | | 在终端(或编辑器)中打开目录或文件 | ![](https://user-images.githubusercontent.com/11001224/78589385-b797b880-7872-11ea-9062-c11a49461598.gif) | 11 | | 在自定义应用中打开(以 GitHub Desktop 为例) | ![](https://user-images.githubusercontent.com/11001224/104891620-28483580-59ac-11eb-9fb5-3e4dec7863cc.gif) | 12 | 13 | ### 更多功能 14 | 15 | | 功能 | OpenInTerminal | OpenInTerminal-Lite & OpenInEditor-Lite | 16 | | --- | --- | --- | 17 | | 支持 终端, [iTerm](https://www.iterm2.com/), [Hyper](https://github.com/zeit/hyper), [Alacritty](https://github.com/jwilm/alacritty), [kitty](https://sw.kovidgoyal.net/kitty/), [Warp](https://www.warp.dev), [WezTerm](https://wezfurlong.org/wezterm/index.html), [Tabby](https://tabby.sh), [Ghostty](https://ghostty). | ✅ | ✅ | 18 | | 支持 文本编辑, Xcode, [Visual Studio Code](https://code.visualstudio.com/), [VSCode Insiders](https://code.visualstudio.com/insiders/), [Atom](https://atom.io/), [Sublime Text](https://www.sublimetext.com/), [VSCodium](https://github.com/VSCodium/vscodium), [BBEdit](https://www.barebones.com/products/bbedit/), [TextMate](https://macromates.com), [CotEditor](https://coteditor.com/), [MacVim](https://github.com/macvim-dev/macvim), [JetBrains](https://www.jetbrains.com/)(AppCode, CLion, GoLand, IntelliJ IDEA, PhpStorm, PyCharm, RubyMine, WebStorm, Android Studio, Fleet), [Typora](https://typora.io/), [Nova](https://nova.app/), [Cursor](https://cursor.sh/), [notepad--](https://github.com/cxasm/notepad--), [neovim](https://neovim.io/). | ✅ | ✅ | 19 | | 打开自定义应用(⚠️ 并不是所有的应用都支持) | ✅ | ✅ | 20 | | 支持中文,英语,法语,俄语,意大利语,西班牙语,土耳其语, 德语, 韩语 | ✅ | ✅ | 21 | | 图形化设置界面 | ✅ | ❌ | 22 | | 支持键盘快捷键 | ✅ | ❌ | 23 | 24 | ## OpenInTerminal 和 OpenInTerminal-Lite (OpenInEditor-Lite) 👀 25 | 26 | 选择哪个?如果你喜欢更强大的功能和图形化设置界面,那么你可以选择 `OpenInTerminal`。如果你仅仅需要更快速且更稳定地打开终端或编辑器,那么你可以选择 `OpenInTerminal-Lite`。 27 | 28 | 对于我而言,我更喜欢 `OpenInTerminal-Lite`,它只需要点击一次来完成功能(另一个需要点击两次😂),而且它更轻量一些。 29 | 30 | 对于 `OpenInTerminal-Lite` 用户: 31 | 32 | 请看文档: [English](./README-Lite.md) | [中文说明](./README-Lite-zh.md) 33 | 34 | ## 安装 🖥 35 | 36 | ``` 37 | brew install --cask openinterminal 38 | ``` 39 | 40 | 或者从 [release](https://github.com/Ji4n1ng/OpenInTerminal/releases) 中手动下载。 41 | 42 | ## 配置和常见问题 ⚙️ 43 | 44 | 请看文档 [配置](./Resources/README-Config-zh.md) 45 | 46 | ## 支持 ❤️ 47 | 48 | 感谢各位的支持! 49 | 50 | 通过 [GitHub Sponsors](https://github.com/sponsors/Ji4n1ng) 支持 💖。 51 | 52 | | PayPal | 支付宝 | 微信 | 53 | | --- | --- | --- | 54 | | [paypal.me/ji4ning](https://www.paypal.me/ji4ning) | | | 55 | 56 | 57 | 58 | 59 | 60 | ## 特别感谢 ❤️ 61 | 62 | 感谢所有的贡献者。你们的付出让 OpenInTerminal 更棒了。 63 | 64 | ### 参考项目 65 | 66 | - [jbtule/cdto](https://github.com/jbtule/cdto) 67 | - [es-kumagai/OpenTerminal](https://github.com/es-kumagai/OpenTerminal) 68 | - [tingraldi/SwiftScripting](https://github.com/tingraldi/SwiftScripting) 69 | - [onmyway133/FinderGo](https://github.com/onmyway133/FinderGo) 70 | - [Caldis/Mos](https://github.com/Caldis/Mos/) 71 | -------------------------------------------------------------------------------- /Resources/Support-Alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/Resources/Support-Alipay.jpg -------------------------------------------------------------------------------- /Resources/Support-WeChatPay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ji4n1ng/OpenInTerminal/bee2c57aeb8e00537b128c44c3a035103b97c9f2/Resources/Support-WeChatPay.jpg --------------------------------------------------------------------------------