obsidian-discordrpc icon indicating copy to clipboard operation
obsidian-discordrpc copied to clipboard

Add connection timer/status bar stopwatch

Open leoccyao opened this issue 2 years ago • 0 comments

I would often connect to Discord when starting a writing session in earnest, and while the helpful daily word count tracking in the Better Word Count plugin kept track of my progress in the status bar, I would end up checking my own Discord status to see how long I had spent writing.

Well, constantly tab between Discord and Obsidian no more! This PR adds a stopwatch to the status bar indicating how long the app has been connected to Discord:

image

A new setting is added, Show Connected Time, that enables or disables this little stopwatch. The time displayed on it respects the Use Obsidian Total Time setting: with it enabled, it displays the total time connected; with it disabled, it displays the time spent editing the current file.

Oddly, a simple status bar stopwatch doesn't exist anywhere in the community plugins (we have various pomodoro timers, and a sidebar stopwatch, but no status bar stopwatch), so consider this the first one!

(as an aside: my first series of pushed commits ended up with a ton of line ending errors (see ac90afd), which took a very long time and was very annoying to fix)

leoccyao avatar May 23 '22 03:05 leoccyao