Created
July 4, 2019 03:39
-
-
Save jmwohl/e8a7b01def6923581b7a98186b178d5c to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Add this to a file, e.g. video-autoplay.sh, and then source it from .bashrc | |
# If n has been pressed, don't autoplay | |
read -t 1 -n 1 key | |
if [[ $key = n ]] | |
then | |
echo "no video" | |
else | |
# hide the prompt: | |
PS1="" | |
# set the terminal text color to black | |
setterm --foreground black --background black --cursor off --clear all | |
# start up video looping as bg process | |
nohup omxplayer --loop --no-osd iatech-reel.mp4 >/dev/null 2>&1 & | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment