macOS Sleep / Wake notifications

Overview

mac-power-monitor

Test Service

Inspiration from: prashantgupta24/mac-sleep-notifier

Install

pnpm add @oomol-lab/mac-power-monitor
# or
npm install @oomol-lab/mac-power-monitor
# or
yarn add @oomol-lab/mac-power-monitor

Usage

import { createMacPowerMonitor } from "@oomol-lab/mac-power-monitor";

const monitor = createMacPowerMonitor();

monitor.listenOnWillSleep(function () {
    console.log("will sleep");
});

monitor.listenOnWillWake(function () {
    console.log("will wake");
});

// when we don't need it
monitor.dispose();
You might also like...
A small utility to wake computers up or put them to sleep over the local network

WKSL - a wake and sleep utility An experiment in writing a small CLI utility in Rust. The program lets you wake a machine on your local network up fro

Swayidle alternative to handle wayland idle notifications, sleep and lock events in Rust with Lua scripting based configuration language

swayidle-rs This is intended as a replacement of sway's idle management daemon. I use it as a tool to understand rust message passing and state manage

Wake-on-LAN in rust

Wake-on-LAN in rust

Cross-platform atomic wait and wake (aka futex) functionality for Rust.

Cross platform atomic wait and wake (aka futex) functionality. This crate only supports functionality that's available on all of Linux, Windows, and m

A self-contained, single-binary Rust and Leptos application for remote Wake-on-LAN
A self-contained, single-binary Rust and Leptos application for remote Wake-on-LAN

Remote Wake-on-LAN with Rust and Leptos A self-contained, single-binary Rust and Leptos application serving a web interface to wake another device on

Adapt the screen's color spectrum according to the hour of the day in order to improve your sleep

circadianlight What It Is Circadian Light is a program, currently only working on Linux with X, that controls the color spectrum of your screen accord

Technically, this does exactly what sleep does but completes much faster!

hypersleep Technically does everything that sleep does but it is "blazingly fast!" For example, $ time sleep 1 real 0m1.005s user 0m0.001s sys

Rusty Ekko - Sleep Obfuscation in Rust

Ekko in Rust A small sleep obfuscation technique that uses the CreateTimerQueueTimer Win32 API function ported from C https://github.com/Cracked5pider

Secure your on-chain approvals and sleep with ease.
Secure your on-chain approvals and sleep with ease.

🇹🇷 Eth Global Istanbul 2023 Hackaton Project 🇹🇷 Table of Contents Table of Contents About The Project Built With Getting Started Installation Cont

Arch Linux Security Update Notifications
Arch Linux Security Update Notifications

arch-audit-gtk Show an indicator if there are any security updates missing for your Arch Linux system. Install git clone https://aur.archlinux.org/arc

client-server notification center for dbus desktop notifications

tsuchita A client-server notification center for dbus desktop notifications. Specifically org.freedesktop.Notifications dbus messages. Motivation I ju

Moodle CMS Notifications in Rust
Moodle CMS Notifications in Rust

Moodle CMS Notifications View unread Moodle CMS notifications. Mark all notifications as read. Lightweight with no dependencies. Cross platform. Authe

Simple pomodoro timer with notifications
Simple pomodoro timer with notifications

omo Simple pomodoro timer with notifications Installation

Send Windows 10 styled notifications on Windows 7.

win7-notifications Send Windows 10 styled notifications on Windows 7. Note: This crate requires a win32 event loop to be running, otherwise the notifi

❗️ Small script to view GitHub notifications in the terminal
❗️ Small script to view GitHub notifications in the terminal

github-notifications Small script to view GitHub notifications in the terminal Shows and color-codes the notification source, eg if you're the owner o

Ditch your status bar for some snazzy desktop notifications.
Ditch your status bar for some snazzy desktop notifications.

citron Ditch your panel for some snazzy desktop notifications. citron is: a non-intrusive alternative to status bars. on-demand, i.e. does not run in

Notifications for your Argo Workflows.
Notifications for your Argo Workflows.

Hermes -- notifications for Argo Workflows Hermes aims to provide a streamlined way of sending notifications to various messaging services from your A

Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transactions of your non-custodial wallets on a provider of your choice, all while respecting your privacy

Bitcoin Push Notification Service (BPNS) Description Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transacti

A Simple Audio Control and Notifications Daemon

SACAND This is sacand, a Simple Audio Control and Notifications Daemon As it name oaths to imply, this is intended to be a simple audio control daemon

Releases(v1.0.0)
Owner
null
Technically, this does exactly what sleep does but completes much faster!

hypersleep Technically does everything that sleep does but it is "blazingly fast!" For example, $ time sleep 1 real 0m1.005s user 0m0.001s sys

Nigel 4 Oct 27, 2022
Rusty Ekko - Sleep Obfuscation in Rust

Ekko in Rust A small sleep obfuscation technique that uses the CreateTimerQueueTimer Win32 API function ported from C https://github.com/Cracked5pider

null 116 Apr 10, 2023
❗️ Small script to view GitHub notifications in the terminal

github-notifications Small script to view GitHub notifications in the terminal Shows and color-codes the notification source, eg if you're the owner o

Brian Shaginaw 1 Jan 10, 2022
🔔 CLI utility to send notifications to Slack via integration webhooks

Slack notifier Just a simple CLI tool to send notifications to Slack. Please note that this project is just a playground to start learning Rust, it is

Green.Mod 2 May 21, 2022
MollySocket allows getting signal notifications via UnifiedPush.

MollySocket This software is still in alpha. MollySocket allows getting signal notifications via UnifiedPush. It works like a linked device, which doe

null 6 Dec 31, 2022
A small Rust library that let's you get position and size of the active window on Windows and MacOS

active-win-pos-rs A small Rust library that let's you get position and size of the active window on Windows and MacOS Build % git clone https://github

Dmitry Malkov 21 Jan 6, 2023
A library to capture the Screen on Linux, MacOS and Windows.

Captis - A library for capturing the screen on Linux, MacOS and Windows It's a fairly simple library that performs good enough, the OS level APIs that

CrewNew.com 17 Dec 23, 2022
A todo list from terminal. Compatible with Linux and Windows, not tested on macOS

todocli A todo list from terminal. Compatible with Linux and Windows, not tested on macOS (not planing on support tho). Note: Currently being rewritte

Patommmmm 3 Dec 12, 2022
Maccha is an extremely extensible and themable power menu for Windows, macOS, and Linux.

Maccha I hate coffee. Maccha is an extremely extensible and themable power menu for Windows, macOS, and Linux. Plugins Plugins are written in Rust (ot

Kyza 9 May 13, 2023
Simple template to use csr and ssr leptos with tauri for ios/android/windows/macos/linux and web dev

Tailwind-Leptos-Tauri Template Simple template to use csr and ssr leptos with tauri for ios/android/windows/macos/linux and web dev Just clone the rep

Victor Batarse 11 Mar 10, 2024