浏览代码

feat(macos): add support for Ghostty (#12890)

Adil Erchouk 1 月之前
父节点
当前提交
ac1335125c
共有 2 个文件被更改,包括 19 次插入0 次删除
  1. 1 0
      plugins/macos/README.md
  2. 18 0
      plugins/macos/macos.plugin.zsh

+ 1 - 0
plugins/macos/README.md

@@ -13,6 +13,7 @@ plugins=(... macos)
 - [iTerm2](https://iterm2.com/)
 - [Hyper](https://hyper.is/)
 - [Tabby](https://tabby.sh/)
+- [Ghostty](https://ghostty.org)
 
 ## Commands
 

+ 18 - 0
plugins/macos/macos.plugin.zsh

@@ -85,6 +85,12 @@ EOF
       tell application "System Events"
         tell process "Tabby" to keystroke "t" using command down
       end tell
+EOF
+  elif [[ "$the_app" == 'ghostty' ]]; then
+    osascript >/dev/null <<EOF
+      tell application "System Events"
+        tell process "Ghostty" to keystroke "t" using command down
+      end tell
 EOF
   else
     echo "$0: unsupported terminal app: $the_app" >&2
@@ -139,6 +145,12 @@ EOF
       tell application "System Events"
         tell process "Tabby" to keystroke "D" using command down
       end tell
+EOF
+  elif [[ "$the_app" == 'ghostty' ]]; then
+    osascript >/dev/null <<EOF
+      tell application "System Events"
+        tell process "Ghostty" to keystroke "D" using command down
+      end tell
 EOF
   else
     echo "$0: unsupported terminal app: $the_app" >&2
@@ -194,6 +206,12 @@ EOF
       tell application "System Events"
         tell process "Tabby" to keystroke "d" using command down
       end tell
+EOF
+  elif [[ "$the_app" == 'ghostty' ]]; then
+    osascript >/dev/null <<EOF
+      tell application "System Events"
+        tell process "Ghostty" to keystroke "d" using command down
+      end tell
 EOF
   else
     echo "$0: unsupported terminal app: $the_app" >&2