Skip to content

PuckWatch is a lightweight Rust-powered utility that fetches live NHL scores and displays them directly in your Polybar. Stay updated on your favourite teams without opening a browser.

Notifications You must be signed in to change notification settings

nathan-probert/puckwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PuckWatch

PuckWatch is a Rust-based command-line tool that keeps you updated on live NHL game scores for your favorite teams.

How it Works

The script fetches game data from the NHL API and checks the status of games involving your specified favorite teams.

  • Live Game Updates: If one ofyour favorite teams is currently playing, PuckWatch updates every 10 seconds to provide near real-time score information.
  • No Live Games: If none of your favorite teams have a game currently live, PuckWatch will check for new game starts every 10 minutes.

This approach ensures you get timely updates during games without unnecessary checks when no relevant games are active. The application maintains its state (e.g., last run time, current game status) in a status file, allowing it to determine when to run next.

Built with Rust, PuckWatch is designed to be efficient, minimizing its impact on system resources.

Usage with Polybar

You can integrate PuckWatch with Polybar to display NHL scores directly in your status bar. Here's an example of how to configure a Polybar module for PuckWatch:

[module/puckwatch]
type = custom/script
exec = /path/to/your/puckwatch/target/release/puckwatch # Adjust the path to your PuckWatch executable
interval = 10

Place the compiled puckwatch binary in a location accessible by your Polybar scripts (e.g., ~/.config/polybar/scripts/ or ensure the path in exec is correct) and make it executable (chmod +x /path/to/your/puckwatch/target/release/puckwatch).

If your /tmp folder is not deleted on reboot/restart, you can add the following line to your i3 config:

exec_always --no-startup-id sh -c 'rm -f /tmp/nhl_game_tracker_status.json'

About

PuckWatch is a lightweight Rust-powered utility that fetches live NHL scores and displays them directly in your Polybar. Stay updated on your favourite teams without opening a browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages