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 [email protected]:qbart/timelog.git
cd timelog
make build
timelog
timelog start <comment>
timelog stop
timelog clear
timelog adjust
timelog 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:
timelog edit
(similar to timelog adjust
editor)timelog qlist.add ENTRY
timelog start [TAB]
, then timelog start autocompleted-1 [TAB]
<- currently this will replace autocompleted-1
with new qlist entry, goal is to append next one