Code Monkey home page Code Monkey logo

minimal-pomo-timer's Introduction

Minimal Pomo Timer

Pomodoro Twitch Overlay. I designed this for my co-working stream so that it is automatic and I don't need to set the timer every time. You customize the style, pomodoros and control it using chat commands on stream - shown below.

This works by installing it onto your PC rather than having it hosted online on streamlabs or streamelements since that would be lighter on the PC and for example sounds when the timer finishes are less likely to get affected when you have a slow laptop/PC (used to have a laptop before PC and suffered from this).

If streamelements is responding to the timer command, the streamelements timer command can be disabled here: https://streamelements.com/dashboard/bot/commands/default

Installation

  1. Download the zip to your desired location image

  2. Add a browser source

  3. Choose timer.html

image

  1. The sound of the timer needs to limited in OBS using a limiter so that you can control the exact volume you would like it sound on Stream image image

Configuration

Within the folder, find and open the file called configs.js using notepad

The file should look like this with comments on how to change the default configurations: image

Channel: channel for which to connect the bot to username: username of the bot you which to have connected to this overlay, e.g. I have a separate bot called moh_manager for my channel that is connected to all the overlays.

For oauth do the following steps:

  1. Log In to https://twitchapps.com/tmi/
  2. Copy the token
  3. Paste into configs

oauth is a token that acts like a password that only allows the overlay to send messages on behalf of that account.

How to use

  • !timer start: begins the timer with the defauly configuration
  • !timer goal 10: changes the timer goal to 10
  • !timer cycle 5: changes the current timer cycle to 5
  • !timer skip: skips the current session (either work or break)
  • !timer 15:00: changes the time of the current Pomo to 15:00
  • !timer 600: changes the time of the pomo to 10:00 (works with seconds)
  • !timer add 50: adds 50 seconds to the current time
  • !timer sub 50: adds 50 seconds to the current time
  • !timer pause
  • !timer resume
  • !timer reset: clears the timer (also !timer clear)

Configs for round timer

I recommend copying 1 by 1 just to be sure nothing gets messed up.

// Styling - required
const height = '250px';
const width = '250px';
const backgroundColor = '#000000'; // hex only
const backgroundOpacity = 0.5; // 0 to 1 (0 is transparent)
const backgroundRoundness = '100%';
const textColor = 'white'; //  hex or name
const fontFamily = 'Poppins'; // From google fonts: https://fonts.google.com
const labelFontSize = '30px';
const timeFontSize = '50px';
const pomoFontSize = '30px';

// Remember to change the height and width when changing these!
const labelSpaceAbove = '0px';
const labelSpaceLeft = 'auto'; // auto for centered; negative px is left; positive px is right
const timeSpaceAbove = '0px'; // negative is up; positive is down
const timeSpaceLeft = 'auto'; // auto for centered; negative px is left; positive px is right
const cycleSpaceAbove = '100px'; // negative is up; positive is down
const cycleSpaceRight = 'auto'; // Diff:auto for centered; negative px is right; positive px is left

// Remember to change the above values when changing the following one
const direction = 'column'; // row or column

Contribution

I made this in a rush and using some code as boiler plate so the code quality is not the best. I am working on refactoring it:)

Please star the repository on the top right or provide a link back to this page:)

minimal-pomo-timer's People

Contributors

mohamed-tayeh 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.