| Overview | How to Run | Features | Software Architecture | Preview | What I Learned |
This project is a desktop application built with Python & Tkinter that helps users limit the amount of time spent using specific programs.
It was originally created as a personal productivity tool to reduce gaming time and encourage better time management.
Users can either type a process name manually or select one through the built-in Browse feature. The application creates a countdown timer, sends notification reminders before the time expires, and automatically terminates the selected process when the timer reaches zero.
NOTE : Currently, the application has only been tested on Windows and must be run with administrator privileges in order to manage and terminate external processes.
-
Ensure you have Python installed.
-
Clone the repository:
git clone https://github.com/erfaw/PTK -
Make Virtual Environment:
python -m venv .venvthen on Git Bash:
source ./.venv/Scripts/activate -
Install dependencies:
pip install -r requirements.txt -
Run :
python main.py
- Set a
custom time limitfor any running application. Select a target programby entering itsprocess nameor using theBrowse feature.- Display a
live countdown timeruntil the selected application is terminated. - Send
reminder notifications15 minutes and 1.5 minutes before the time limit expires. - Automatically
terminatethe target process when the timer reaches zero. Filter unrelated processesfrom theBrowse listto simplify program selection.- Designed and tested for
Windowsenvironments. Need administrator privilegesfor managing external processes.
I tried to project follows Object-Oriented Programming (OOP) principles and Separation of Concerns. Responsibilities are divided into dedicated Classes in separate modules:
- ProgramManager – Process discovery, management, and termination.
- Timer – Time calculations, formatting, and countdown management.
- Notification – User notification delivery.
- GUI – User interface, input handling, warnings, and timer visualization.
These components are orchestrated by main.py, which acts as the application's entry point.
- Building a desktop application with Tkinter for a real-world personal use case.
- Designing graphical user interfaces instead of relying solely on command-line applications.
- Working with the Tk/Tcl event loop and understanding how GUI applications handle user interactions and scheduled tasks.
- Managing and monitoring operating system processes programmatically.
- Implementing countdown timers and time-based automation workflows.
- Sending desktop notifications and integrating user reminders into applications.
- Setting custom application icons and improving the overall user experience.
- Applying Object-Oriented Programming (OOP) principles to structure a larger application.
- Practicing Separation of Concerns by distributing responsibilities across dedicated modules.
- Designing components that communicate with one another without relying on a single "God Object".
- Building a more maintainable and scalable codebase through modular architecture.
- Translating a personal productivity problem into a complete software solution.


