Skip to content

sejoharp/worktimers

Repository files navigation

worktimers

It's a cli tool to manage work times.

Usage

start working

It uses the current timestamp as start date and lists worked intervals.

worktimers start

stop working

It closes the current interval with the current date and lists worked intervals.

worktimers stop

list worked intervals

worktimers list

The output will look like this:

┌─────────────────────┬─────────────────────┬──────────┬───────────────────────────┐
│ start               │ stop                │ duration │ duration_with_lunch_break │
├─────────────────────┼─────────────────────┼──────────┼───────────────────────────┤
│ 1970-01-01 00:00:00 │ 1970-01-01 02:00:00 │ 02:00:00 │ 01:30:00                  │
├─────────────────────┼─────────────────────┼──────────┼───────────────────────────┤
│ 2023-01-09 10:25:39 │                     │ 08:00:00 │ 07:30:00                  │
└─────────────────────┴─────────────────────┴──────────┴───────────────────────────┘

Installation

install release

bash -c "$(curl -fsSL https://raw.githubusercontent.com/sejoharp/worktimers/refs/heads/main/scripts/install.sh)"

install from source

# install rust
brew install rustup-init

# build and install worktimers
make install

install local with nix

nix build

install via nix home-manager

# move to home-manager config. e.g.:
cd ~/.config/home-manager

# add this as input;
    worktimers_pkg = {
      url = "github:sejoharp/worktimers";
    };

# optional: update index
nix flake lock --update-input worktimers_pkg

# add this to packages:
inputs.worktimers_pkg.packages.${pkgs.stdenv.system}.default

# build generation
nh home build .

# switch generation
nh home switch .

add config

add .worktimers.json to your home directory and adjust the following content:

{
  "absolute_persistence_path": "/Users/joscha/workingtimes.json",
  "lunch_break_in_mins": 50
}

Development

create a release

# bump minor version, build, commit, tag, and push
make create-minor-release

# or bump patch version instead
make create-patch-release

# or bump major version instead
make create-major-release

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors