Created
October 18, 2021 19:23
-
-
Save eparadis/b4d2e36022854a545bb1d9d766513793 to your computer and use it in GitHub Desktop.
a script that writes to a text file that you can use in OBS for an on-screen meeting timer
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 | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: ./meeting_countdown.sh NUM_MINS" | |
exit 1 | |
fi | |
MINS=$1 | |
OUTFILE=~/src/obs/timer_out.txt | |
MESSAGE="time remaining in this meeting: " | |
for i in `seq $(($MINS*60)) 1` | |
do | |
sleep 1 | |
MIN_REMAINING=$((i / 60)) | |
SEC_REMAINING=$((i - ( $MIN_REMAINING * 60 ) )) | |
printf "$MESSAGE %d:%0.2d" $MIN_REMAINING $SEC_REMAINING > $OUTFILE | |
done | |
while test 1; do | |
sleep 1; echo "$MESSAGE None." > $OUTFILE | |
sleep 1; echo "$MESSAGE nOne." > $OUTFILE | |
sleep 1; echo "$MESSAGE noNe." > $OUTFILE | |
sleep 1; echo "$MESSAGE nonE." > $OUTFILE | |
sleep 1; echo "$MESSAGE none_" > $OUTFILE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey look: months later I actually came back to use this on another computer. Yay me!