Time logging in CLI
Usage:
timelog [flags]
timelog [command]
Available Commands:
adjust Adjusts time between entries
archive Archive data file
autocomplete Autocomplete for entries
clear Clears all entries
help Help about any command
polybar Polybar configuration
qlist Prints all quicklist entries
start Starts a new time entry
stop Stops active time entry
version Prints software version
Flags:
-h, --help help for timelog
Use "timelog [command] --help" for more information about a command.
git clone git@github.com:qbart/timelog.git
cd timelog
make build
timelog
timelog start <comment>
timelog stop
timelog clear
- Current timelog will be printed.
- Once confirmed local database will be cleared
⚠️ .
timelog adjust
- Console UI will start (use arrows or hjkl).
- Enter to continue.
- After changes you will see git-like diff to accept/reject changes.
timelog archive
- Current timelog will be printed.
- Once confirmed file will be moved to archive (
~/.config/timelog/archive/
)
Tested only in Ubuntu (PR appreciated for other OSes)
timelog autocomplete install >> ~/.bash_profile
timelog [hit TAB]
Quicklist is a data source for autocompleter (fzf). Tasks should not contain whitespaces.
vim ~/.config/timelog/config.ini
[quicklist]
task-1
task-2
task-3
hello
task start [hit TAB]
You can integrate timelog with your custom bar:
timelog polybar format "FORMAT"
FORMAT
exposes following vars in go
template:
type polybarItem struct {
Comment string // task comment
Duration string // last task duration
Total string // tasks total duration
Count int // task count
CountNotZero bool //
TotalGtDuration bool // true when total > duration
}
[module/timelog]
type=custom/script
interval=10
exec=timelog polybar format "{{if .CountNotZero }}%{F#011814}%{B#24f5bf} {{.Comment}} %{B-}%{B#0adba6} {{.Duration}} %{B-}{{ if .TotalGtDuration}}%{B#08aa81} {{.Total}} %{B-}{{ end }}%{F-}{{ end }}"
Ask first before any implementation. Possible todos:
- edit comments
timelog edit
(similar totimelog adjust
editor) - quicklist management from CLI ie.
timelog qlist.add ENTRY
- multi-autocomplete i.e
timelog start [TAB]
, thentimelog start autocompleted-1 [TAB]
<- currently this will replaceautocompleted-1
with new qlist entry, goal is to append next one - autocomplete for other OSes (OSx integration anyone?)