Skip to content

Add Alarms Sound#10

Open
eldelahoz wants to merge 7 commits into
CoreyHayward:mainfrom
eldelahoz:main
Open

Add Alarms Sound#10
eldelahoz wants to merge 7 commits into
CoreyHayward:mainfrom
eldelahoz:main

Conversation

@eldelahoz
Copy link
Copy Markdown

This pull request adds support for customizable alarm sounds and notifications when a timer expires in the PowerToys Run Timer plugin. It introduces new user-configurable options for enabling/disabling alarm sounds, setting a custom alarm sound file, and specifying the alarm duration. The implementation includes new services for sound playback and toast notifications, as well as updates to the plugin's settings and project configuration.

Key changes include:

Alarm Sound and Notification Feature:

  • Introduced a new SoundService class to handle playing alarm sounds, supporting both default and user-specified .wav files, and allowing the alarm to play for a configurable duration.
  • Added a ToastNotificationService class to display toast notifications with a "Stop Alarm" action when a timer expires, integrating with the alarm sound logic.
  • Updated TimerResultService to use the new sound and notification services, playing the alarm sound and showing a toast notification when timers complete, based on user settings.

Settings and User Options:

  • Extended the Settings class and the plugin's AdditionalOptions to include options for enabling alarm sounds, specifying a custom sound path, and setting the alarm duration (1–30 seconds). These settings are now respected when timers expire.

Project and Resource Configuration:

  • Updated the project file to target net8.0-windows10.0.17763.0, enable Windows targeting, and ensure all .wav files in the Sounds directory are copied to the output, supporting custom and default alarm sounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant