Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Clipboard Manager with Automatic History Cleanup

This Python-based clipboard manager allows you to securely monitor, store, and manage your clipboard history. The program keeps track of your clipboard content, stores it in a JSON file with timestamps, and automatically removes clipboard history older than 24 hours. It runs continuously in the background, making it easy to review or manage past clipboard entries.

The script also supports both encrypted and plaintext storage of clipboard history.

Features

  • Continuously monitors clipboard content.

  • Saves clipboard history with timestamps.

  • Automatically deletes clipboard history older than 24 hours.

  • Optionally encrypts clipboard history for secure storage.

  • Lightweight and runs in the background.

  • Runs on macOS and Linux.

Installation

Prerequisites

Before using this project, ensure you have Python 3.6+ installed. You will also need the following Python libraries:

  • pyperclip: For interacting with the clipboard.

  • cryptography: For optional encryption of clipboard data (if required).

  • json: Built-in for handling JSON files.

  • os, time, datetime: Standard libraries for file and time management.

Install Python Dependencies

Create a virtual environment (recommended):

python3 -m venv venv

source venv/bin/activate # macOS/Linux

Clone the Repository

  • Run the file using python clip_manager.py

Running Continuously

To run the clipboard manager continuously, even after terminal closure:

Option 1: Using Cron Jobs (Linux/macOS)

Edit your crontab:

crontab -e

Add the following line to run the script every 5 minutes (adjust as needed):

*/5 * * * * /path/to/venv/bin/python3 /path/to/clip_manager.py

Automatically Removing Old History

The script automatically removes clipboard history that is older than 24 hours. The remove_old_history function is executed periodically to filter out old entries from the clipboard_history.json file.

Contributing

If you'd like to contribute to this project, feel free to open a pull request or submit an issue. All contributions are welcome!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages