Skip to content

daurham/Timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Timer ⏲

A simple timer that runs in the terminal. Made with time boxing in mind, but can be used for anything. With sound capabilities, we can import a custom starting and ending sound of our choice to go off along side the timer.

NodeJS Nodemon Bash

## Installing Terminal Timer (Utility Set up is recommended to get the most out of this application)
  1. Clone this repo
  2. Open Terminal_Timer.js and fill out the USER_SETTINGS (optional)
  3. Install dependencies:
npm install
  1. Start timer:
npm start
  1. Get to work!!

Utility Set up (Recommended)

Get the best use out of it, use easily in terminal wherever


Option a).

Quick but ineffecient

  1. Clone repo to your command lines initial directory
  2. Install dependencies
npm install
  1. Open a fresh terminal
  2. Run:
node timer_scripts/Terminal_Timer.js 10 minutes

syntax: node [path/to/repo?/]timer_scripts/Terminal_Timer.js [timeDuration?] [timeType?] [timeIncrement?] [fontColor?] [showLocalTime?]


Option b).

RECOMMENDED but only for bash terminal users

  1. Clone repo wherever you want
  2. Install dependencies
npm install
  1. Create an alias at the bottom of your bash startup script (.bashrc or .bash_profile) that:
    • a). resets the current directory
      • (cd;)
    • b). travels to the repo's root directory and
      • (cd path/to/repo;)
    • c). uses node to run the script from root
      • (node backend_scripts/Terminal_Timer.js)
alias timer='cd; cd Desktop/Applications/Timer; node timer_scripts/Terminal_Timer.js'

alias aliasName='[go to initial terminal dir; go to repo dir root; use node to run backend_scripts/Terminal_Timer.js]'

  1. Launch a fresh terminal
  2. Run a similar syntax:
timer 1 hr
timer 30 sec 2
timer 10
timer 5 m 1 green true

syntax: aliasName [timeDuration?] [timeType?] [timeIncrement?] [fontColor?] [showLocalTime?]

Running the "aliasName" defaults to:

aliasName 10 minutes 1 red false
  1. Get to work!!


Playing your own your own sound:

  1. Import audio files into the "assets" directory
  2. In "Terminal_Timer.js", on line 20 type in your initial and/or ending audio filename in ['the', 'array'], replacing the 2 other filenames
  3. As long as both new audio files are either .mp3 or .wav, you should be good to go!

OS AUDIO NOTES:

  • Linux: .mp3 files may be buggy, .wav work perfect
  • Mac: .mp3 files may be buggy, .wav work perfect (Need more feedback)
  • Windows: Untested (Need more feedback)
  • WSL: I was unable to connect to my Win audio hardware from WSL

  • Created By Jake Daurham

Contact Info

LinkedIn Instagram Twitter YouTube Gmail

About

A simple command line timer, ideal for timeboxing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors