Skip to content

Instantly share code, notes, and snippets.

@jbohren
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save jbohren/b2f45eeb9054dfd5993d to your computer and use it in GitHub Desktop.

Select an option

Save jbohren/b2f45eeb9054dfd5993d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Play videos from a directory in VLC during work hours
while true ; do
timestamp=$(date +"%T")
if [[ "$timestamp" > "09:00:00" && "$timestamp" < "16:00:00" ]]; then
for i in * ; do
vlc -f --play-and-exit "$1"
done
else
xset dpms force suspend
sleep 120
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment