Created
November 22, 2018 14:01
-
-
Save toast254/4e0e218354cc76cd14c031da978a56b5 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 | |
############################### | |
# to deactivate this script | |
# uncomment the following line | |
# and reboot | |
exit 0 | |
############################### | |
function clear_screen { | |
# move to tty1 | |
sudo su -c 'chvt 1' | |
# clear the display | |
sudo su -c "clear > /dev/tty1" | |
# turn off the flashing cursor | |
sudo su -c "setterm -cursor off > /dev/tty1" | |
} | |
function restore_screen { | |
# restore flashing cursor | |
sudo su -c "setterm -cursor on > /dev/tty1" | |
} | |
sleep 10 | |
clear_screen | |
while true | |
do | |
FILES=/home/pi/Videos/* | |
for f in $FILES | |
do | |
clear_screen | |
omxplayer -p -o hdmi -d "$f" > /dev/null 2>&1 | |
done | |
sleep 1 | |
done | |
restore_screen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment