Blue light can suppress the production of melatonin, the sleep hormone. Red Moon filters out blue light and dims your screen below the normal minimum, so you can use your phone comfortably at night. It is simple and flexible:
- Set the timer to automatically turn on at night, or at custom times.
- Use the default filters, or fine-tune your own with separate color, intensity and dim levels.
- The notification, tile (Android 7.0+), and widget let you start, stop, and switch filters without opening the app.
All help is equally welcome!
Weblate is the simplest way for most people to translate. It's entirely in your browser, and your changes will be automatically merged. If you'd prefer to make a pull request, please keep code and translations in separate PRs.
Most strings will only be used in one place.
This way, if you want to tweak the phrasing in one particular place, you don't need to worry about accidentally changing another place in the app.
PRs for issues tagged with
patches welcome are welcome at any time.
Otherwise, please open a new issue or comment on the existing one first. We don't
want to waste your time on something we might not merge! We have some loose coding
style guidelines below.
To build the app on GNU+Linux, clone the repository and run
in the root directory.
To install the app on a connected device or running emulator, run
./gradlew installFdroidDebug or
Prioritize legibility over dogmatism. That said, consistency is nice, so here's a short list of what I've been doing.
- 100 characters per line; 80 if you can.
- Indent 4 spaces normally; 8 spaces if a variable assignment needs to wrap.
- Constants use
ALL_CAPS, persistent vars use
mCamelCase, everything else uses
- Form suggests function: Group and align similar actions, and don't do that for dissimmilar ones, even if you could.
- Good comments explain why something is done; if you find yourself describing what the code does, consider:
- Refactoring into smaller functions with descriptive names
- Converting comments to logs. Code that requires comments probably also requires good logs to debug.
- Always use brackets with
if, with one exception: one-liners with an
x = if (p) q else r)
- note: I (@smichel17) used to prefer omitting parenthesis from one-liners; some code still uses that style.
Again, prioritize legibility over dogmatism.
"Red Moon" is a derivative of "Shades" by Chris Nguyen used under the MIT License. "Red Moon" is licensed under the GNU General Public License version 3, or (at your option) any later version by the contributors.
All used artwork is released into the public domain. Some of the icons use cliparts from openclipart.org, which are all released in the public domain, namely:
* Google Play and the Google Play logo are trademarks of Google Inc.