#macos #script #off #execute #service #disturb #toggled

app dndtrigger

A simple cli/service for MacOS to execute scripts when Do Not Disturb is toggled on or off

1 unstable release

0.1.0 Apr 3, 2024

#633 in Command line utilities

Download history 116/week @ 2024-03-30 24/week @ 2024-04-06 1/week @ 2024-04-13

141 downloads per month

MIT license

12KB
197 lines

dndtrigger

A simple cli/service for MacOS to execute scripts when Do Not Disturb is toggled on or off.

Usage

# Configure a script to run when Do Not Disturb is enabled
dndtrigger config --on_enable ~/do_something.sh

# Configure a script to run when Do Not Disturb is disabled
dndtrigger config --on_disable ~/do_something_else.sh

# Optionally configure the service to run as a user (default is root)
dndtrigger config --user <username>

# Install and enable the service
dndtrigger enable 

# Get the current status of the service
dndtrigger status

# Restart the service
dndtrigger restart

# Disable and uninstall the service
dndtrigger disable

# Run the service in the foreground (not recommended outside of testing purposes)
dndtrigger run

License

This project is licensed under the terms of the MIT license. See LICENSE for additional details.

Dependencies

~9–20MB
~275K SLoC