settings.py: support ~ expansion for sound path

This commit is contained in:
miruka 2021-03-01 06:48:57 -04:00
parent 86f247d5cc
commit c420360602
2 changed files with 2 additions and 1 deletions

View File

@ -592,6 +592,7 @@ class Backend:
async def sound_notify(self) -> None:
path = self.settings.Notifications.default_sound
path = str(Path(path).expanduser())
if path == "default.wav":
path = "src/sounds/default.wav"

View File

@ -58,7 +58,7 @@ class Notifications:
# Default sound to play for notifications. Can be the filename
# of a builtin sound (only "default.wav" currently exists), or the
# absolute path to a WAV file.
# absolute path to a WAV file (supports ~ user expansion).
default_sound: str = "default.wav"
# How long in seconds the window will flash in your dock or taskbar when