diff --git a/OpenInEditor-Lite/OpenInEditor-Lite/OpenInEditor_Lite.entitlements b/OpenInEditor-Lite/OpenInEditor-Lite/OpenInEditor_Lite.entitlements index 11707083..22a7efc8 100644 --- a/OpenInEditor-Lite/OpenInEditor-Lite/OpenInEditor_Lite.entitlements +++ b/OpenInEditor-Lite/OpenInEditor-Lite/OpenInEditor_Lite.entitlements @@ -18,6 +18,7 @@ com.barebones.bbedit com.microsoft.VSCodeInsiders com.macromates.TextMate + com.axosoft.gitkraken diff --git a/OpenInTerminal-Lite/OpenInTerminal-Lite/OpenInTerminal_Lite.entitlements b/OpenInTerminal-Lite/OpenInTerminal-Lite/OpenInTerminal_Lite.entitlements index cfeeea11..ae6d2138 100644 --- a/OpenInTerminal-Lite/OpenInTerminal-Lite/OpenInTerminal_Lite.entitlements +++ b/OpenInTerminal-Lite/OpenInTerminal-Lite/OpenInTerminal_Lite.entitlements @@ -15,6 +15,7 @@ com.microsoft.VSCode com.github.atom com.sublimetext.3 + com.axosoft.gitkraken diff --git a/OpenInTerminal/Icons.xcassets/GitKraken.imageset/Contents.json b/OpenInTerminal/Icons.xcassets/GitKraken.imageset/Contents.json new file mode 100644 index 00000000..2dd86713 --- /dev/null +++ b/OpenInTerminal/Icons.xcassets/GitKraken.imageset/Contents.json @@ -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 + } +} diff --git a/OpenInTerminal/Icons.xcassets/GitKraken.imageset/GitKraken.png b/OpenInTerminal/Icons.xcassets/GitKraken.imageset/GitKraken.png new file mode 100644 index 00000000..c685fc0c Binary files /dev/null and b/OpenInTerminal/Icons.xcassets/GitKraken.imageset/GitKraken.png differ diff --git a/OpenInTerminal/OpenInTerminal.entitlements b/OpenInTerminal/OpenInTerminal.entitlements index de5e6ae9..b2e48cd2 100644 --- a/OpenInTerminal/OpenInTerminal.entitlements +++ b/OpenInTerminal/OpenInTerminal.entitlements @@ -25,6 +25,7 @@ com.microsoft.VSCodeInsiders com.macromates.TextMate net.kovidgoyal.kitty + com.axosoft.gitkraken diff --git a/OpenInTerminalCore/Constants.swift b/OpenInTerminalCore/Constants.swift index b23de3db..6651773d 100644 --- a/OpenInTerminalCore/Constants.swift +++ b/OpenInTerminalCore/Constants.swift @@ -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" } } diff --git a/OpenInTerminalCore/Defaults.swift b/OpenInTerminalCore/Defaults.swift index fdf61d50..cd0c396d 100644 --- a/OpenInTerminalCore/Defaults.swift +++ b/OpenInTerminalCore/Defaults.swift @@ -53,6 +53,7 @@ public extension DefaultsKeys { static let pathEscapeOption = DefaultsKey("PathEscapeOption") static let kittyCommand = DefaultsKey("KittyCommand") static let neovimCommand = DefaultsKey("NeovimCommand") + static let gitkrakenCommand = DefaultsKey("GitkrakenCommand") // for Lite static let liteDefaultTerminal = DefaultsKey("LiteDefaultTerminal") diff --git a/OpenInTerminalCore/DefaultsManager.swift b/OpenInTerminalCore/DefaultsManager.swift index 5b8a9902..c20471d0 100644 --- a/OpenInTerminalCore/DefaultsManager.swift +++ b/OpenInTerminalCore/DefaultsManager.swift @@ -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 @@ -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))" } diff --git a/OpenInTerminalCore/SupportedApps.swift b/OpenInTerminalCore/SupportedApps.swift index 5e99803d..2ff4dd99 100644 --- a/OpenInTerminalCore/SupportedApps.swift +++ b/OpenInTerminalCore/SupportedApps.swift @@ -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" @@ -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 @@ -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