Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ pip install -r requirements.txt
./run_mac.sh
```

Use a Python installation with Tk support. Some Homebrew Python builds on Apple
silicon do not bundle `tkinter` by default. If `import tkinter` fails, install
the matching Homebrew Tk package for your Python version. For example:

```bash
brew install python-tk@3.14
```

Grant Screen Recording and Accessibility permissions to the terminal app or
Python executable in System Settings. Restart the launcher after changing those
permissions.
Expand Down
13 changes: 13 additions & 0 deletions collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,15 @@ def __init__(self):
self._label = None
self._thread = None
self._running = False
self._enabled = True
self._pending_state = 'IDLE'
self._pending_text = None
self._dialog = None

def start(self):
if OS_NAME == 'macos':
self._enabled = False
return
self._running = True
self._thread = threading.Thread(target=self._run_tk, daemon=True)
self._thread.start()
Expand Down Expand Up @@ -285,6 +289,8 @@ def _poll(self):
self._root.after(80, self._poll)

def update_state(self, state: str, extra: str = ''):
if not self._enabled:
return
label = self.LABELS.get(state, state)
if extra:
label = f"{label} | {extra}"
Expand All @@ -295,6 +301,11 @@ def stop(self):
self._running = False

def ask_description(self) -> Optional[str]:
if not self._enabled:
try:
return input("Task description: ").strip()
except EOFError:
return None
self._dialog_result = None
self._dialog_done = threading.Event()

Expand Down Expand Up @@ -511,6 +522,8 @@ def callback(hmonitor, _hdc, _rect, _data):


def choose_capture_screen_gui(monitors: List[ScreenRegion]) -> Optional[ScreenRegion]:
if OS_NAME == 'macos':
return None
try:
import tkinter as tk
except Exception:
Expand Down