Inspiration
My inspiration for this project stemmed from noticing my own productivity struggles while using my computer. Despite not using my phone excessively, I found myself wasting significant time on my PC, particularly on platforms like YouTube and binge-watching TV series. Every time I intended to focus on a task, I inevitably got sidetracked into hours of unproductive screen time. This realization fueled my desire to create a solution that could detect and mitigate these distractions seamlessly.
What it does
The script monitors screen activity, detecting distracting websites or apps per your settings. When distractions are identified, it closes those distracting websites or applications.
For added focus, an optional feature allows you to connect an Arduino with a taser or loud buzzer. When distractions are detected, it provides a physical reminder to stay focused.
Furthermore, it tracks your daily activities, logging them with timestamps in a text file specific to each day. This allows you to review and reflect on your daily productivity.
How I built it
I constructed this project primarily using Python. The script, responsible for monitoring screen activity and detecting distractions, was developed using Python. For screen monitoring, I employed the pygetwindow library. To interact with and close browser tabs and applications, I utilized pyautogui's hotkey functionalities.
Furthermore, I leveraged the OpenAI library to analyze YouTube content. By categorizing the content, if OpenAI identified it as "entertainment" or "music," it was flagged as a distraction.
For Arduino integration, I utilized the Arduino IDE to program the board. The Arduino script was designed to activate either a buzzer or a taser upon receiving a trigger signal from the Python script. This communication was facilitated through the serial library, contingent upon an Arduino being connected to the specified port.
To implement daily activity tracking, I employed file handling in Python. Activities were logged with timestamps into text files corresponding to each day, facilitating easy review and reflection on daily productivity.
Challenges I ran into
Initially, I planned to focus solely on browser tabs, which led to the puzzle of identifying the active tab. I experimented with capturing the URL area and using OCR, but that approach was too resource-intensive. Thankfully, I stumbled upon pygetwindow, which allowed me to track browser windows effortlessly. Surprisingly, the window title contained the website's name, eliminating the need for complex OCR.
As for YouTube videos, extracting their titles was straightforward with pygetwindow. However, categorizing them as productive or distracting required some serious mental exertion. To tackle this, I turned to the ChatGPT API, leveraging its capabilities to analyze and categorize the videos effectively.
Accomplishments that I'm proud of
Successful Implementation: Overcoming initial challenges, I successfully implemented the project, providing students with a reliable solution to tackle distractions and boost productivity.
Expanded Scope: I'm proud of my ability to expand the project's scope beyond its initial concept. From focusing solely on browser tabs to incorporating the detection of distracting applications, games, and categorization of YouTube videos.
Effective Integration: By seamlessly integrating Python, Arduino, and AI technologies, I created a cohesive solution that effectively addresses students' needs for reducing distractions and enhancing focus.
User Impact: I'm excited about the positive impact my project has on the students. Because of this, now they can work on a task without distractions.
What I learned
Technical Proficiency: Building this project required me to dive deep into various technologies and libraries, including Python and AI. I expanded my technical skills and learned how to integrate these technologies seamlessly.
Problem-Solving Skills: Through this project, I honed my problem-solving abilities by finding innovative solutions to challenges such as identifying active browser tabs and categorizing YouTube videos effectively.
What's next for distraction_slayer
The next step for distraction_slayer involves enhancing user experience through the implementation of a user interface (UI). By introducing a GUI, we will provide students with a more intuitive way to configure settings, such as blocking websites and software. This will streamline the customization process, allowing students to tailor the application to their specific needs without having to modify code.
Additionally, we plan to incorporate features such as a configuration menu, where students can easily specify their preferences for distraction-blocking. This will include options for blocking websites, software, and other potential distractions.
Furthermore, we aim to integrate functionality for viewing data logs directly within the application. Students will have the ability to access and analyze their productivity data seamlessly, gaining insights into their usage patterns and areas for improvement.
Overall, these enhancements will elevate distraction_slayer to the next level, providing students with a more user-friendly and comprehensive solution for managing distractions and boosting productivity.



Log in or sign up for Devpost to join the conversation.