Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Possible to add a left sidebar view that see all the tacker? #1

Open
Quorafind opened this issue Sep 28, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Quorafind
Copy link

RT, or a way to find which one is still running to prevent from forgetting

@Ellpeck Ellpeck added the enhancement New feature or request label Sep 28, 2022
@rk-kontur
Copy link

This would be AWESOME!!!!

@brrd
Copy link

brrd commented Sep 11, 2024

You can use this global search in Obsidian to find which timers are still running:

/(?<!"startTime":null,)"endTime":null/

I also wrote this AHK script (Windows only) which shows a modal when closing Obsidian if any timer is unstopped:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Main:
SetTitleMatchMode RegEx
WinWait,- Obsidian v[0-9. ]+$
WinWaitClose,- Obsidian v[0-9. ]+$
ObsisdianCheckUnclosedTimers()
Goto, Main

ObsisdianCheckUnclosedTimers(){
	VaultPath := "C:\Path\To\Vault"
	if !FileExist(VaultPath)
		return
	SearchPattern := VaultPath . "*.md"
	Loop, Files, %SearchPattern%, R
	{
		FileRead, FileContents, %A_LoopFileFullPath%
	    If (ErrorLevel) {
		    MsgBox Error : %A_LastError%
		    return
	    }
		FoundPos := RegExMatch(FileContents, "(?<!""startTime"":null,)""endTime"":null")
		If (FoundPos)
		{
		    MsgBox, 4,, Timers are still running. Run Obsidian?
		    IfMsgBox Yes
			    Run, obsidian://search?vault=Notes&query=/(?<!.startTime.:null`,).endTime.:null/
				return
		}
	}
	return
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants