diff --git a/triggers/close-gmail-tabs/README.md b/triggers/close-gmail-tabs/README.md new file mode 100644 index 0000000..e198a05 --- /dev/null +++ b/triggers/close-gmail-tabs/README.md @@ -0,0 +1,7 @@ +# Close Gmail Tabs on Chrome + +This trigger will hide Gmail tabs on Chrome automatically when you share your display. + +This can be handy to save you from sharing private emails. + +If you're executing this trigger for the first time, `System Events` may prompt you for permission. diff --git a/triggers/close-gmail-tabs/assets/icon.png b/triggers/close-gmail-tabs/assets/icon.png new file mode 100644 index 0000000..7cb5553 Binary files /dev/null and b/triggers/close-gmail-tabs/assets/icon.png differ diff --git a/triggers/close-gmail-tabs/config.json b/triggers/close-gmail-tabs/config.json new file mode 100644 index 0000000..32320b9 --- /dev/null +++ b/triggers/close-gmail-tabs/config.json @@ -0,0 +1,6 @@ +{ + "name": "Close Gmail tabs on Chrome", + "description": "Automatically close Gmail tabs when sharing your screen.", + "platforms": ["macos"], + "language": "applescript" +} diff --git a/triggers/close-gmail-tabs/screen-share-started b/triggers/close-gmail-tabs/screen-share-started new file mode 100755 index 0000000..a0c2dcc --- /dev/null +++ b/triggers/close-gmail-tabs/screen-share-started @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +if [ -n "$TUPLE_TRIGGER_IS_SELF" ]; then + osascript -l JavaScript <<'END' + var chrome = Application('Google Chrome'); + if (chrome.running()) { + var windows = chrome.windows(); + for (var i = 0; i < windows.length; i++) { + var tabs = windows[i].tabs(); + for (var j = tabs.length - 1; j >= 0; j--) { + var tab = tabs[j]; + if (tab.url().includes("mail.google.com")) { + tab.close(); + } + } + } + } +END +fi \ No newline at end of file diff --git a/triggers/hide-discord/README.md b/triggers/hide-discord/README.md new file mode 100644 index 0000000..be8c3cb --- /dev/null +++ b/triggers/hide-discord/README.md @@ -0,0 +1,7 @@ +# Hide Discord + +This trigger will hide the Discord.app automatically when you share your display. + +This can be handy to save you from showing private conversations. + +If you're executing this trigger for the first time, `System Events` may prompt you for permission. diff --git a/triggers/hide-discord/assets/icon.png b/triggers/hide-discord/assets/icon.png new file mode 100644 index 0000000..8f9cf28 Binary files /dev/null and b/triggers/hide-discord/assets/icon.png differ diff --git a/triggers/hide-discord/config.json b/triggers/hide-discord/config.json new file mode 100644 index 0000000..404c870 --- /dev/null +++ b/triggers/hide-discord/config.json @@ -0,0 +1,6 @@ +{ + "name": "Hide Discord.app", + "description": "Automatically hide Discord.app when sharing your screen.", + "platforms": ["macos"], + "language": "applescript" +} diff --git a/triggers/hide-discord/screen-share-started b/triggers/hide-discord/screen-share-started new file mode 100755 index 0000000..0a8bfd2 --- /dev/null +++ b/triggers/hide-discord/screen-share-started @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +if [ -n "$TUPLE_TRIGGER_IS_SELF" ]; then +osascript <