An open API service indexing awesome lists of open source software.

https://github.com/parmeetbhamrah/focus-lock

A Python-based productivity tool to block distracting apps and stay focused on deep work.
https://github.com/parmeetbhamrah/focus-lock

app-blocker automation cli deep-work focus productivity psutil python system-tools

Last synced: 16 days ago
JSON representation

A Python-based productivity tool to block distracting apps and stay focused on deep work.

Awesome Lists containing this project

README

        

# Focus Lock ๐Ÿ”’

A simple yet effective Python tool to boost productivity by blocking distracting apps for a set duration.

## ๐Ÿš€ Features

- Block one or multiple apps by name (e.g., `notepad.exe`, `chrome.exe`)
- Custom duration: choose hours or minutes
- Terminates running instances of selected apps
- Keeps monitoring in the background and blocks app relaunches
- Lightweight and command-line based

## ๐Ÿ› ๏ธ Tech Stack

- [Python](https://www.python.org/)
- [psutil](https://pypi.org/project/psutil/)

## ๐Ÿง  How It Works

- The script prompts the user to input names of apps to block and a duration.
- It checks every 2 seconds if any of the selected apps are running.
- If found, it terminates the process.
- The process continues until the specified duration elapses.

## ๐Ÿ“ฆ Installation

```bash
pip install psutil
```

## ๐Ÿงช Usage

```bash
python focus_lock.py
```

Follow the on-screen prompts to enter:
1. App names (comma separated)
2. Duration format (minutes or hours)
3. Time to block the apps

## ๐Ÿ“„ License

MIT License

---

Built with โค๏ธ by Parmeet Singh Bhamrah