diff --git a/iterm-command/README.md b/iterm-command/README.md new file mode 100644 index 0000000..e520d70 --- /dev/null +++ b/iterm-command/README.md @@ -0,0 +1,8 @@ +# iTerm Command + +Run any command via iTerm when joining a specific room. + +Arguments of the script: + +- `ROOM_NAME` - stringified name +- `COMMAND` - what you want executed in the iTerm window diff --git a/iterm-command/assets/icon.png b/iterm-command/assets/icon.png new file mode 100644 index 0000000..8672658 Binary files /dev/null and b/iterm-command/assets/icon.png differ diff --git a/iterm-command/config.json b/iterm-command/config.json new file mode 100644 index 0000000..c5ebeec --- /dev/null +++ b/iterm-command/config.json @@ -0,0 +1,6 @@ +{ + "name": "iTerm Command", + "description": "Run any command via iTerm when joining a room.", + "platforms": ["macos"], + "language": "bash" +} diff --git a/iterm-command/room-joined b/iterm-command/room-joined new file mode 100755 index 0000000..f6a5518 --- /dev/null +++ b/iterm-command/room-joined @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +COMMAND="echo 'Replace me'" +ROOM_NAME="Standup" + +if [ -z "$TUPLE_HOOK_IS_SELF" ]; then + exit 0 +fi + +if [ "$ROOM_NAME" != "$TUPLE_TRIGGER_ROOM_NAME" ]; then + exit 0 +fi + + +osascript <