Let's Shell Script Together: Case statements, audio control and more

Watch on YouTube

Show annotations

Download is disabled.

28,235

1,536

8

Genre: Science & Technology

License: Creative Commons Attribution license (reuse allowed)

Family friendly? Yes

Wilson score: 0.9898

Rating: 4.9793 / 5

Engagement: 5.47%

Luke Smith

Subscribe | 83.3K

Shared March 17, 2020

I want to write a shell script that can deal with either one of the two audio systems (ALSA and Pulseaudio) on Linux, so people who use my dotfiles don't need to revise all my dotfiles to edit some audio shortcuts in dwm or i3.

One additional optimization that I should've mentioned is that at the end, we can actually get rid of the case statement since our functions are coincidentally equal to the value of "$1". That would be okay in this case, but I didn't do it here because I'm thinking about adding more. Then again, we'll see how the script evolves.

WEBSITE: https://lukesmith.xyz 🌐❓🔎
DONATE NOW: https://lukesmith.xyz/donate 💰😎👌💯