Add Support for Tabby Terminal in Macos Plugin (#12451)
* Added Support for Tabby in Macos-Plugin
* Update README.md
Added Supported Terminal List
* chore(macos): Update README to link to terminals
Linking to the supported terminals, moving reference to the original author to the Acknowledgements section
---------
Co-authored-by: Robby Russell <robby@planetargon.com>
Diff
1diff --git a/plugins/macos/README.md b/plugins/macos/README.md
2index 2c52ec8a72696db900f2c5d21f671cd9fbb3a5bf..8245e211f450913f1ce8624c65b6763ff241a37e 100644
3--- a/plugins/macos/README.md
4+++ b/plugins/macos/README.md
5@@ -8,7 +8,11 @@ To start using it, add the `macos` plugin to your plugins array in `~/.zshrc`:
6 plugins=(... macos)
7 ```
8 9-Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
10+## Supported Terminals
11+- [iTerm](https://iterm.sourceforge.net/)
12+- [iTerm2](https://iterm2.com/)
13+- [Hyper](https://hyper.is/)
14+- [Tabby](https://tabby.sh/)
1516 ## Commands
1718@@ -37,7 +41,9 @@ Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
1920 ## Acknowledgements
2122-This application makes use of the following third party scripts:
23+Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
24+
25+This application makes use of the following third-party scripts:
2627 [shpotify](https://github.com/hnarayanan/shpotify)
2829diff --git a/plugins/macos/macos.plugin.zsh b/plugins/macos/macos.plugin.zsh
30index 2702a190163c5289901c6b607bf4c1d7a4bf0e75..b951a289f4426073bbbaa50eebb3ad5054659076 100644
31--- a/plugins/macos/macos.plugin.zsh
32+++ b/plugins/macos/macos.plugin.zsh
33@@ -79,6 +79,13 @@ EOF
34 key code 36 #(presses enter)
35 end tell
36 EOF
37+
38+ elif [[ "$the_app" == 'Tabby' ]]; then
39+ osascript >/dev/null <<EOF
40+ tell application "System Events"
41+ tell process "Tabby" to keystroke "t" using command down
42+ end tell
43+EOF
44 else
45 echo "$0: unsupported terminal app: $the_app" >&2
46 return 1
47@@ -126,6 +133,12 @@ EOF
48 delay 1
49 keystroke "${command} \n"
50 end tell
51+EOF
52+ elif [[ "$the_app" == 'Tabby' ]]; then
53+ osascript >/dev/null <<EOF
54+ tell application "System Events"
55+ tell process "Tabby" to keystroke "D" using command down
56+ end tell
57 EOF
58 else
59 echo "$0: unsupported terminal app: $the_app" >&2
60@@ -175,6 +188,12 @@ EOF
61 delay 1
62 keystroke "${command} \n"
63 end tell
64+EOF
65+ elif [[ "$the_app" == 'Tabby' ]]; then
66+ osascript >/dev/null <<EOF
67+ tell application "System Events"
68+ tell process "Tabby" to keystroke "d" using command down
69+ end tell
70 EOF
71 else
72 echo "$0: unsupported terminal app: $the_app" >&2