Last active
January 10, 2025 16:18
Revisions
-
AGWA renamed this gist
Jul 13, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
AGWA renamed this gist
Jul 13, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
AGWA renamed this gist
Jul 13, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
AGWA created this gist
Mar 30, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ #!/bin/sh # Enable and disable HDMI output on the Raspberry Pi is_off () { tvservice -s | grep "TV is off" >/dev/null } case $1 in off) tvservice -o ;; on) if is_off then tvservice -p curr_vt=`fgconsole` if [ "$curr_vt" = "1" ] then chvt 2 chvt 1 else chvt 1 chvt "$curr_vt" fi fi ;; status) if is_off then echo off else echo on fi ;; *) echo "Usage: $0 on|off|status" >&2 exit 2 ;; esac exit 0