Automating my life with python
All scripts are available in full on my GitHub ...
Touch bar Killer and reboot
If you use a MacBook Pro with the M1 chip and Touch bar, you'll have probably noticed an issue later in the laptops life that the touch bar becomes unresponsive, flashes consistently and is often difficult to look at, after trawling online at forums on how to fix this, more solutions involved replacing the touch bar and/or laptop, which I am not willing to spend money on
Instead, you can write a command to the terminal to kill and reboot the touch bar, which makes it more bearable for some time, the commands are simple, but easily forgettable, so I have a script that runs the commands for me, with an associated cron job that schedules it.
MacBook Pro Health check
Macs are expensive, and I don't want to be replacing them every other year, so I like to take diligent care of it
However it's a lot harder to take care of an Apple product as they do not like to be taken apart, so you need to look after the insides, from the inside, which is why I wrote this 'health_check' script that purges memory, monitors CPU performance, checks sensors, and informs me of any issues -> simple yet powerful, and scheduled with a very simple cron job
Another feature I want to implement is a check on the temperature sensors, but this moduel in the python libraray doesn't seem to agree with MacOS infrastructure, so this will be something Ill try to implement in future.
Downloads folder organiser
I spend a lot of time online, and I am always on the lookout for some projects I can work on, inspiration for learning new languages, and new apps that make me more productive, so my downloads are riddled with files of all types from a long time ago
I fixed that in a couple of minutes by writing a script that organises my downlaods folder at 4.30pm every day into folders depending on the file type (images, audio, executables, etc.) this worked well, and I do plan to create a recurring task that organises my entire file system in a similar way.