I’ve been trying to think about what I wanted to change about myself for a while. One major thread that has shown up in my life has been the
I wanted to create a quick program that would be able to check if I was playing music and so I began to look at the activity monitor to see if there was any way I could tell if I was playing music. By looking at the other hidden tabs I found the %CPU! It looked like the percentage went up ever so slightly from when it was inactive to when it was playing music.
Perfect!
Using that I was able to run an exec function that allows me to run terminal processes in node. With that I was able to get the memory value, and do a check every 5 seconds to see if it was using a higher percentage (Music Playing) or a lower percentage (No Music Playing).
Next up I needed a way to actually get me to go back to work!
I originally thought it could be fun since I usually leave my laptop open around the floor for it to blast very obnoxious music to try and be a negative incentive for me to return back to my station. However that could get annoying real quick for me but more importantly the people around me!
I had a jimmy neutron esque brain blast™️
https://www.youtube.com/watch?v=k3q1UTRKow0
I would use a phone call to get my attention. This had 2 benefits