Skip to content

Instantly share code, notes, and snippets.

@jps3
Last active August 29, 2015 14:16
Show Gist options
  • Save jps3/946a4b9d7444073a3a22 to your computer and use it in GitHub Desktop.
Save jps3/946a4b9d7444073a3a22 to your computer and use it in GitHub Desktop.
Raspberry Pi: 'tv off' and 'tv on' function
function tv () {
if (which tvservice fbset xrefresh 2>/dev/null); then
case "${1}" in
off|OFF|Off|0)
tvservice -o
;;
on|ON|On|1)
tvservice -p
fbset -depth 8
fbset -depth 16
DISPLAY="${DISPLAY:-:0}" xrefresh
;;
*) echo "(no comprende: $1)" 1>&2;;
esac
else
return 1
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment