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

@@ -4,4 +4,6 @@ cd /d "%~dp0"
call venv\Scripts\activate.bat call venv\Scripts\activate.bat
echo Starting the application... echo Starting the application...
start "OopsWrongLang" /B pythonw src\main.pyw start "OopsWrongLang" /B pythonw src\main.pyw
pause

View File

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