added a current shortcut in system tray menue

This commit is contained in:
2025-08-11 01:52:57 +03:30
parent 9e54b9fa20
commit 3b36df7e67
2 changed files with 5 additions and 2 deletions

View File

@@ -5,3 +5,5 @@ call venv\Scripts\activate.bat
echo Starting the application...
start "OopsWrongLang" /B pythonw src\main.pyw
pause

View File

@@ -139,6 +139,7 @@ def setup_tray(config):
image = Image.open("assets/icon.png")
menu = pystray.Menu(
pystray.MenuItem(f'Current Shortcut: {get_shortcut()}',lambda icon, item: None),
pystray.MenuItem(
'Run on Startup',
on_toggle_startup,
@@ -161,7 +162,7 @@ def main():
# Register the keyboard shortcut
shortcut = get_shortcut()
keyboard.add_hotkey(shortcut, on_shortcut, suppress=True)
keyboard.add_hotkey(shortcut, on_shortcut)
print(f"Press {shortcut} to convert text to Persian.")
# Keep the script running