Skip to main content

Prompt for what you were doing when returning from AFK and log it in ActivityWatch

Project description

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

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)
  • --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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aw_watcher_afk_prompt-0.1.5.tar.gz (61.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aw_watcher_afk_prompt-0.1.5-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file aw_watcher_afk_prompt-0.1.5.tar.gz.

File metadata

  • Download URL: aw_watcher_afk_prompt-0.1.5.tar.gz
  • Upload date:
  • Size: 61.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aw_watcher_afk_prompt-0.1.5.tar.gz
Algorithm Hash digest
SHA256 523bdf1267a72b17daa5b2750d23b2676294562414d6d6832edcc3ad7c927ce5
MD5 e68ccc6dcad32869a6ce82a6fc7b0076
BLAKE2b-256 11c89e228119924fa9d1c22adc28b81f69f164a78258801c7ab79c44b0f82586

See more details on using hashes here.

Provenance

The following attestation bundles were made for aw_watcher_afk_prompt-0.1.5.tar.gz:

Publisher: publish.yml on tobixen/aw-watcher-afk-prompt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aw_watcher_afk_prompt-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for aw_watcher_afk_prompt-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dab0b3c5a4fe4e8371a4b3303d3ceaad62a42389fbdbb4d94c4c798d1c323307
MD5 dcfc4b39574bada66c5b7093abec4aa4
BLAKE2b-256 2b7dea450f8fa1eb3603ab24ddd256df9613235d83e2e9ad36982a20f3564cad

See more details on using hashes here.

Provenance

The following attestation bundles were made for aw_watcher_afk_prompt-0.1.5-py3-none-any.whl:

Publisher: publish.yml on tobixen/aw-watcher-afk-prompt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page