Switch off Mouse After Your Work….
Very often i forget switching off the mouse after my work that the battery drains too fast, it is when i decided to go for a simple utility (in Python) which reminds me to switch off the mouse too whenever i shut down my system .
For this purpose, following two libraries are required which can be installed using pip utility from command prompt.
Eg: pip install <library name>
- shutdown — To shutdown the system.
- pyttsx3 — To remind the user with the remainder message to poweroff the Mouse.
Here is the Code..
Step1: import the required libraries :
from shutdown import *
import pyttsx3
Step2: Create a function which would read the text passed to it.

Step3: In the Main Program , invoke the function with remainder message and call the function for shutdown or hibernate the PC.

The Complete code is given below:

while the above program is to hibernate the PC, if you wish to shutdown or log off, you may try one of the following options.

Step 4: Last but not the least, create a bat file for the above code and create a shortcut for the same in desktop, change the icon to your favourite one labelled as shutdown and double click for execution.