Go to file
smichel17 69469ac9be Merge pull request #167 from joonatoona/cpp-listener
Add root listener source
2017-08-23 22:09:51 -04:00
app Add very crude proof of concept for root mode 2017-06-16 19:59:49 +02:00
art rewrite readme.md 2017-03-11 23:02:50 -05:00
gradle/wrapper upgrade to gradle 2.3 2017-04-02 04:41:42 -04:00
root-listener Fix spelling 2017-08-23 17:43:37 -07:00
.gitignore Remove app/build.gradle from .gitignore 2017-03-25 13:16:47 +01:00
.travis.yml Add travis config 2017-02-27 10:16:47 -06:00
COPYING Add detailed license information 2016-04-03 12:53:40 +02:00
COPYING.GPL Add detailed license information 2016-04-03 12:53:40 +02:00
COPYING.MIT Add detailed license information 2016-04-03 12:53:40 +02:00
README.md Remove intro screens from README 2017-04-02 13:31:47 -04:00
build.gradle upgrade to gradle 2.3 2017-04-02 04:41:42 -04:00
gradle.properties Created empty project. 2015-06-19 11:15:21 -06:00
gradlew Rebrand from "Shades" to "Red moon" 2016-03-14 21:51:55 +01:00
gradlew.bat Created empty project. 2015-06-19 11:15:21 -06:00
settings.gradle Created empty project. 2015-06-19 11:15:21 -06:00

README.md

Red Moon Translation status

Red Moon is a simple screen filter app for night time phone use. It helps you sleep healthier by filtering out blue light, which can disrupt your sleep cycle (circadian rhythm). And when your phone's lowest brightness isn't low enough, Red Moon protects your eyes by making your screen even darker.

Get it on F-Droid Download from Google Play Direct download

Features

  • Use the default filters or create your own, with separate color, intensity and dim settings.
  • Automatically turn Red Moon on while the sun is down, or set custom times.
  • Switch between filters right in the notification, without leaving the app you're using.
  • Turn Red Moon on and off without opening the app using:
    • A widget or a shortcut on your home screen.
    • A quick settings tile, like WiFi or Airplane mode (Android 7.0+).
    • The notification (if Red Moon is on, or was recently on).

Screenshots



All help is welcome! Code is great and saves us work, but sometimes a comment that clarifies a design issue or a link to the relevant part of some documentation is just as helpful (and often more efficient, since you don't need to familiarize yourself with Red Moon's code base).

Bugs, feedback, and ideas

Issues are tagged with feedback wanted, needs design, can't replicate, or needs information (this one's usually technical) based on what needs to be done next. There are also tags about priorities:
Translation status

  • planned: The most important issues.
  • help wanted: These would be planned, but there's a question or problem that we're stuck on. We'd love help getting un-stuck!
  • someday/maybe: Worth adding, but not that important.

Translations

Weblate is the easiest way for most people. You can work in your browser instead of crawling through text files, and your translations will be automatically be merged into this repository. If you'd prefer to make a pull request, that's fine too, but if you're also changing code, please keep that in a separate PR.

Trust your judgement! If there is a loose translation that you think is simpler and clearer than the literal translation, go for it. We'll try not to use strings in multiple places, even if the English word could be reused.

Pull requests

Bugfixes are very safe PRs (likely to be merged), and a good way to learn the code base, but often not as exciting as adding something new. Issues tagged patches welcome are also safe, since they have the design worked out. If you have something else in mind, open a new issue about it first, especially if it requires increasing Red Moon's complexity (ie, adding options).

Coding Style

Prioritize legibility over dogmatism. That said, consistency is nice, so here's a short list of what I've been doing.

  • Try very hard to stay under 100 characters per line. Try less hard to stay under 80.
  • Indent 4 spaces, (exception: 8 spaces for the second line of variable assignments that have to wrap)
  • constants are ALL_CAPS, functions, vals, and short-lived vars are camelCase, persistent vars are mCamelCase.
  • Form suggests function: Group and align similar actions, and don't do that for dissimmilar ones, even if you could.
  • Good code is (mostly) self-documenting. If you're commenting frequently, consider:
    • Refactoring into smaller functions with descriptive names
    • Converting comments to logs. Code confusing enough to require comments will probably require good logs to debug, and debug output that includes variable contents forces you to keep it up to date.
  • Always use brackets with if, with one exception: one-liners with an else branch (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.



Building

To build the app on GNU+Linux, clone the repository and run

./gradlew build

in the root directory.

Use

./gradlew installDebug

to install the app on a connected device or running emulator.

License

"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.

GNU GPLv3 Image

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:

Footnotes

* Google Play and the Google Play logo are trademarks of Google Inc.