diff options
author | Umberto Lentini <umberto.lentini@gmail.com> | 2019-04-09 14:05:53 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2019-04-09 14:05:53 +0200 |
commit | 351fa06574556a3edca12c5def51a2bf5deed68b (patch) | |
tree | 592405d1e9f652858455ed9c27818e67b51b11c7 /plugins | |
parent | 62abacebea3f93514e41720c689399bcdc74ff39 (diff) | |
download | zsh-351fa06574556a3edca12c5def51a2bf5deed68b.tar.gz zsh-351fa06574556a3edca12c5def51a2bf5deed68b.tar.bz2 zsh-351fa06574556a3edca12c5def51a2bf5deed68b.zip |
osx: added support for Hyper terminal (#7494)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/osx/osx.plugin.zsh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index a1c73a184..7deed0ba6 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -51,6 +51,17 @@ EOF end tell end tell EOF + elif [[ "$the_app" == 'Hyper' ]]; then + osascript >/dev/null <<EOF + tell application "System Events" + tell process "Hyper" to keystroke "t" using command down + end tell + delay 1 + tell application "System Events" + keystroke "${command}" + key code 36 #(presses enter) + end tell +EOF else echo "tab: unsupported terminal app: $the_app" @@ -91,6 +102,19 @@ EOF end tell end tell EOF + + elif [[ "$the_app" == 'Hyper' ]]; then + osascript >/dev/null <<EOF + tell application "System Events" + tell process "Hyper" + tell menu item "Split Vertically" of menu "Shell" of menu bar 1 + click + end tell + end tell + delay 1 + keystroke "${command} \n" + end tell +EOF else echo "$0: unsupported terminal app: $the_app" >&2 @@ -132,6 +156,19 @@ EOF end tell EOF + elif [[ "$the_app" == 'Hyper' ]]; then + osascript >/dev/null <<EOF + tell application "System Events" + tell process "Hyper" + tell menu item "Split Horizontally" of menu "Shell" of menu bar 1 + click + end tell + end tell + delay 1 + keystroke "${command} \n" + end tell +EOF + else echo "$0: unsupported terminal app: $the_app" >&2 false |