distribution/packages/sysutils/autostart/sources/common/006-brightness
fewtarius 4b9e65325f
* Update kernel and OS to support AyaNeo Air / Air Pro fan control.
* Bump WIFI drivers.
* Add WIFI module quirk and WIFI not waking from sleep on Air.
* Fix splash screen on rotated displays.
* Move autostart to its own package.
2022-12-19 17:14:32 -05:00

20 lines
526 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
### Variables may need to be device specific here.
BRIGHTNESS=$(get_setting system.brightness)
if [[ ! "${BRIGHTNESS}" =~ [0-9] ]]
then
BRIGHTNESS=${DEVICE_BRIGHTNESS}
fi
# Ensure user doesn't get "locked out" with super low brightness
if [[ "${BRIGHTNESS}" -lt "3" ]]
then
BRIGHTNESS=3
fi
printf "%.0f" $(echo "${BRIGHTNESS}") > /sys/class/backlight/$(brightness device)/brightness