From 91a97af5d9b83f3a364ed8b644b5b9c32f659a85 Mon Sep 17 00:00:00 2001 From: Shayaan Shaikh Date: Sat, 30 Sep 2023 22:12:19 +0530 Subject: [PATCH] #161 beep sound when sound notification abled and no beep sound when disabled --- fishy/helper/hotkey/hotkey_process.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fishy/helper/hotkey/hotkey_process.py b/fishy/helper/hotkey/hotkey_process.py index 8e11542..5342a50 100644 --- a/fishy/helper/hotkey/hotkey_process.py +++ b/fishy/helper/hotkey/hotkey_process.py @@ -7,6 +7,7 @@ from typing import Dict, Optional, Callable from playsound import playsound from fishy import helper +from fishy.helper.config import config from fishy.helper.hotkey import process from fishy.helper.hotkey.process import Key @@ -63,7 +64,9 @@ class HotKey: if key in Key: callback = self._hotkeys[key] if callback: - playsound(helper.manifest_file("beep.wav"), False) + if config.get("sound_notification", False): + playsound(helper.manifest_file("beep.wav"), False) + callback() time.sleep(0.1)