cdepillabout / cdepillabout/break-time

do not show countdown timer in systray when in video chat / calendar event

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Rust
Stars
22
Forks
4
PR merge metrics
No merged PRs in 30d

Description

break-time has two features that don't play nice with each other:

- break-time will not start a break if you have an X window open with a given window title. This is to stop a break occurring when you are in a video chat. break-time will also check your Google Calendar to make sure you are not in a meeting. If you have a meeting scheduled in your calendar, break-time will not start a break.

The plugin-related code can be found here: https://github.com/cdepillabout/break-time/tree/6bad134cf96089ebd0ee372412d83d896b9f8633/src/scheduler/plugins

- break-time will create a countdown timer in the systray icon when a break gets close. This appears as a red `5m`, `4m`, `3m`, etc.

The systray icon code can found here: https://github.com/cdepillabout/break-time/blob/6bad134cf96089ebd0ee372412d83d896b9f8633/src/tray.rs

Currently, the countdown timer will appear in the systray even if you are _currently_ in a video chat, or there is currently a meeting on your Google Calendar.

This isn't a bug, per se, but it would be better if the countdown timer didn't appear until you finished your video chat or Google Calendar event.

Here is the code that controls the count down to the break, as well as calling the plugins at the appropriate time:

https://github.com/cdepillabout/break-time/blob/6bad134cf96089ebd0ee372412d83d896b9f8633/src/scheduler.rs#L141-L254

One way to solve this is to call the plugins before showing the countdown timer (which happens when only 5 minutes are left), and if the plugins indicate that you are currently in a meeting, or have a given window open, then pushing back the next break by 10 or 15 minutes or so.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.