Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sehat - Health Timer (Pomodoro Style)

A cross-platform terminal CLI application to remind you to change sitting positions and rest your eyes. Automatically alternates between work and break modes with audio notifications.

Features

  • Work Mode (default: 20 minutes) - Focus time
  • Break Mode (default: 5 minutes) - Rest time
  • Auto-repeat cycles between work and break modes indefinitely
  • Beautiful terminal UI with progress bar
  • Different notification sounds for each transition
  • Audio files embedded in the binary (single file distribution)
  • Cross-platform support (Linux, macOS, Windows)

Installation

Build from Source

  1. Clone or download the source code
  2. Ensure you have Go 1.22+ installed
  3. Install dependencies:
go mod download
  1. Build for your platform:
go build -o sehat

Usage

Run with Default Settings (20 min work, 5 min break)

./sehat

Customize Durations

./sehat --work=30m --break=10m

Command-Line Options

Flag Description Default
--work Work duration 20m
--break Break duration 5m

Controls

  • Press q or Ctrl+C to quit

Sound Effects

Audio notification sounds are sourced from Mixkit Free Sound Effects.

Customizing Sounds

The application uses two embedded audio files:

  1. notif.mp3 - Played when work phase ends (transitioning to break)
  2. break.mp3 - Played when break phase ends (transitioning to back to work)

To use custom sounds:

  1. Replace notif.mp3 and/or break.mp3 in the project directory
  2. Rebuild the binary:
go build -o sehat

Cross-Platform Audio

The application automatically detects and uses the appropriate audio player for your platform:

  • macOS: Uses afplay (built-in)
  • Linux: Uses aplay, paplay, mpg123, ffplay, or play (whichever is available)
  • Windows: Uses PowerShell Media.SoundPlayer

Cross-Compilation

Build for different platforms from any system:

# Linux (current platform)
go build -o sehat

# macOS Intel
GOOS=darwin GOARCH=amd64 go build -o posture-reminder-mac

# macOS Apple Silicon (M1/M2/M3)
GOOS=darwin GOARCH=arm64 go build -o posture-reminder-mac-arm64

# Windows
GOOS=windows GOARCH=amd64 go build -o posture-reminder.exe

Project Structure

sehat/
├── main.go          # Source code
├── notif.mp3        # Work completion sound
├── break.mp3        # Break completion sound
├── go.mod           # Go module definition
├── go.sum           # Dependencies checksum
└── README.md        # This file

Technical Details

  • Language: Go 1.22+
  • TUI Framework: Bubbletea by Charmbracelet
  • Audio: Embedded MP3 files, extracted to temp files during playback
  • Distribution: Single binary with embedded assets (no external dependencies)

Health Benefits

This timer helps you:

  • Avoid prolonged sitting (linked to various health issues)
  • Rest your eyes regularly (reduces eye strain)
  • Maintain better posture through periodic breaks
  • Follow the Pomodoro Technique for productivity

License

This software is free to use.

Contributing

Feel free to submit issues, fork the repository, and create pull requests for any improvements.

Stay Healthy!

Remember to take care of your health while working. Regular breaks are essential for long-term well-being.

About

A cross-platform terminal CLI application to remind you to change sitting positions and rest your eyes. Automatically alternates between work and break modes with audio notifications.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages