summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdil Erchouk <adilrc@icloud.com>2025-03-20 20:36:07 +0100
committerGitHub <noreply@github.com>2025-03-20 20:36:07 +0100
commitac1335125cb7fe742d825a95bb288ff8a8bfadd9 (patch)
tree848e40e706d00e85afd7ffbf64cf61f4fd4dc123
parent407be8f0368379892f7c0d5a3994bfca74e06969 (diff)
downloadzsh-ac1335125cb7fe742d825a95bb288ff8a8bfadd9.tar.gz
zsh-ac1335125cb7fe742d825a95bb288ff8a8bfadd9.tar.bz2
zsh-ac1335125cb7fe742d825a95bb288ff8a8bfadd9.zip
feat(macos): add support for Ghostty (#12890)
-rw-r--r--plugins/macos/README.md1
-rw-r--r--plugins/macos/macos.plugin.zsh18
2 files changed, 19 insertions, 0 deletions
diff --git a/plugins/macos/README.md b/plugins/macos/README.md
index 8245e211f..ccc4331e5 100644
--- a/plugins/macos/README.md
+++ b/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
diff --git a/plugins/macos/macos.plugin.zsh b/plugins/macos/macos.plugin.zsh
index b951a289f..6ddf31ecf 100644
--- a/plugins/macos/macos.plugin.zsh
+++ b/plugins/macos/macos.plugin.zsh
@@ -86,6 +86,12 @@ EOF
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
return 1
@@ -140,6 +146,12 @@ EOF
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
return 1
@@ -195,6 +207,12 @@ EOF
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
return 1