Merge pull request #88 from prauscher/cec-support

Add support for HDMI CEC by providing cec-{on,off}.sh in home-dir
This commit is contained in:
Jarno Rantanen 2021-12-28 19:51:07 +02:00 committed by GitHub
commit f63fa3904c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 1 deletions

View File

@ -142,7 +142,7 @@ ssh "sudo rm /etc/profile.d/sshpwd.sh"
ssh "echo | sudo tee /etc/motd" ssh "echo | sudo tee /etc/motd"
working "Installing packages" working "Installing packages"
ssh "sudo apt-get update && sudo apt-get install -y vim matchbox-window-manager unclutter mailutils nitrogen jq chromium-browser xserver-xorg xinit rpd-plym-splash xdotool" ssh "sudo apt-get update && sudo apt-get install -y vim matchbox-window-manager unclutter mailutils nitrogen jq chromium-browser xserver-xorg xinit rpd-plym-splash xdotool cec-utils"
# We install mailutils just so that you can check "mail" for cronjob output # We install mailutils just so that you can check "mail" for cronjob output
working "Setting home directory default content" working "Setting home directory default content"

3
home/cec-off.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo 'standby 0' | cec-client -s > /dev/null

3
home/cec-on.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo 'on 0' | cec-client -s > /dev/null

View File

@ -14,6 +14,7 @@ DISPLAY=:0.0
0 3 * * * sudo reboot 0 3 * * * sudo reboot
# Example: Turn display on weekdays at 7 AM # Example: Turn display on weekdays at 7 AM
# Note: You may exchange "display-on" / "display-off" with "cec-on" / "cec-off" in order to use HDMI CEC
# 0 7 * * 1-5 ~/display-on.sh # 0 7 * * 1-5 ~/display-on.sh
# Example: Turn display off weekdays at 7 PM (and after the nightly reboot) # Example: Turn display off weekdays at 7 PM (and after the nightly reboot)