Update documentation to mention the environment variables that scripts can use. (#191)

This commit is contained in:
Aidan Epstein
2023-01-01 08:49:53 -08:00
committed by GitHub
parent 819a9925ee
commit 18b72b9b8c
2 changed files with 14 additions and 1 deletions

View File

@@ -212,7 +212,7 @@ Config properties:
// This script will only run when Spotify sends a notification containing
// that exact summary and body
"example-script": {
"exec": "~/.config/swaync/myRickRollScript.sh",
"exec": "/path/to/myRickRollScript.sh",
"app-name": "Spotify"
"summary": "Never Gonna Give You Up",
"body": "Rick Astley - Whenever You Need Somebody"

View File

@@ -352,4 +352,17 @@ config file to be able to detect config errors
}
}
}
```
You can also use these environment variables in your script:
```
SWAYNC_BODY="Notification body content"
SWAYNC_DESKTOP_ENTRY="Desktop entry"
SWAYNC_URGENCY="Notification urgency"
SWAYNC_TIME="Notification time"
SWAYNC_APP_NAME="Notification app name"
SWAYNC_CATEGORY="SwayNC notification category"
SWAYNC_REPLACES_ID="ID of notification to replace"
SWAYNC_ID="SwayNC notification ID"
SWAYNC_SUMMARY="Notification summary"
```