npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pmdclock

v1.0.0-rc3

Published

CLI clock agent/client for pomodoro

Downloads

21

Readme

pmdclock, a simple CLI pomodoro clock

Clock for pomodore control based on an agent

Features:

  • 100% CLI
  • Configurable times
  • Continuous mode
  • Persist taks history on disk
  • Notification by libnotify (Desktop integrated)
  • Execute custom command when finish time
  • Auto large rests after x completed tasks

Install

You need node.js (~7.4.0 recommended) and npm installed.

$ sudo npm install -g pmdclock

Usage

Start the agent:

$ pmdclock agent
Starting agent
$

Start new task

$ pmdclock start -n "Cooking potatoes"
Task started!

Let's work...

Get information

$ pmdclock info
Cooking potatoes finish in 17 minutes

Finish the task

$ pmdclock finish
Task finished! in 8 minutes

Take a rest

$ pmdclock rest
Rest started!

Or, a large rest:

$ pmdclock rest --large
Large rest started!, be happy
$ pmdclock finish
Rest finished at 1 minutes

Check the history:

$ pmdclock list
┌───┬──────────────────┬──────────────────┬──────────────────┬──────────┐
│   │ Name             │ Started          │ Finished         │ On time  │
│ * │ Cooking potatoes │ Today at 5:05 PM │ Today at 5:13 PM │ -25 mins │
│ - │ Rest             │ Today at 5:14 PM │ Today at 5:15 PM │ -5 mins  │
└───┴──────────────────┴──────────────────┴──────────────────┴──────────┘

Clear history:

$ pmdclock clear
History clear, 2 tasks deleted.
$ pmdclock list
Not tasks finished

Continuous mode

Continuous mode allows to finish tasks starting rest and vice versa:

$ pmdclock start -n "Cooking potatoes"
Task started!
$ pmdclock rest
Task finished!
Rest started!
$ pmdclock start -n "Prepare dishes"
Rest finished!
Task started!
$ pmdclock finish
Task finished! in 0 minutes 
$ pmdclock list
┌───┬──────────────────┬──────────────────┬──────────────────┬──────────┐
│   │ Name             │ Started          │ Finished         │ On time  │
│ * │ Cooking potatoes │ Today at 5:19 PM │ Today at 5:19 PM │ -25 mins │
│ - │ Rest             │ Today at 5:19 PM │ Today at 5:19 PM │ -5 mins  │
│ * │ Prepare dishes   │ Today at 5:19 PM │ Today at 5:20 PM │ -25 mins │
└───┴──────────────────┴──────────────────┴──────────────────┴──────────┘

Configure

The default configuration uses times by: 25 minutes task, 5 minutes rest and 20 minutes for large rests, but it's configurable via a json file located in $HOME/.pmdclock/config.yml:

For example:

taskTime: 40
restTime: 10
largeRestTime: 30 

The complete params are:

|Param|Type|Description|Default value| |:----|:--:|:----------|:------------| |socket|String|Path of the socket file for agent|/run/user/{UUID}/pmdclock.socket`| |db|String|Path of the db file|$HOME/.pmdclock/db.dat| |daemon|Boolean|Run agent as daemon|true| |taskTime|Number|Task time in minutes|25| |restTime|Number|Rest time in minutes|5| |largeRestTime|Number|Large rest time in minutes|20| |autoLargeRest|Boolean/Number|Auto set the next rest as large after x complete tasks, if false don't auto-set|4| |showNotifications|Boolean|Show notifications via libnotify|true| |runCmd|String|Command to run when time is over|null| |autoStopCmd|String/Boolean|Stop command on finish task, if is false don't kill the child, if is true, kill with SIGTERM, if is string, use it as signal, enable signals: SIGHUP, SIGINT, SIGQUIT, SIGKILL, SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGSTOP, SIGTSTP|false| |notifyEach|Number|Notify each x time, in secods|30| |infoFormat|String|Output format of comand info[0]|"%n finish in %R"| |continueMode|Boolean|If start a rest when a task is running, close the task and vise versa|true| |taskIcon|String|Task icon on list[1]|[x]| |taskRunningIcon|String|Icon for running task[1]|[>]| |restIcon|String|Rest icon in list[1]|o/| |largeRestIcon|String|Large rest icon[1]|...| |largeRestRunningIcon|String|Icon for running large rest[1]|:D| |reverseSort|Boolean|List in reverse by default|false| |defaultListHead|Number|List appling --head parman by default, see pmdclock list --help|0| |defaultListTail|Number|List appling --tail parman by default, see pmdclock list --help|0|

0: Info variables

The variables start with % and there are:

  • n: Name of task
  • i: Icon
  • r: Time left on mm:ss
  • R: Time left on human readable format, ej: 13 minutes
  • e: Time elapsed on mm:ss
  • E: Time elapsed on human readable format
  • t: Number of tomatoes recolected
  • T: Repeat the taskIcon the total tomatoes recolected times

1: Tasks icons

If you use fonts patches with Pomicons you can use it for stylish output of list command.

pomicons

For use it, define icons as \uE001 and \uE005.

taskIcon: "\uE001"
taskRunningIcon: "\uE004"
restIcon: "\uE005"
restRunningIcon: "\uE005"
largeRestIcon: "\uE006"
largeRestRunningIcon: "\uE006"

Usage with i3wm + i3blocks

The reasons why I developed this software, apart from not finding anything similar that I like, it was to implement it on my desktop with i3 + i3blocks, so I leave the configuration in case someone else serves:

[pomodoro]
command=pmdclock info --format "%T%i %r" | sed "s/^Not tasks.*$//g"
color=#FFFF00
interval=5