Last active
October 8, 2020 19:27
-
-
Save shikaan/75e740f854b8c5cc9f583f549d6c4977 to your computer and use it in GitHub Desktop.
Randomly remove volume to practice timing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
SLEEP="$1" | |
while [[ 1 -eq 1 ]]; do | |
if [[ $(($RANDOM % 2)) -eq 0 ]]; then | |
echo "Mute" | |
sudo osascript -e "set volume output muted true" | |
else | |
echo "Unmute" | |
sudo osascript -e "set volume output muted false" | |
fi | |
sleep $SLEEP | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SLEEP="$1" | |
while [[ 1 -eq 1 ]]; do | |
amixer -q -D pulse sset Master toggle | |
if [[ $(($RANDOM % 2)) -eq 0 ]]; then | |
echo "Toggle!" | |
fi | |
sleep $SLEEP | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment