I figure out how to proper pull haha sorry for the confusion The darker mode, when the illuminance is less than 1 i.e. 0, it will go to the target brightness that is 1. The target can be easily changed. If the file AB.offset have 0 as value. Darker mode is activated and setting brightness will reset to target value 1 when illuminance is less than 1. if the file has value of 1, it will be the normal mode and the screen brightness can be adjusted until the illuminance sensor changes. easier to change variables and places and chmod 666 /tmp/AB.offset for the user to change modes when script is running as root (systemd service) darker mode as default with normal mode done by typing "echo 1 > /tmp/AB.offset" they are in autobrightness.sh
25 lines
457 B
Desktop File
25 lines
457 B
Desktop File
[Unit]
|
|
|
|
Description=roda autobrightness com 1% de processamento
|
|
After=multi-user.target
|
|
After=graphical.target
|
|
After=basic.target
|
|
After=sysinit.target
|
|
After=system.slice
|
|
After=systemd-journald.socket
|
|
After=initrd-switch-root.service
|
|
After=iio-sensor-proxy.service
|
|
|
|
|
|
|
|
[Service]
|
|
ExecStartPre=/bin/bash -c "sleep 5"
|
|
ExecStart=/bin/bash -c "exec /etc/luztecla/autobrightness.sh"
|
|
|
|
|
|
Restart=always
|
|
|
|
[Install]
|
|
|
|
WantedBy=graphical.target
|
|
WantedBy=multi-user.target
|