I wrote my first shell script yesterday, and it won’t be my last. Using the Linux command line makes me feel like a wizard, only my spells are typed and I don’t need to wear a cloak. But maybe I will? Probably not. My latest fun: typing “nmcli radio wifi off” to disconnect my wifi at will. Sometimes I like being offline, and now, solitude is just four words away. No dicking around, opening menus, making the precise clicks needed to get something simple done.
Four words! It’s fast.
Each new command is a fresh incantation for my spellbook.
A shell script is a text file given special permissions, and it contains lists of commands. I used a script to run pomodoro-CLI along with two audio files. Now, I can type pom25 into the terminal, and I instantly hear a few beeps, like an old-school arcade game, cars at the starting line for a race. The clock counts down (I don’t have to watch, but it’s there) and twenty five minutes later, my computer plays a different sound. I kept trying different pomodoro apps, but they all felt clumsy. And don’t like touching my phone during the day. Now, I have a proper incantation.
pom25! It’s my new wingardium leviosa. And now it takes me less than four seconds to start a pomodoro on my computer.
I could get used to this.
#!/usr/bin/env bash <– Says it’s a shell script
aplay “/home/cheri/REDACTED/05 Music/Sounds/quick-go.wav” <– plays this sound
pomodoro start –duration 25 -w <– Starts a 25 minute timer and waits it until it’s finished. (uses pomodoro-CLI program)
aplay “/home/cheri/REDACTED/05 Music/Sounds/well-done.wav” <– plays this sound