summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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