Control
Control playback and Discord, send notifications, open files and URLs, and manage system power state.
Media control
Section titled “Media control”Send the MEDIA_CONTROL event with an action to control media playback.
Available actions:
PLAYPAUSESTOPNEXTPREVIOUSVOLUME_UPVOLUME_DOWNMUTE
{ "id": "abc123", "token": "abc123", "event": "MEDIA_CONTROL", "data": { "action": "PAUSE" }}Discord control
Section titled “Discord control”Send the DISCORD_CONTROL event with an action to change your Discord voice settings. Discord must be set up first.
Available actions:
MUTE,UNMUTE,TOGGLE_MUTEDEAFEN,UNDEAFEN,TOGGLE_DEAFENSET_INPUT_VOLUME: setvalueto 0-100.SET_OUTPUT_VOLUME: setvalueto 0-200.
The volume values are the percentages that Discord’s sliders show.
{ "id": "abc123", "token": "abc123", "event": "DISCORD_CONTROL", "data": { "action": "SET_INPUT_VOLUME", "value": 80 }}The response type is DISCORD_CONTROLLED. If Discord is not connected, the response is an ERROR.
Send notification
Section titled “Send notification”Send the NOTIFICATION event to show a desktop notification. title and message are required; the rest are optional.
{ "id": "abc123", "token": "abc123", "event": "NOTIFICATION", "data": { "title": "Hello", "message": "World" }}Available fields:
title(required): The notification title.message(required): The notification body.icon(optional): The icon name.duration(optional): How long to show the notification, in milliseconds.actionUrl(optional): A URL to open when the notification is clicked.actionPath(optional): A file or folder path to open when the notification is clicked.sound(optional): Path to a sound file to play with the notification.
Open a path
Section titled “Open a path”Send the OPEN event with a path to open a file or folder with the default application.
{ "id": "abc123", "token": "abc123", "event": "OPEN", "data": { "path": "C:\\users\\user\\Downloads\\example.txt" }}Open a URL
Section titled “Open a URL”Send the OPEN event with a url to open it in the default browser.
{ "id": "abc123", "token": "abc123", "event": "OPEN", "data": { "url": "https://timmo.dev" }}Power control
Section titled “Power control”Control the system power state with one of the following events. Each takes empty data.
POWER_HIBERNATEPOWER_LOCKPOWER_LOGOUTPOWER_RESTARTPOWER_SHUTDOWNPOWER_SLEEP
{ "id": "abc123", "token": "abc123", "event": "POWER_SLEEP", "data": {}}