Auto-minimize your PC screen the second someone walks in? beginner
Robotics & Automation
154 Views Aug 25, 2026

Auto-minimize your PC screen the second someone walks in?

রুমে কেউ আসলেই কম্পিউটারের সব মিনিমাইজ?

Estimated Budget: ৳900

Project Video Tutorial

Ready to build this project?

Get all 3 genuine components used in this video in 1-click.

Hell yeah, bro! All you need is an Arduino, an IR sensor, and a tiny bit of Python magic.



This is a super simple project, perfect to build just for fun. The core idea is: whenever the IR sensor connected to your Arduino detects something, the Arduino will shoot a message over to your computer. As soon as the PC gets that signal, boom! Everything open on your screen gets minimized.  

Since I'm a Windows user, the quick shortcut to hide everything is the Win + Comma keys. Hold them down together, and all your open windows vanish, leaving just your bare desktop in plain sight.

But wait, does this project even make any sense? Well, picture this: you're 45 years old, happily watching Tom and Jerry, or maybe you're playing Call of Duty while hiding from your wife. Suddenly, she catches you red-handed and gives you the scolding of a lifetime. Now tell me, doesn't this make perfect sense?

Here's a list of the components we'll be using for this project, along with their links.

You can grab the stuff used in this project from right here: 

  1. IR Sensor
  2. Arduino UNO
  3. Arduino Mega



The Arduino code isn't rocket science at all. We just need to write a simple script so that when the sensor detects an obstacle, it sends a quick message to the PC. 



Once you're done coding the Arduino, check the Arduino IDE to see which COM or Serial Port your board is using to communicate. You can easily find this in the Ports menu of the Arduino IDE. We'll need this COM Port (along with the baud rate) for our Python script in just a bit.

Now, before we jump into the Python part, we need to close the Arduino IDE. Honestly, the IDE being open isn't a huge deal, BUT if the Serial Monitor is open, Python won't be able to talk to the Arduino. So, definitely close the Serial Monitor to avoid any communication hiccups. Two apps just can't use the same serial port at the exact same time!

To run the Python script, you absolutely need Python installed on your system, along with a few extra Python modules. 


How do you know if you already have Python?

Go to your Start menu, search for 'powershell', and open Windows PowerShell. You'll feel a bit like a hacker once you see that Terminal or CLI (Command Line Interface).

Now type 'python' and smash Enter. 

If Python is installed, it will look something like this:



And if it’s not installed, hitting Enter will straight up open the Microsoft Store so you can download it. Just install it right from there! 



After installing, if you want to be 100% sure it's there, open PowerShell again, type 'python', hit enter, and double-check!

Now that we're sure Python is ready to roll, let's grab the necessary Python modules. Without these, our auto-minimize script won't work. Jump back into PowerShell. 

Then, run these commands one by one to install the modules:  

    pip install pynput

    pip install pyserial

    pip install pyautogui


Next up, open your favorite code editor! Whether it's VS Code, Notepad++, Sublime Text, or literally just regular Notepad if you don't have the others.

Copy one of the scripts from below, paste it in, and save it with a .py extension. You can name it whatever you want! After saving, you can just double-click the file or run it from the command line. 

This first script works fine, but if you minimize it and try to do other stuff, it won't run in the background. If you want a script that works silently in the background, just scroll down a bit more!


And here’s the script that runs perfectly in the background too.

Share This Project Tutorial

Spread the idea with fellow makers, engineering students, and IoT enthusiasts.

Community Discussion & Questions 0

Ask questions, share your build results, or reply to fellow makers.

Join the Community Discussion

Please log in or create an account to post a comment or reply to this project.

No comments on this project yet

Be the first to share your thoughts, feedback, or ask a question about this build!

Amazing Vangari

Amazing Vangari

Hardware Maker & Electronics Enthusiast

Customer Reviews & Testimonials

What Engineers & Builders Say

Trusted by makers, robotics researchers, and DIY electronics enthusiasts across Bangladesh.

"The ESP32 DIY Ambilight Kit arrived within 24 hours in perfect packaging. Everything worked out of the box with flawless code support!"

Tanvir Ahmed

Tanvir Ahmed

Robotics Engineer

"KathalTech is my go-to store for sensors, NodeMCU boards, and microcontrollers in Bangladesh. Highly reliable service and genuine components."

Nusrat Jahan

Nusrat Jahan

IoT Researcher

"Super fast delivery and great support. The pickup point option made it very convenient to collect my project parts after classes."

Sabbir Hossain

Sabbir Hossain

University Student & Hobbyist

Authorized Brands & Hardware Ecosystem Partners
DIY Electronics & Hardware Hub

Sign in with Google +100 PTS

Get 100 Welcome Points & track your orders seamlessly.

Continue with Google