Skip to main content

AW Watcher AFK Prompt

PyPI - Version PyPI - Python Version


This ActivityWatch "watcher" prompts you with a dialog when you return from an AFK (away from keyboard) break, asking what you were doing.

Installation

Install through pip or pipx or clone the repository and install using the Makefile:

git clone https://github.com/tobixen/aw-watcher-afk-prompt.git
cd aw-watcher-afk-prompt
make install

For a complete setup including systemd service:

make install-all

A note on which Python you install against

This is a Tk application, so it needs a Python whose Tk is built with Xft (python3 -c "import tkinter; print(tkinter.Tk().tk.call('::tk::pkgconfig','get','fontsystem'))" should print xft). Distro Pythons are fine. The interpreters uv downloads (python-build-standalone) are not: their bundled Tk has no Xft, which means the dialogs are drawn in the bitmap fixed font and you cannot type non-ASCII characters (æøå, ü, …) into them.

make install therefore asks uv for a system Python (--no-managed-python). If you install by hand, do the same — and if a dialog ever shows up in an ugly bitmap font, that is the symptom; the watcher logs a warning about it at startup.

Running

Recommended: Using aw-qt

The recommended way to run this watcher is through aw-qt, which manages both the server and watchers automatically. After installing aw-watcher-afk-prompt, aw-qt should detect and start it automatically.

Alternative: Manual Start

If not using aw-qt, you can run it manually:

aw-watcher-afk-prompt

Make sure aw-server and aw-watcher-afk are running first, as this watcher monitors AFK events.

Alternative: systemd (Linux)

For users not using aw-qt who want automatic startup via systemd:

Quick setup with Makefile:

make enable-service

For Wayland users, also run:

make setup-wayland

This automatically configures your compositor to import the WAYLAND_DISPLAY environment variable.

Configuration

The watcher can be configured via a config file or command-line arguments. Command-line arguments override config file settings.

Config File

Configuration is stored in the ActivityWatch standard location:

~/.config/activitywatch/aw-watcher-afk-prompt/aw-watcher-afk-prompt.toml

The config file is created automatically with default values on first run if it doesn't exist.

Command-line Arguments

You can override config file settings using command-line arguments:

aw-watcher-afk-prompt --depth 15 --frequency 10 --length 3

Available options:

  • --depth: Minutes to look into the past for events (default: from config or 10)
  • --frequency: Seconds between AFK event checks (default: from config or 5)
  • --length: Minimum AFK minutes before prompting (default: from config or 5)
  • --prompt-timeout: Minutes before an unanswered prompt hides itself and is re-asked later, so it can't be buried under other windows and forgotten (default: from config or 5; 0 disables). Typing restarts the countdown, and the live "still AFK" dialog only starts it once you are back at the keyboard.
  • --testing: Run in testing mode
  • --verbose: Enable verbose logging

Lid Watcher Integration (Optional)

This watcher can integrate with aw-watcher-lid to also prompt you about laptop lid closures and system suspends, not just regular AFK periods.

Why use both watchers?

Lid events may sometimes be more accurate than the ordinary afk watcher (particularly for short-lived afk events), but won't catch cases where the laptop is left with the lid open, as well as when someone leaves the desktop computer.

Setup:

  1. Install aw-watcher-lid: pipx install aw-watcher-lid
  2. Start it (see aw-watcher-lid README for setup)
  3. aw-watcher-afk-prompt will automatically detect and use it

To disable lid integration: I.e. if having an external keyboard it's possible to close the lid without being AFK. Set enable_lid_events = false in your config file - or skip installing the aw-watcher-lid.

Features

Split AFK Periods

Quite often one ends up doing multiple tasks in my afk periods, for instance it could be "lunch" for 20 minutes and "phone call" for 10 minutes. The pop-up dialog has a Split button for splitting the afk time on multiple event lines. You can add as many lines as needed and then edit either the start time or the duration of the event lines.

Contributing

Here are some helpful links:

History

This project was originally created by Jeremiah England as aw-watcher-ask-away. It was forked and renamed by Tobias Brox to aw-watcher-afk-prompt in 2026 due to inactive maintainer of the original project (see https://github.com/Jeremiah-England/aw-watcher-ask-away/issues/8).

License

aw-watcher-afk-prompt is distributed under the terms of the MIT license.

Metadata

Release files for aw-watcher-afk-prompt 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aw-watcher-afk-prompt 0.2.0
File Size Uploaded
aw_watcher_afk_prompt-0.2.0.tar.gz 104.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aw-watcher-afk-prompt 0.2.0
File Interpreter ABI Platform
aw_watcher_afk_prompt-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 158.8 kB

Release files / aw_watcher_afk_prompt-0.2.0.tar.gz

Download URL aw_watcher_afk_prompt-0.2.0.tar.gz
Size 104.5 kB
Tags Source
SHA-256 checksum
How to use checksums
46f20b35ad6ec8a7ffbd89938953d6acf75a8273a4f4e7d4060ef51d4a54eda8
BLAKE2b-256 checksum
How to use checksums
3fde6f42ab527d32c509f966519ac9e8fe6c84a673ab9c6acae5c30579018e7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / aw_watcher_afk_prompt-0.2.0-py3-none-any.whl

Download URL aw_watcher_afk_prompt-0.2.0-py3-none-any.whl
Size 54.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69fccacd0dae65d2c773d266492982e6f68af7d453f8f4f79824142cfe508f43
BLAKE2b-256 checksum
How to use checksums
baf4cc6098cc8d94f0850fe29f429fae367a31076ebc32785929d577f8356622
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page