-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27cd9c1
commit 08e8a2a
Showing
5 changed files
with
77 additions
and
5 deletions.
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 characters
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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Kiosk CEC | ||
Requires=dev-cec0.device | ||
After=dev-cec0.device | ||
|
||
[Service] | ||
User=pi | ||
Group=pi | ||
ExecStart=/home/pi/cec.sh | ||
|
||
[Install] | ||
WantedBy=default.target |
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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
|
||
export DISPLAY=:0 | ||
|
||
echo as | cec-client | while IFS= read -r line | ||
do | ||
case "$line" in | ||
*"key pressed: left"*"current"*) | ||
echo Left | ||
xdotool key Left | ||
;; | ||
|
||
*"key pressed: right"*"current"*) | ||
echo Right | ||
xdotool key Right | ||
;; | ||
|
||
*"key pressed: select"*"current"*) | ||
echo Select | ||
xdotool key space | ||
;; | ||
|
||
*"key pressed: play"*"current"*) | ||
echo Play | ||
xdotool key P | ||
;; | ||
|
||
*"key pressed: pause"*"current"*) | ||
echo Pause | ||
xdotool key S | ||
;; | ||
esac | ||
done |
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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Chromium Kiosk | ||
Requires=network-online.target | ||
After=network-online.target | ||
After=systemd-user-sessions.service plymouth-quit-wait.service | ||
|
||
[Service] | ||
ExecStart=/usr/bin/xinit /home/pi/kiosk.sh | ||
|
||
[Install] | ||
WantedBy=default.target |
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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
# disable DPMS and prevent screen from blanking | ||
/usr/bin/xset s off -dpms | ||
|
||
# hide cursor after 1s | ||
/usr/bin/unclutter -idle 1 -root & | ||
|
||
# start chromium as 'pi' user | ||
/usr/bin/sudo -H -u pi -- /usr/bin/chromium-browser \ | ||
--kiosk \ | ||
--start-fullscreen \ | ||
--start-maximized \ | ||
--window-size=1920,1080 \ | ||
htts://ambience.local |