slgobinath / SafeEyes

Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder
http://slgobinath.github.io/SafeEyes/
GNU General Public License v3.0
1.46k stars 164 forks source link

Smart recognition of screencasting and video conferences? #257

Open orschiro opened 6 years ago

orschiro commented 6 years ago

Dear @slgobinath,

I am wondering if there is any way to detect running screencasting applications and video conferencing apps? The latter shall include things like meet.google.com running in the browser, for instance.

With this, is it somehow possible to automatically (smartly) pause SafeEyes as long as these apps are running?

That would be neat. :-)

Thanks!

slgobinath commented 6 years ago

It is a great idea! I have a plan to support Google Calendar using gcalcli to avoid breaks while you are in a meeting.

For screencasting and video conferences, we need to find a good way to detect them. If anyone has an idea, please share it.

Thanks

orschiro commented 6 years ago

Hooray, glad your open for this idea, thanks @slgobinath! :-)

orschiro commented 5 years ago

@slgobinath any news on recognising a Google Meet meeting either by checking the tab name or tab url?

image

kael-shipman commented 4 years ago

Hey all,

This would be a great feature, and I'll plus-one it. Just want to remind everyone about bountysource.com, which is a great way to incentivize development of features like this :).

vijay-prema commented 1 year ago

+1 for implementing this feature or finding a way to do this.

I have a concept in my head of how to do it using external script. If successful I will report back.

  1. Script running in background, every 10 seconds, checks for presence of a window based on a filter list or regex, using wmctrl -l.
  2. If such a "video conference" window exists (e.g. with window title "Meet – xxx-xxxx-xxx — Mozilla Firefox"), then send pause command to safeeyes using safeeyes -d
  3. If no such windows found then enable safeeyes with safeeyes -e.

The problem will be that it will keep re-enabling safeeyes if you manually disabled it for some other reason, but lets see how bad it is in practice

vijay-prema commented 1 year ago

So its possible to implement my idea above just by running this bash command every 10 seconds or so (e.g. using crontab).

bash -c "if wmctrl -l | grep -q \"Meet - \"; then safeeyes -d; else safeeyes -e; fi"

Just replace "Meet - " with whatever window name you want to detect.

kael-shipman commented 1 year ago

Hey, this is awesome! Good work!