Closed chisht closed 5 years ago
About the new command-line to specify commands to switch to day or night mode.
Options, -g "command to run to switch to night mode" -y "command to run to switch to day mode" old option "-c" that sets the command to use for both day and night mode.
You can also get the similar help by running 'autonight -h"
Default -c value is /system/sdcard/scripts/nightmode.sh
Logic Logic to change day or night mode is,
if switching to night mode
if -g is used then,
execute command set in -g
else
execute command set in -c on
if switching to day mode
if -y is used then,
execute command set in -y
else
execute command set in -c off
Examples:
Grey scale only mode for night switch and default for day switch,
-g 'setconf -k n -v 1'
Only enable LR LED in night mode and disable it in day mode
-g 'echo "0" > "/sys/class/gpio/gpio49/value"' -y 'echo "1" > "/sys/class/gpio/gpio49/value"'
How to use:
Add required command-line to /system/sdcard/config/autonight.conf
Warning: UI setting page for configure sw night mode is not aware of any of these options. If settings are saved from that UI, it will overwrite these options
Thanks for taking the time to clean this up
Moving to proper repo Cleaning up dead code Adding command-line options to specify commands to switch to day or night mode