Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stretchly Watcher

Stretchly Watcher is an extension for Stretchly that synchronizes your break notifications directly to your iPhone (or other mobile devices).

It runs seamlessly as a background macOS service that watches Stretchly's log files and forwards break events to a ntfy topic. This ensures you receive push notifications on your phone whenever it's time for a break, even if you've stepped away from your computer.

Prerequisites

  • macOS
  • Python 3
  • Stretchly installed and running
  • A ntfy topic setup:
    • Create a topic from https://ntfy.sh/ in advance.
    • Install the ntfy app on your mobile device or desktop and subscribe to listen to that topic.
    • (The script defaults to https://ntfy.sh/stretchly-watcher-default if not customized)

Installation

  1. Clone the repository

    git clone <repo-url> stretchly-watcher
    cd stretchly-watcher
  2. Configure (optional)

    By default, the watcher monitors ~/Library/Logs/Stretchly/main.log and notifies https://ntfy.sh/stretchly-watcher-default. Override with environment variables:

    export STRETCHLY_LOG_PATH="/path/to/stretchly.log"
    export STRETCHLY_NTFY_URL="https://ntfy.sh/your-topic"
  3. Make scripts executable

    chmod +x bin/install.sh bin/uninstall.sh
  4. Run the installer

    ./bin/install.sh

    This will:

    • Detect your Python 3 interpreter
    • Generate a launchd plist in ~/Library/LaunchAgents/
    • Load and start the service via launchctl
  5. Verify the service

    launchctl list | grep stretchly-watcher

    You should see the service in the list with a PID (non-zero in the second column).

Uninstallation

./bin/uninstall.sh

This will:

  • Unload the service from launchd
  • Remove the plist file from ~/Library/LaunchAgents/

Log files in ~/Library/Logs/Stretchly/ are preserved and can be removed manually if desired.

Logs

  • Watcher stdout: ~/Library/Logs/Stretchly/watcher_stdout.log
  • Watcher stderr: ~/Library/Logs/Stretchly/watcher_stderr.log
  • Stretchly log (watched): ~/Library/Logs/Stretchly/main.log (or custom path via STRETCHLY_LOG_PATH)

How it works

The watcher tails Stretchly's log file, matching lines against known break-event patterns (notification shown, break window loaded, break finished). Each matched event is forwarded as a push notification to the configured ntfy URL.

About

A macOS background service that extends Stretchly by syncing your break notifications directly to your iPhone or other mobile devices via ntfy.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages