by vortico · 7y ago · 0 comments
while true; do
sleep 900
zenity --entry --text="what u doin" >> done.txt
done
Although now it's just a reminder that isn't logged. zenity --question --text "Are you working?"
It doesn't really mean "Are you goofing off" but rather "Are you doing what truly matters right now instead of refactoring code or responding to less-than-useful emails?" while sleep 900 ; do .. done
true not required. sleep is true unless interrupted.Makes me wonder about code golf for shell scripts. Now there's a rabbit hole...
If there is a timer running it also knows (based on my calendar) if I should be doing something else and asks if I am and offers to change the timer for me [2]
[1] custom script
[2] the same custom script pings my phone/tablet via a Pushcut webhook. This pings me the notification but also allows me to tap the notification and start a new, relevant, timer using iOS shortcuts and Zapier
IMO you can spend days shuffling around the same code if you want. It's not that refactoring is bad it's a priority thing.
Also if you refactor too frequently that's a sign you need to take a step back and more thoroughly plan out your system.
You want good code that's maintainable? You're refactoring (and probably adding tests) as you go.