MCPcopy Index your code
hub / github.com/Darkyenus/DarkyenusTimeTracker

github.com/Darkyenus/DarkyenusTimeTracker @1.5.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.5.3 ↗ · + Follow
149 symbols 340 edges 15 files 12 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Darkyen's Time Tracker

for IntelliJ (and other Jetbrains IDEs)

Track the time spent on a project through a lightweight status bar widget.

Overview

  • Click the widget or start typing to start counting
  • Pauses the timer automatically when idle
  • Click timer widget for options
  • Git integration, inject the time it took to create the commit into the commit message

Features

  • Pause or stop after a given time of inactivity (clicking any buttons/keys or scrolling).
  • When returning after a period of inactivity and the counting is paused, short time durations are automatically counted in, long periods can be counted in manually through a message popup. The auto-count duration is configurable.
  • Start counting automatically when you type something, even when stopped. Configurable.
  • Pause the timer when you work on a different project within the same IDE process, useful when switching projects frequently. Configurable.
  • The time format on the widget is configurable using a simple but flexible template substitution. Includes clear documentation of the format, including examples of frequently requested formats.
  • Ability to inject the time it took to create a Git commit through a Git commit hook, using the same customizable time format. The time is appended at the end of the message, unless your template contains <#DTT#>, which is then replaced by the formatted time instead.
  • Reset the time (and the hidden Git counter time) manually through a button in settings or through an IDE action.
  • Manually adjust counted time.

Internals

The time in IDE is stored in IDE's workspace XML, typically at .idea/workspace.xml. The section looks roughly like this:

<component name="DarkyenusTimeTracker">
    <option name="totalTimeSeconds" value="162561" />
    <option name="gitIntegration" value="true" />
</component>

The exact format is controlled by the IDE and may change in the future.

Git integration files are: - Commit hook at .git/hooks/prepare-commit-msg (a POSIX shell script with /bin/sh shebang) - Git time tracking file at .git/.darkyenus_time_tracker_commit_time (plain text file) - .git/.darkyenus_time_tracker_commit_time.zero may be created temporarily during commit hook run, but shouldn't persist - If you find it, you can safely delete it

Installing

Download from plugin repository or from releases.

Building from source

There are no dependencies, this is a pure IntelliJ plugin. PR's are welcome!

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 126
Class 16
Enum 6
Interface 1

Languages

Java100%

Modules by API surface

src/main/java/com/darkyen/TimeTrackerService.java51 symbols
src/main/java/com/darkyen/TimePattern.java25 symbols
src/main/java/com/darkyen/TimeTrackerWidget.java18 symbols
src/main/java/com/darkyen/TimeTrackerPopupContent.java12 symbols
src/main/java/com/darkyen/GitIntegration.java9 symbols
src/main/java/com/darkyen/TimeTrackerWidgetFactory.java7 symbols
src/main/java/com/darkyen/InactivityService.java6 symbols
src/main/java/com/darkyen/DefaultSettingsService.java6 symbols
src/main/java/com/darkyen/actions/ResetTimeAction.java4 symbols
src/main/java/com/darkyen/actions/ResetGitTimeAction.java4 symbols
src/main/java/com/darkyen/Util.java4 symbols
src/main/java/com/darkyen/TimeTrackerPersistentState.java2 symbols

For agents

$ claude mcp add DarkyenusTimeTracker \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page