diff --git a/Modes.prj.xml b/Modes.prj.xml index aaabbf9..fa13437 100644 --- a/Modes.prj.xml +++ b/Modes.prj.xml @@ -283,6 +283,8 @@ if (existsIsType(merged, 'volume_media_override', 'boolean') && merged.v if (existsIsType(merged, 'volume_notification', 'int')) notificationVol(merged.volume_notification, false, false); if (existsIsType(merged, 'dnd', 'string')) performTask('DoNotDisturb', 10, merged.dnd, ''); +if (existsIsType(merged, 'silentMode', 'string')) silentMode(merged.silentMode); +if (existsIsType(merged, 'autoSyncOn', 'boolean')) setAutoSync(merged.autoSyncOn); if (existsIsType(merged, 'location', 'string')) performTask('LocationMode', 10, merged.location, ''); if (existsIsType(merged, 'wifiOn', 'boolean')) setWifi(merged.wifiOn); if (existsIsType(merged, 'bluetoothOn', 'boolean')) setBT(merged.bluetoothOn); diff --git a/README.md b/README.md index c4bf131..fc05676 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,13 @@ The configuration files each contain a single JSON object with the following pro * `"priority"` - Priority-only * `"alarms"` - Alarms-only * `"none"` - Total silence +* `silentMode` - set the Silent Mode + * `"on"` - turn Silent Mode on + * `"vibrate"` - turn Vibrate Mode on + * `"off"` - turn Silent Mode on +* `autoSyncOn` - set the Auto Sync on or off + * `true` - turns Auto Sync on + * `false` - turns Auto Sync off * `location` - change the location mode * `"off"` - location services off * `"accuracy"` - high accuracy mode (uses GPS, Wifi, Bluetooth, and mobile networks) diff --git a/config/base.json b/config/base.json index e470ea7..0a63ba6 100644 --- a/config/base.json +++ b/config/base.json @@ -5,6 +5,8 @@ "volumn_media": "null or integer (0-15)", "volume_media_override": "null or boolean", "dnd": "null, all (with quotes to turn off dnd), priority (with quotes for priority only), alarms (with quotes for alarms only), or none (with quotes for total silence)", + "silentMode": "null, off (for ringer), vibrate (for vibrate mode), or on (for silent mode)", + "autoSyncOn": "null or boolean", "location": "null, off (to turn off location), accuracy (for High Accuracy), battery (for Battery Saver), or device (for Device Only)", "wifiOn": "null or boolean", "bluetoothOn": "null or boolean", diff --git a/js/ContextChanged.js b/js/ContextChanged.js index 1b31db0..fc99f03 100644 --- a/js/ContextChanged.js +++ b/js/ContextChanged.js @@ -71,6 +71,8 @@ if (existsIsType(merged, 'volume_media_override', 'boolean') && merged.volume_me if (existsIsType(merged, 'volume_notification', 'int')) notificationVol(merged.volume_notification, false, false); if (existsIsType(merged, 'dnd', 'string')) performTask('DoNotDisturb', 10, merged.dnd, ''); +if (existsIsType(merged, 'silentMode', 'string')) silentMode(merged.silentMode); +if (existsIsType(merged, 'autoSyncOn', 'boolean')) setAutoSync(merged.autoSyncOn); if (existsIsType(merged, 'location', 'string')) performTask('LocationMode', 10, merged.location, ''); if (existsIsType(merged, 'wifiOn', 'boolean')) setWifi(merged.wifiOn); if (existsIsType(merged, 'bluetoothOn', 'boolean')) setBT(merged.bluetoothOn);