Git Product home page Git Product logo

gnome-pomodoro-watcher's Introduction

gnome-pomodoro-watcher

A helper tool to watch GNOME Pomodoro timer.

How it works

gnome-pomodoro-watcher watches GNOME Pomodoro timer and continuously outputs its state in JSON format when it changes.

{"remaining_secs":0,"is_paused":false,"state":"stopped"}
{"remaining_secs":1500,"is_paused":false,"state":"pomodoro"}
{"remaining_secs":1499,"is_paused":false,"state":"pomodoro"}
{"remaining_secs":1498,"is_paused":false,"state":"pomodoro"}
{"remaining_secs":1497,"is_paused":false,"state":"pomodoro"}
{"remaining_secs":1496,"is_paused":false,"state":"pomodoro"}
{"remaining_secs":1495,"is_paused":false,"state":"pomodoro"}
{"remaining_secs":1495,"is_paused":true,"state":"pomodoro"}
Field Type Description
remaining_secs number Remaining time of the current timer in seconds.
is_paused boolean Whether the timer is paused.
state string Current timer state. One of stopped, pomodoro, short-break, long-break. Note that there is no paused state.

Usage

You can easily format the timer state with jq.

#!/usr/bin/env bash

gnome-pomodoro-watcher | jq -r '.remaining_secs | strftime("%M:%S")'

And you can display it on Waybar with Custom module.

{
  "custom/gnome-pomodoro": {
    "exec": "/path/to/custom-script.bash",
    "interval": 1
  }
}

gnome-pomodoro-watcher's People

Contributors

sei40kr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.