Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<string>com.barebones.bbedit</string>
<string>com.microsoft.VSCodeInsiders</string>
<string>com.macromates.TextMate</string>
<string>com.axosoft.gitkraken</string>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<string>com.microsoft.VSCode</string>
<string>com.github.atom</string>
<string>com.sublimetext.3</string>
<string>com.axosoft.gitkraken</string>
</array>
</dict>
</plist>
21 changes: 21 additions & 0 deletions OpenInTerminal/Icons.xcassets/GitKraken.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "GitKraken.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.
1 change: 1 addition & 0 deletions OpenInTerminal/OpenInTerminal.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<string>com.microsoft.VSCodeInsiders</string>
<string>com.macromates.TextMate</string>
<string>net.kovidgoyal.kitty</string>
<string>com.axosoft.gitkraken</string>
</array>
</dict>
</plist>
2 changes: 1 addition & 1 deletion OpenInTerminalCore/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct Constants {
static let neovim = "open -na kitty --args /opt/homebrew/bin/nvim PATH"
// static let neovim = "open -na wezterm --args start /opt/homebrew/bin/nvim PATH"
// static let neovim = "open -na Alacritty --args -e /opt/homebrew/bin/nvim PATH"

static let gitkraken = "open -na GitKraken --args --path"
}

}
Expand Down
1 change: 1 addition & 0 deletions OpenInTerminalCore/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public extension DefaultsKeys {
static let pathEscapeOption = DefaultsKey<Bool>("PathEscapeOption")
static let kittyCommand = DefaultsKey<String>("KittyCommand")
static let neovimCommand = DefaultsKey<String>("NeovimCommand")
static let gitkrakenCommand = DefaultsKey<String>("GitkrakenCommand")

// for Lite
static let liteDefaultTerminal = DefaultsKey<String>("LiteDefaultTerminal")
Expand Down
13 changes: 13 additions & 0 deletions OpenInTerminalCore/DefaultsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,17 @@ public class DefaultsManager {
}
}

public var gitKrakenCommand: String {
get {
return Defaults[.gitkrakenCommand] ?? Constants.Commands.gitkraken
}

set {
Defaults[.gitkrakenCommand] = newValue
}
}


public func getOpenCommand(_ app: App, escapeCount: Int = 1) -> String {
if SupportedApps.is(app, is: .alacritty) {
return Constants.Commands.alacritty
Expand All @@ -272,6 +283,8 @@ public class DefaultsManager {
return Constants.Commands.tabby
} else if SupportedApps.is(app, is: .neovim) {
return neovimCommand
} else if SupportedApps.is(app, is: .gitKraken) {
return gitKrakenCommand
} else {
return "open -a \(app.name.nameSpaceEscaped(escapeCount))"
}
Expand Down
4 changes: 3 additions & 1 deletion OpenInTerminalCore/SupportedApps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public enum SupportedApps: String, CaseIterable {
case tabby = "Tabby"
case warp = "Warp"
case githubDesktop = "GitHub Desktop"
case gitKraken = "GitKraken"
case fork = "Fork"
case ghostty = "Ghostty"

Expand Down Expand Up @@ -70,7 +71,7 @@ public enum SupportedApps: String, CaseIterable {

public var type: AppType {
switch self {
case .terminal, .iTerm, .hyper, .alacritty, .kitty, .wezterm, .tabby, .warp, .githubDesktop, .fork, .ghostty:
case .terminal, .iTerm, .hyper, .alacritty, .kitty, .wezterm, .tabby, .warp, .githubDesktop, .fork, .ghostty, .gitKraken:
return .terminal
default:
return .editor
Expand Down Expand Up @@ -114,6 +115,7 @@ public enum SupportedApps: String, CaseIterable {
case .tabby: return "org.tabby"
case .warp: return "dev.warp"
case .githubDesktop: return ""
case .gitKraken: return "com.axosoft.gitkraken"
case .fork: return ""
case .ghostty: return "com.mitchellh.ghostty"
// Editors
Expand Down