Skip to content

Commit

Permalink
support more apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Ji4n1ng committed Dec 25, 2023
1 parent d51f29b commit 2e8dbee
Show file tree
Hide file tree
Showing 12 changed files with 107 additions and 4 deletions.
21 changes: 21 additions & 0 deletions OpenInTerminal/Icons.xcassets/Fleet.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Fleet.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions OpenInTerminal/Icons.xcassets/Nova.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Nova.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions OpenInTerminal/Icons.xcassets/Warp.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Warp.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions OpenInTerminal/Icons.xcassets/Xcode.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Xcode.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions OpenInTerminalCore/FinderManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public class FinderManager {
}

if let firstItem = (selectionItems as! Array<AnyObject>).first {
// Files or folders are selected
// Files or folders selected
target = firstItem as! FinderItem
} else {
// Check if there are opened finder windows
// Check if there are finder windows opened
guard let windows = finder.FinderWindows?(),
let firstWindow = windows.firstObject else {
print("No Finder windows are opened or selected")
Expand Down
2 changes: 1 addition & 1 deletion OpenInTerminalCore/ScriptManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class ScriptManager {
if SupportedApps.is(app, is: .alacritty) {
return "open -na Alacritty --args --working-directory"
} else if SupportedApps.is(app, is: .kitty) {
return "open -na kitty --args --directory"
return "open -na kitty --args --single-instance --instance-group 1 --directory"
} else if SupportedApps.is(app, is: .wezterm) {
return "open -na wezterm --args start --cwd"
} else if SupportedApps.is(app, is: .tabby) {
Expand Down
10 changes: 9 additions & 1 deletion OpenInTerminalCore/SupportedApps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ public enum SupportedApps: String, CaseIterable {
case kitty = "kitty"
case wezterm = "WezTerm"
case tabby = "Tabby"
case warp = "Warp"

// MARK: - Editors
case textEdit = "TextEdit"
case xcode = "Xcode"
case vscode = "Visual Studio Code"
case atom = "Atom"
case sublime = "Sublime Text"
Expand All @@ -31,9 +33,11 @@ public enum SupportedApps: String, CaseIterable {
case cotEditor = "CotEditor"
case macVim = "MacVim"
case typora = "Typora"
case nova = "Nova"
// JetBrains
case appCode = "AppCode"
case cLion = "CLion"
case fleet = "Fleet"
case goLand = "GoLand"
case intelliJIDEA = "IntelliJ IDEA"
case phpStorm = "PhpStorm"
Expand All @@ -60,7 +64,7 @@ public enum SupportedApps: String, CaseIterable {

public var type: AppType {
switch self {
case .terminal, .iTerm, .hyper, .alacritty, .kitty, .wezterm, .tabby:
case .terminal, .iTerm, .hyper, .alacritty, .kitty, .wezterm, .tabby, .warp:
return .terminal
default:
return .editor
Expand Down Expand Up @@ -102,8 +106,10 @@ public enum SupportedApps: String, CaseIterable {
case .kitty: return "net.kovidgoyal.kitty"
case .wezterm: return "com.github.wez.wezterm"
case .tabby: return "org.tabby"
case .warp: return "dev.warp"
// Editors
case .textEdit: return "com.apple.TextEdit"
case .xcode: return "com.apple.Xcode"
case .vscode: return "com.microsoft.VSCode"
case .atom: return "com.github.atom"
case .sublime: return "com.sublimetext.3"
Expand All @@ -114,8 +120,10 @@ public enum SupportedApps: String, CaseIterable {
case .cotEditor: return ""
case .macVim: return "org.vim.MacVim"
case .typora: return "abnerworks.Typora"
case .nova: return "com.panic.Nova"
case .appCode: return "com.jetbrains.appcode"
case .cLion: return "com.jetbrains.clion"
case .fleet: return "com.jetbrains.fleet"
case .goLand: return "com.jetbrains.goland"
case .intelliJIDEA: return "com.jetbrains.intellij"
case .phpStorm: return "com.jetbrains.PhpStorm"
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ Become a sponsor through [GitHub Sponsors](https://github.com/sponsors/Ji4n1ng)
## Changes 🗒

<details><summary>show all</summary><br>
<p><strong>version 2.3.7</strong></p>
<ul>
<li>Support Korean</li>
<li>Support Warp</li>
<li>Support WezTerm</li>
<li>Support Tabby</li>
<li>Support Fleet</li>
<li>Support Nova</li>
<li>Support Xcode</li>
<li>For kitty users: open in a signle instance instead of a new one</li>
</ul>
<p><strong>version 2.3.6</strong></p>
<ul>
<li>Support German</li>
Expand Down

0 comments on commit 2e8dbee

Please sign in to comment.