Within CM7 there is a function to increase the color temperature of the display, which removes blue from the screen. This positively affects your circadian rhythm, improves night-vision, and reduces strain on the eyes. You can read more about it at "Why blue light matters in bipolar disorder treatment" but the topic of this thread is getting the RenderFX night mode in CM7 to be automated.
Currently the night mode is activated by a widget. By executing the command
am startservice -n com.cyanogenmod.cmparts/com.cyanogenmod.cmparts.services.RenderFXService --ei widget_render_effect N
Where N = 1 for night mode and N = 7 to return to normal color.
(Taken from RenderFX via Shell script - CyanogenMod Forum)
With the latest version of Tasker, you can execute shell commands as root. Tied to a certain times, night mode can be turned on and off at the time of your choosing.
Ideally I would like to do away with tasker all together. This is currently the only task I have running, and I think with a well-written script the available memory can be increased by removing the need for tasker to run. My few attempts at getting this to work haven't been successful. I'll continue trying, but if anyone has scripted in android and could lend their expertise, that would be helpful.
Currently the night mode is activated by a widget. By executing the command
am startservice -n com.cyanogenmod.cmparts/com.cyanogenmod.cmparts.services.RenderFXService --ei widget_render_effect N
Where N = 1 for night mode and N = 7 to return to normal color.
(Taken from RenderFX via Shell script - CyanogenMod Forum)
With the latest version of Tasker, you can execute shell commands as root. Tied to a certain times, night mode can be turned on and off at the time of your choosing.
Ideally I would like to do away with tasker all together. This is currently the only task I have running, and I think with a well-written script the available memory can be increased by removing the need for tasker to run. My few attempts at getting this to work haven't been successful. I'll continue trying, but if anyone has scripted in android and could lend their expertise, that would be helpful.