Git Product home page Git Product logo

awtrix-pom's Introduction

awtrix-pom

Standalone pomodoro timer for clocks flashed with the awesome awtrix-light firmware.

awtrix awtrix(1) awtrix(2)

Installation & Usage

The recommended way to install is to build it yourself using cargo (after skimming the code to make sure it's not doing anything nefarious) but there are also Github CI build binaries if you like.

From Binaries

  • Download a suitable build zip for your operating system from https://github.com/blutack/awtrix-pom/releases
  • Unzip it to find an awtrix-pom or awtrix-pom.exe binary
  • Open the folder in a command prompt/terminal window (Windows users, right click in the folder and select "Open command window here")
  • Run awtrix-pom.exe http://my-clock.local on Windows or ./awtrix-pom http://my-clock.local on Linux/OSX
  • Your clock should switch to a pomodoro timer layout

From Source Code/Cargo

  • Install Rust from https://www.rust-lang.org/tools/install if you don't already have it
  • Clone this repo with git clone https://github.com/blutack/awtrix-pom
  • Change directory into the cloned repository and run cargo build --release. Your binary will be output to the /target/release folder
  • You can also run awtrix-pom directly with cargo run -- http://my-clock.local
  • Your clock should switch to a pomodoro timer layout

Why Not A HA/Node-Red/etc flow

Because the logic would be very painful to implement, and I wanted something I could fire up quickly on my desktop/laptop. Also, it's been a little while since I've done CLI stuff in Rust.

How Does It Work?

By calling the HTTP API of your clock to create a temporary custom app ("pomodoro") and switching to it. It then updates the text and progress bar every minute (unless it's in seconds mode, in which case it updates every... second). On shutdown (ctrl-c) it wipes the temporary app.

Warnings & Limitations

  • Because the clock bit of the view is updated only when the pomodoro timer ticks down, the displayed time could be up to a minute behind. This is not a problem for me but if it is for you let me know and I'll fix it.

Options

Usage: awtrix-pom <hostname> [--work <work>] [--short <short>] [--long <long>] [--cycles <cycles>] [--beep <beep>] [--switch <switch>] [-v] [--seconds]

A pomodoro timer for awtrix-light.

Positional Arguments:
  hostname          base URL of an awtrix-light instance (http://my-clock.local
                    or http://192.168.2.3)

Options:
  --work            minutes to work for [25]
  --short           minutes to rest for on short breaks [5]
  --long            minutes to rest for on long breaks [20]
  --cycles          how many short breaks before a long break [4]
  --beep            beep on transition between work and breaks [true]
  --switch          switch to the pomodoro app on the clock automatically [true]
  -v, --verbose     print debug information
  --seconds         interpret times as seconds, not minutes - useful for demos
  --help            display usage information

awtrix-pom's People

Contributors

blutack avatar

Stargazers

 avatar  avatar

Watchers

 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.