Enable or Disable a Do-Not-Disturb Setting

A shortcut can be used to set certain System Settings, and the following is a simple example. It allows the user to enable a Do-Not-Disturb setting for a specified number of hours and to disable a current Do-Not-Disturb setting.

Do Not Disturb.shortcut (22.7 KB)

The following shortcut is similar to the above but the user input is in minutes.

Do Not Disturb.shortcut (22.4 KB)

A possible alternative to both of the above is for the shortcut to assume hours for the numbers 1 through 9 and minutes otherwise.

1 Like

The shortcut included below allows the user to select either hours or minutes. An existing Do Not Disturb setting is not overwritten and an error is instead reported. The swiftDialog app is required (here).

The dialog:

The first portion of the shortcut:

The shortcut:

Do Not Disturb.shortcut (24.1 KB)

The following is similar to the above but uses swiftDialogs throughout and includes additional error handling. The screenshot only shows a portion of the shortcut.

Do Not Disturb.shortcut (24.4 KB)