diff --git a/shared/hooks/flashbang.sh b/shared/hooks/flashbang.sh index ff7f9bc..3a865a5 100644 --- a/shared/hooks/flashbang.sh +++ b/shared/hooks/flashbang.sh @@ -16,7 +16,6 @@ import re import shutil import subprocess import sys -import tkinter as tk def notify_fallback() -> None: @@ -25,6 +24,13 @@ def notify_fallback() -> None: subprocess.run([notify_send, "AI assistant requires attention"], check=False) +try: + import tkinter as tk +except ImportError: + notify_fallback() + sys.exit(0) + + def monitor_bounds(primary_only: bool) -> tuple[int, int, int, int]: root = tk.Tk() root.withdraw()