GithubHelp home page GithubHelp logo

daniel-beard / iszoomusingcamera Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 2.87 MB

Simple SwiftUI app that shows if Zoom is actively using the camera or if screen sharing is currently activated.

Swift 100.00%
swiftui zoom macos swift app dnd do-not-disturb

iszoomusingcamera's Introduction

isZoomUsingCamera

Simple SwiftUI app that checks if Zoom is actively using the camera.

Can automatically toggle Do Not Disturb based on when zoom is using the camera.

Usage

There aren't any provided builds yet.

Setting up do not disturb

Note: Do not disturb settings only take effect when the preference: Automatically enable DND when Zoom video is on is set.

Monterey and newer

Use shortcuts. Setup two shortcuts within the Shortcuts.app.

In the examples below, I've named these dndon and dndoff:

Now you can select and save the shortcut names for each do not disturb action in the preferences:

Big Sur

This app doesn't have any native support for setting do not disturb states on Big Sur, but you can emulate the behavior with custom scripts.

Example

Requirements: brew install vitorgalvao/tiny-scripts/calm-notifications

To toggle DnD on camera states:

~/.iszoomusingcamera/camera_enabled.sh

#!/bin/bash

calm-notifications on

~/.iszoomusingcamera/camera_disabled.sh

#!/bin/bash

calm-notifications off

Custom Scripts

There are a few events that can trigger custom scripts if you choose. You must enable the preference: Run custom scripts in ~/.iszoomusingcamera for the following to take effect. Remember to make these scripts user executable with chmod +x ~/.iszoomusingcamera/{name of file}.

Event Path to script
Application started ~/.iszoomusingcamera/app_started.sh
Application ended ~/.iszoomusingcamera/app_ended.sh
Camera enabled ~/.iszoomusingcamera/camera_enabled.sh
Camera disabled ~/.iszoomusingcamera/camera_disabled.sh
Screen sharing started ~/.iszoomusingcamera/screen_sharing_started.sh
Screen sharing ended ~/.iszoomusingcamera/screen_sharing_ended.sh

Custom Script Example

Here's some example scripts that I use. You'll need to brew install terminal-notifier for this to work. Note: paths are correct for M1 machines, if you are on x86_64, change these to /usr/local/bin/:

~/.iszoomusingcamera/camera_enabled.sh:

#!/bin/bash

/opt/homebrew/bin/terminal-notifier -title "isZoomUsingCamera" \
  -message "Camera was STARTED" \
  -contentImage "https://raw.githubusercontent.com/daniel-beard/isZoomUsingCamera/master/isZoomUsingCamera/Assets.xcassets/AppIcon.appiconset/icon_128.png" \

~/.iszoomusingcamera/camera_disabled.sh:

#!/bin/bash

/opt/homebrew/bin/terminal-notifier -title "isZoomUsingCamera" \
  -message "Camera was STOPPED" \
  -contentImage "https://raw.githubusercontent.com/daniel-beard/isZoomUsingCamera/master/isZoomUsingCamera/Assets.xcassets/AppIcon.appiconset/icon_128.png" \

So I get notifications when the camera starts or stops:

iszoomusingcamera's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nicoyuste

iszoomusingcamera's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.