npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pebble-hourly-vibes

v1.1.0

Published

Vibe every hour, on the hour

Downloads

5

Readme

pebble-hourly-vibes

pebble-hourly-vibes does the hard work of vibing every hour, on the hour.

Installation

pebble package pebble-hourly-vibes

You must be using a new-style project; install the latest pebble tool and SDK and run pebble convert-project on your app if you aren't.

Usage

// This is not a complete example, but should demonstrate the basic usage

#include <pebble-hourly-vibes/hourly-vibes.h>

...

static void init(void) {
  hourly_vibes_init();
#ifdef PBL_HEALTH
  hourly_vibes_enable_health(true);
#endif
  ...
}

static void deinit(void) {
  hourly_vibes_deinit();
  ...
}

After calling hourly_vibes_init() you may set additional options such as a custom vibe pattern or using Pebble Health.

pebble-hourly-vibes API

| Method | Description | |--------|---------| | void hourly_vibes_init(void) | Initialize everything by subscribing to the TickTimerService | | void hourly_vibes_deinit(void) | Deinitialize everything: unsubscribe from services, free memory, etc. | | void hourly_vibes_set_enabled(bool enabled) | Enable or disable the hourly vibes | | void hourly_vibes_set_pattern(VibePattern pattern) | Set a custom VibePattern. By default vibes_short_pulse() is used | | void hourly_vibes_enable_health(bool enable) | Register/unregister with Pebble Health |

Note on Pebble Health

On platforms that support Pebble Health, pebble-hourly-vibes can subscribe to health events and detect when the user is asleep. Vibes will happen only if the user is awake. This avoids awkward vibes at 0200 that could awaken a user. To enable this, just call hourly_vibes_enable_health(true) sometime after calling hourly_vibes_init().

Pebble Health integration is turned off by default so apps and watchfaces that don't want to integrate with Pebble Health won't get the nag screen thrown up by the watch if the user doesn't have Pebble Health enabled.

Note on Quiet Time

Starting with Pebble SDK 4.3 the current state of the system quiet time is available. pebble-hourly-vibes will respect this on every platform but aplite. On aplite quiet_time_is_active() is actually a #define that aways evaluates to false.