Skip to main content

Keep Slack/Teams active by simulating key presses at regular intervals

Project description

lazy-b

Keep Slack, Microsoft Teams, or other similar applications from showing you as "away" or "inactive" by simulating key presses at regular intervals.

Installation

Install directly from PyPI using pip or uv:

# Using pip
pip install lazy-b

# Using uv
uv pip install lazy-b

# For macOS users (to enable dock icon hiding)
pip install "lazy-b[macos]"
# or with uv
uv pip install "lazy-b[macos]"

Usage

Command Line

Run lazy-b from the command line:

# Basic usage (will press Shift key every 1 second)
# Runs in background mode by default (no dock icon)
lazy-b

# Customize the interval (e.g., every 30 seconds)
lazy-b --interval 30

# Run in quiet mode (no console output)
lazy-b --quiet

# Run in foreground mode (shows dock icon)
lazy-b --foreground

By default, lazy-b runs in background mode with no dock icon (on macOS). You can close the terminal window after starting it, and it will continue to run.

To stop lazy-b, you can press Ctrl+C in the terminal window if it's still open, or find and kill the process:

# Find the process
ps aux | grep lazy-b

# Kill it using the PID
kill <PID>

Python API

You can also use the Python API directly in your own scripts:

from lazy_b import LazyB
import time

# Create an instance with a custom interval (in seconds)
lazy = LazyB(interval=45)

# Define a callback function to handle status messages (optional)
def status_callback(message):
    print(f"Status: {message}")

# Start the simulation
lazy.start(callback=status_callback)

try:
    # Keep your script running
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    # Stop on Ctrl+C
    lazy.stop()

Features

  • Prevents "away" or "inactive" status in messaging applications
  • Customizable interval between key presses
  • Simple command-line interface
  • Runs in background with no dock icon by default
  • Python API for integration into your own scripts
  • Minimal resource usage

Requirements

  • Python 3.8 or higher
  • PyAutoGUI
  • PyObjC-Core (for macOS dock icon hiding, optional)

License

MIT

Disclaimer

This tool is meant for legitimate use cases like preventing timeouts during presentations or when you're actively reading but not typing. Please use responsibly and in accordance with your organization's policies.

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

lazy_b-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

lazy_b-0.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file lazy_b-0.1.2.tar.gz.

File metadata

  • Download URL: lazy_b-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for lazy_b-0.1.2.tar.gz
Algorithm Hash digest
SHA256 94a2e614682352be25ab5222ec3e867ddbf37c3896c1938a755e6e7a0dee0038
MD5 76d9a93ad2c3d6a67c02b18d47bf795d
BLAKE2b-256 2c4811413588d6dfae6bd91464af8cd06785fe0463774f73c0e9dde1d3621030

See more details on using hashes here.

File details

Details for the file lazy_b-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lazy_b-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for lazy_b-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d8a3d08e91c084407b312c16490eaa17abe00bd6162248d51407b2384607d924
MD5 ac652b2f1be6317f1d7f76a0efe430d4
BLAKE2b-256 d76297e64cc687250f3cd7638f0b4b79f053a941b5cdb92c44cf4c66af760b29

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