Skip to content

Instantly share code, notes, and snippets.

@eparadis
Created October 18, 2021 19:23
Show Gist options
  • Save eparadis/b4d2e36022854a545bb1d9d766513793 to your computer and use it in GitHub Desktop.
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
#!/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
@eparadis
Copy link
Author

Hey look: months later I actually came back to use this on another computer. Yay me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment