All Projects → vitorgalvao → sandwichtimer

vitorgalvao / sandwichtimer

Licence: Unlicense License
Timer app controllable via CLI

Programming Languages

javascript
184084 projects - #8 most used programming language

SandwichTimer logo SandwichTimer

Use a CLI to set timers. Built for use with the SandwichTimer Alfred Workflow.

Usage

SandwichTimer was initally built to be a Pomodoro timer controllable via CLI, but it can be used as a regular timer. While you can simply open the app and a Pomodoro cycle will start, it’s meant to be called with its CLI:

SandwichTimer.app/Contents/MacOS/SandwichTimer "{{time_in_minutes}}"

Unlike most other timers, only the remaining minutes are shown, not the seconds.

Calling via CLI with no argument or pomodoro as the argument will initiate a repeating Pomodoro cycle, with actionable notifications at each stage.

Calling it with a number will initiate a timer. Its notification will continue firing until you quit it.

Calling it with quit as the argument will exit all running timers.

For custom timers, an optional additional argument is treated as the title to appear on it’s menu tray. So as to not take up space on the bar itself, this appears as a disabled first item in the menu and will show on the notifications when done.

SandwichTimer.app/Contents/MacOS/SandwichTimer 20 "Check Laundry"

Install

Download the latest version, or install via the SandwichTimer Alfred Workflow.

Development

Built with Electron.

npm start will call electron main.js and only then give the arguments. This means that while testing, an extra argument is passed on the command line. As such, the process.argv array positions need to be increased by one when testing, and be returned to their original state before building the app.

Commands
  • Install dependencies: npm install
  • Run: npm start
  • Build for macOS: npm run build-macos
  • Build for all platforms: npm run build
  • Build for macOS and package as a zip: npm run package-macos
  • Build for all platforms and package as a zip: npm run package

Currently, only macOS is supported. I do not intend to officially support other platforms in the near future since I cannot consistently and reliably test on them, but am willing to add support if someone wants to collaborate in doing the legwork.

License

The Unlicense (Public Domain, essentially)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].