Skip to content

Instantly share code, notes, and snippets.

@leeky
Last active February 1, 2019 13:27
Show Gist options
  • Save leeky/b73d8423b6239ea9b08fd6dd2222dab7 to your computer and use it in GitHub Desktop.
Save leeky/b73d8423b6239ea9b08fd6dd2222dab7 to your computer and use it in GitHub Desktop.
Raspberry Pi - HDMI Control + Display Refresh
# Install by running `crontab -e` as pi user NOT root
44 09 * * 1-5 /usr/bin/tvservice -o
45 09 * * 1-5 /usr/local/bin/tv-on.sh
00 13 * * 1-5 /usr/local/bin/refresh.sh
00 14 * * 1-5 /usr/local/bin/refresh.sh
05 18 * * 1-5 /usr/bin/tvservice -o
#!/bin/bash
export DISPLAY=:0
WID=$(xdotool search --onlyvisible --class chromium|head -1)
xdotool windowactivate ${WID}
xdotool key ctrl+F5
#!/bin/bash
/usr/bin/tvservice -o
sleep 1
/usr/bin/tvservice -p
fbset -depth 8
fbset -depth 16
xrefresh -d :0.0
export DISPLAY=:0
WID=$(xdotool search --onlyvisible --class chromium|head -1)
xdotool windowactivate ${WID}
xdotool key ctrl+F5
#!/bin/bash
/usr/bin/tvservice -o
sleep 1
/usr/bin/tvservice -p
fbset -depth 8
fbset -g 1920 1080 1920 1080 32
# fbset -depth 16
xrefresh -d :0.0
export DISPLAY=:0
WID=$(xdotool search --onlyvisible --class chromium|head -1)
xdotool windowactivate ${WID}
xdotool key ctrl+F5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment