A fast and minimalist time tracking plugin for Neovim.
Don't waste time tracking your time.
I hate time tracking tools so much I made one. It is meant to be used as a quick scratchpad to store each time you switch from one topic to another (project, ticket, ...) during the day. The report part provides the total time spent on each topic. So at the end of the day, you can seize them on any corporate tracking software you use.
Using packer.nvim
use {
'davlord/minitrack.nvim',
}Using lazy.nvim
{
'davlord/minitrack.nvim
}require('minitrack').setup()From within Neovim startup with :Minitrack command.
Or just start Neovim directly with Minitrack nvim -c ":Minitrack".
The left pane is used for time tracking and the right pane is the report pane.
Ctrl+iinsert current time (if today)
Ctrl+iswitch to tracing pane and insert current time at last line (if today)Ctrl+leftgo to previous dayCtrl+rightgo to next dayCtrl+downgo to todaystoggle sort (by name / by duration)mswitch between report modes (by default there is only a single report mode)ycopy report details lines (duration by topic)
You can pass options to setup :
require("minitrack").setup{
catchphrase = "make time tracking great again",
keybinds = {
insert_current_time = "<C-i>",
navigate_day_previous = "<C-Left>",
navigate_day_next = "<C-Right>",
navigate_day_today = "<C-Down>",
change_report_mode = "m",
change_report_sort = "s",
copy_report_details = "y",
},
report_default_mode = "standard",
}catchphraseSet the catchprase which appears below the titlekeybindsChange keybindingsinsert_current_timeInsert current time keybindnavigate_day_previousGo to previous day keybindnavigate_day_nextGo to next day keybindnnavigate_day_todayGo to today keybindchange_report_modeSwitch report mode keybindchange_report_sortSwitch report details sort by name/duration keybindcopy_report_detailsCopy report details lines into clipboard keybind
report_modesSee report modes for usagereport_default_modeThe report mode displayed by default
The report is split in mutliple sections. Each section is managed by a specific renderer which is bound to a specific name.
titlesection rendererdaysection rendererdetailssection renderersummarysection renderer
Blue lines represent a special renderer separator which is used multiple times.
The report content can be configured with the following setup options :
require("minitrack").setup{
report_modes = {
["standard"] = {
"title",
"separator",
"day",
"separator",
"details",
"separator",
"summary",
}
},
}So for instance if you want to get rid of the title section you just have to remove the unwanted renderers :
require("minitrack").setup{
report_modes = {
["standard"] = {
"day",
"separator",
"details",
"separator",
"summary",
}
},
}In the default configuration the only report mode which exists is named "standard".
You can add any modes as you which adding more keys in report_modes configuration tables.
For example if you want to add a "zen mode" without title and separators :
require("minitrack").setup{
report_modes = {
["zen"] = {
"day",
"details",
"summary",
},
},
}Then you can switch between modes using m (default keybind)
To be able to add or modify report renderers see extensions
To enable an extension just call setup method on it before minitrack setup :
require("minitrack.extensions").setup("some_extension")
require("minitrack").setup{
-- ...
}Minitrack comes with two builtin extensions :
remaining_timewhich completes the report summary with information relative to a fixed target amount of tracking per day.unaliasadds an additional report mode which displays report details using a mapping between something you typed in the tracking and a real world complete label (e.g. a real ticket number)
Enable extension and configure it through expected_duration configuration key as the following :
require("minitrack.extensions").setup("remaining_time")
require("minitrack").setup{
expected_duration = 7 * 60, -- expects 7 hours of tracking per day
-- ...
}Enable extension and configure it through alias configuration key as the following :
require("minitrack.extensions").setup("unalias")
require("minitrack").setup{
aliases = {
["aa "] = "PROJ-AA-",
["bb "] = "ANOTHER-PROJ-",
["xx"] = "my-worktask-xx",
},
-- ...
}You should see the report details section unalias when switching report mode.

This extension allows to name a specific topic which time will be reallocated across other topics. For example :
1:00 a 1:30 a
1:00 _ (reallocated topic) =====> 1:30 b
1:00 b
Enable extension and configure it through topic_to_reallocate configuration key as the following :
require("minitrack.extensions").setup("reallocate")
require("minitrack").setup{
topic_to_reallocate = "_", -- name of the reallocated topic
-- ...
}You can develop your own extensions, with extensions you can :
- Extends and override minitrack configuration
- Extends report renderers (Add new renderers or override existing ones)
Have a look at extensions directory and use builtin extensions as example.



