Skip to content

Feature: Autostop timers on obsidan closure #66

Description

@jimd0t

Describe the solution you'd like

I find myself leaving timers running when I close my computer, and as I track my work hours I end up having to adjust them on the next day. I think it would be nice to have an optional toggle to auto close running timers.

Technical description

I did some researching on ways to trigger the information update and there are a few options that I can think of.

  1. The first option is to use the onunload() event handler.
    This would work on closing obsidian manually, but, on system shutdown it could not work as expected.
  2. Create a job that runs every minute that stores the latest save time, then, when obsidian is reopened it would take the latest save time and apply it to any running timer and close them.

Describe alternatives you've considered

I've not found a way of doing this currently.

Additional context

I do understand that not everyone will need this feature, that's why I'm proposing it as an optional toggle in the plugin settings. I know my team uses this plugin for managing tasks and they need to have reports on worked hours so this feature would come in handy for them and I suspect it would be helpful for more users as well.

I'm willing to work on this issue my self.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions