mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-30 03:32:36 +00:00
4c8034f5a6
chore: Standardize all python scripts on #!/usr/bin/python3 chore: Update path for ds-inhibit patch chore(readme): Remove unused package
24 lines
774 B
Bash
Executable File
24 lines
774 B
Bash
Executable File
#!/usr/bin/bash
|
|
ACTION="$1"
|
|
|
|
source /etc/default/cec-control
|
|
|
|
# OVERRIDE WITH DEFAULTS IF NOT SET
|
|
CEC_TVID=${CEC_TVID:-0}
|
|
CEC_WAKE=${CEC_WAKE:-true}
|
|
CEC_SETSOURCE=${CEC_SETSOURCE:-true}
|
|
CEC_ONPOWEROFF_STANDBY=${CEC_ONPOWEROFF_STANDBY:-true}
|
|
CEC_ONSLEEP_STANDBY=${CEC_ONSLEEP_STANDBY:-false}
|
|
|
|
# Run specified actions
|
|
if [ "${ACTION}" = "onboot" ] && [ "$CEC_WAKE" = true ]; then
|
|
echo "on $CEC_TVID" | cec-client -s -d 1
|
|
if [ "CEC_SETSOURCE" = true ]; then
|
|
echo "as" | cec-client -s -d 1
|
|
fi
|
|
elif [ "${ACTION}" = "onpoweroff" ] && [ "$CEC_ONPOWEROFF_STANDBY" = true ]; then
|
|
echo "standby $CEC_TVID" | cec-client -s -d 1
|
|
elif [ "${ACTION}" = "onsleep" ] && [ "$CEC_ONSLEEP_STANDBY" = true ]; then
|
|
echo "standby $CEC_TVID" | cec-client -s -d 1
|
|
fi
|