CLI for displaying status of company used time tracking information and gitlab pipeline status
Config is saved under $HOME/.config/waybar-utils/config.yaml
time_tracking:
username: "<Username>"
password: "<Password>"
api_url: "https://example.timetracking-online.com/api"
gitlab:
access_token: "<gitlab-access-token>"
api_url: "https://example/api/v4"Each time tracking operation starts with the time keyword.
Two timetrack commands are available. status and update
Status returns the current working time as json {text: "<time>"}. This can be integrated into a waybar compoennt
In addition to the waybar text/tooltip fields, status emits a structured
data object for richer consumers (e.g. duck-shell):
{
"text": " 04:42",
"tooltip": " 29:44",
"data": {
"netMinutes": 282,
"weekMinutes": 1784,
"overtimeMinutes": -198,
"birthdays": ["Jane Doe"]
}
}update accespts multiple actions: homeoffice, break, leaving.
Example:
Start a homeoffice shift
waybar-utils time update --action homeoffice
waybar-utils gitlab <project-id> returns the latest pipeline status as
{text, class} (class ∈ success/failed/running/pending/error; other
GitLab statuses are passed through as-is). Canceled and skipped pipelines are
ignored when picking the latest one, unless nothing else exists. For a
single project id it also emits a data object with the latest pipeline's
details plus a pipelines array holding the most recent pipeline per distinct
branch (up to 5):
{
"text": " ",
"class": "running",
"data": {
"webUrl": "https://gitlab.example/group/project/-/pipelines/34682",
"ref": "feature/branch",
"sha": "b957af21004d8baa5341965bdea3825e6e97fea4",
"name": null,
"pipelines": [
{
"status": "success",
"ref": "feature/branch",
"sha": "b957af21004d8baa5341965bdea3825e6e97fea4",
"webUrl": "https://gitlab.example/group/project/-/pipelines/34682",
"name": null
}
]
}
}