Last active
May 21, 2016 01:21
-
-
Save AlexMoffat/77e8b137cf63a17e7951d024ee09a789 to your computer and use it in GitHub Desktop.
raspberry pi turn off hdmi connected display. Easier that the inverse. Only turn the display off if tvservice does not report it's already off.
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 | |
set -o pipefail | |
tvservice -s | grep -q '\[TV is off\]' | |
if [[ $? -eq 1 ]]; then | |
/usr/bin/tvservice -o &> /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment