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.
This commit is contained in:
parent
feb40c1845
commit
a1107f5433
2 changed files with 181 additions and 0 deletions
25
autobright.service
Normal file
25
autobright.service
Normal file
|
@ -0,0 +1,25 @@
|
|||
[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
|
Loading…
Add table
Add a link
Reference in a new issue