Mac-like-automatic-brightness/autobright.service
Theluga a1107f5433
less cpu usage and set 1 as the final value
if sensor is less than 3, sets to 1.
if xfce brightness bug puts actual_brightness to 0, it will goes to 1 with less than 3 in anbient or more with greater than 3 anbient..

add service in :"/etc/systemd/system/" to auto start and auto restart if broken in e.g. suspend. Works even in the greeter.
2023-12-16 04:23:01 +00:00

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