#161 beep sound when sound notification abled and no beep sound when disabled

This commit is contained in:
Shayaan Shaikh 2023-09-30 22:12:19 +05:30
parent 0b17e0dd88
commit 91a97af5d9

View File

@ -7,6 +7,7 @@ from typing import Dict, Optional, Callable
from playsound import playsound from playsound import playsound
from fishy import helper from fishy import helper
from fishy.helper.config import config
from fishy.helper.hotkey import process from fishy.helper.hotkey import process
from fishy.helper.hotkey.process import Key from fishy.helper.hotkey.process import Key
@ -63,7 +64,9 @@ class HotKey:
if key in Key: if key in Key:
callback = self._hotkeys[key] callback = self._hotkeys[key]
if callback: if callback:
playsound(helper.manifest_file("beep.wav"), False) if config.get("sound_notification", False):
playsound(helper.manifest_file("beep.wav"), False)
callback() callback()
time.sleep(0.1) time.sleep(0.1)