Skip to main content

Cross-platform idle activity simulator with AnyDesk integration

Project description

Desk Awake

Cross-platform idle activity simulator with a web control panel. Keeps your session active over AnyDesk by generating mouse movements and keyboard actions.

Features:

  • Auto-detects OS (macOS/Linux/Windows) and uses appropriate keys and commands
  • Web dashboard — control run/pause/stop and AnyDesk connections from any browser
  • Connection monitoring — detects AnyDesk drops, auto-reconnects, sends alerts
  • Notifications — Slack, Discord, or generic webhook alerts on connection issues
  • Multi-day scheduling — run daily on a schedule until an end date
  • Expose via ngrok for remote control from anywhere

Installation

pip install desk-awake

# On macOS, include optional mac dependencies
pip install "desk-awake[mac]"

Usage

Web Dashboard Mode (recommended)

Start the control panel:

desk-awake serve
desk-awake serve --port 8080

Then open http://localhost:5000 in your browser. From the dashboard you can:

  • Run / Pause / Stop the activity simulator
  • Connect to AnyDesk by entering a remote address
  • Monitor connection health — auto-reconnects on drops
  • Set webhook URL for Slack/Discord alerts
  • View live logs

To access remotely via ngrok:

# In another terminal
ngrok http 5000

Headless Mode (no web UI)

# Run until a specific time
desk-awake run --until "18:30"

# Multi-day: run 09:00–18:30 daily until a date
desk-awake run -u "18:30" -s "09:00" -e "2026-06-15"

# Skip sleep on exit
desk-awake run -u "18:30" --no-sleep

Exit behavior flags (headless mode)

Flag Description
--close-anydesk Close AnyDesk when done (default)
--no-close-anydesk Don't close AnyDesk when done
--sleep Put machine to sleep when done
--no-sleep Don't sleep when done

OS-specific defaults

OS Close AnyDesk Sleep
macOS
Linux
Windows

Connection Monitoring

When running in web dashboard mode with an AnyDesk address configured:

  • Checks connection every 15 seconds
  • On disconnect: attempts up to 5 reconnections
  • Sends webhook notification on connection loss and recovery
  • If all reconnect attempts fail, stops and sends a final alert

Webhook Notifications

Set a webhook URL in the dashboard settings to receive alerts:

  • Slack: https://hooks.slack.com/services/...
  • Discord: https://discord.com/api/webhooks/...
  • Any endpoint accepting JSON POST with title and message fields

Running without installing

python -m desk_awake serve
python -m desk_awake run --until "18:30"

Requirements

  • Python 3.8+
  • pynput (installed automatically)
  • flask (installed automatically)
  • On macOS: pyobjc packages (install with pip install "desk-awake[mac]")
  • On Linux: may need xdotool or X11 libs depending on your display server

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

desk_awake-1.4.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

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

desk_awake-1.4.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file desk_awake-1.4.0.tar.gz.

File metadata

  • Download URL: desk_awake-1.4.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for desk_awake-1.4.0.tar.gz
Algorithm Hash digest
SHA256 d806c78c4240732c24633cb31558ca1d9dd99dc63c98b62a81a8c423c7e391f1
MD5 2b1f6ccc742d95f93939e56db8de6791
BLAKE2b-256 fa61d533fe431157825aa15ef56e50da217058daae98c31ec505f8bc8d294458

See more details on using hashes here.

File details

Details for the file desk_awake-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: desk_awake-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for desk_awake-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 051f008b10debb4ed01edd49f0835291e007ddecde7b3d2fc39e8303b6e4a13f
MD5 d16c4913bfdc9be9425435bf36d70375
BLAKE2b-256 d3e2ece621fce53eff5d750bee079e43c3c1726992ba54f1f0497eba21e1de46

See more details on using hashes here.

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