Skip to content

Commit 91fa495

Browse files
committed
Added readme and other docs
1 parent ee32271 commit 91fa495

File tree

12 files changed

+236
-4
lines changed

12 files changed

+236
-4
lines changed

.github/workflows/lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818
with:
1919
distribution: temurin
2020
java-version: 21
21+
cache: 'gradle'
22+
cache-dependency-path: |
23+
gradlew
24+
settings.gradle.kts
25+
build.gradle.kts
26+
app/build.gradle.kts
2127
- name: Run Detekt on the detekt rules
2228
uses: gradle/gradle-build-action@v3
2329
with:

.idea/deploymentTargetSelector.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2025 Harold "Roldy" (Martin) Martin
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# GoL Screensaver
2+
3+
[![CodeFactor](https://www.codefactor.io/repository/github/hbmartin/onyx-boox-screensaver-gol/badge)](https://www.codefactor.io/repository/github/hbmartin/onyx-boox-screensaver-gol)
4+
[![Lint](https://github.com/hbmartin/onyx-boox-screensaver-gol/actions/workflows/lint.yml/badge.svg)](https://github.com/hbmartin/onyx-boox-screensaver-gol/actions/workflows/lint.yml)
5+
6+
GoL Screensaver is an app that generates and updates screensavers for Onyx Boox using [Conway's Game of Life Algorithm](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life). Optimized for e-ink screens!
7+
8+
## Screenshot
9+
<img src="media/screenshot.png" width="300" />
10+
11+
## 🎨 Features
12+
- Auto-updating screensaver based on Conway's Game of Life
13+
- Note that wallpaper will not update while the screen is locked, only on the next unlock -> lock.
14+
15+
- Customizable foreground and background colors
16+
- Pattern picker for common Game of Life starting states
17+
18+
## 🏄 Usage
19+
1. **Install the app** on your Android device using F-Droid.
20+
2. **Disable freezing in order to for the game to update**
21+
1. Settings > Apps & Notifications > Freeze Settings > GoL Wallpaper (OFF)
22+
2. Note: Updates happen at most every 15 minutes and **only** with sufficient battery
23+
24+
3. **Launch the app**:
25+
- (Optional) Choose foreground and background colors in the app
26+
- (Optional) Pick a starting pattern
27+
- (Optional) Tap "Generate Next Step" to advance the Game of Life and update your wallpaper
28+
29+
## 🤝 Contributing
30+
31+
[Pull requests](https://github.com/hbmartin/onyx-boox-screensaver-gol/pulls) and [feature requests / bug reports](https://github.com/hbmartin/onyx-boox-screensaver-gol/issues) are welcome!
32+
33+
This project uses Kotlin and Jetpack Compose with **no** 3rd party dependencies and is checked by [detekt](https://detekt.dev/) with [hbmartin's rules](https://github.com/hbmartin/hbmartin-detekt-rules).
34+
35+
1. Fork the repository and `git clone`
36+
2. Create a new branch `git checkout -b cool-feature-name`
37+
3. Open in Android Studio, sync Gradle, and start hacking!
38+
4. Ensure checks are passing by running `./gradlew detektMain`
39+
5. Commit your changes `git commit -am 'Description of what changed'`
40+
6. Push to the branch `git push origin head`
41+
7. Create a new [Pull Request](https://github.com/hbmartin/onyx-boox-screensaver-gol/pulls)
42+
43+
### Project Structure
44+
- `app/src/main/java/me/haroldmartin/golwallpaper/` – Main source code
45+
- `domain/` – Game of Life logic and patterns
46+
- `ui/` – Jetpack Compose UI components
47+
- `utils/` – Utility functions (saving wallpaper, color picking, etc.)
48+
49+
## ✍️ Authors
50+
51+
* [Harold Martin](https://www.linkedin.com/in/harold-martin-98526971/) - harold.martin at gmail dot com
52+
* Triangle disclosure icon from [Compose Icons / Lucide](https://composeicons.com/icons/lucide/triangle)
53+
* Inspiration from [WanderWall by fmeyer](https://github.com/fmeyer/WanderWall)
54+
55+
## ⚖️ License
56+
[MIT License](LICENSE.txt) with addendum: it's legally required for you to do at least one of have fun with this or report an issue explaining why not, no takesies backsies.

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ dependencies {
6666
debugImplementation(libs.androidx.ui.test.manifest)
6767

6868
detektPlugins(rootProject.libs.detekt.formatting)
69-
detektPlugins("me.haroldmartin:hbmartin-detekt-rules:0.1.6")
69+
detektPlugins(rootProject.libs.detekt.hbmartin)
7070
}
7171

7272
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {

app/src/main/java/me/haroldmartin/golwallpaper/MainScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fun MainScreen(viewModel: MainViewModel = viewModel()) {
3434
) {
3535
Text(
3636
"NOTE! You must disable freezing in order to for the game to update:\n" +
37-
"Settings > Apps & Notifications > Freeze Settings > GoL Wallpaper (OFF)",
37+
"Settings > Apps & Notifications > Freeze Settings > GoL Screensaver (OFF)",
3838
)
3939
ColorPicker("Foreground Color", uiState.fgColor) { color ->
4040
viewModel.setFgColor(context, color)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">GoL Wallpaper</string>
2+
<string name="app_name">GoL Screensaver</string>
33
</resources>

build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@ plugins {
44
alias(libs.plugins.kotlin.android) apply false
55
alias(libs.plugins.kotlin.compose) apply false
66
alias(libs.plugins.detekt) apply false
7+
alias(libs.plugins.updatesCheck)
8+
}
9+
10+
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
11+
checkForGradleUpdate = true
12+
rejectVersionIf {
13+
listOf("-RC", "-Beta", "-alpha", "-rc", "-beta", "-dev").any { word ->
14+
candidate.version.contains(word)
15+
}
16+
}
717
}

code_of_conduct.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official email address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement by emailing:
63+
harold.martin at gmail dot com
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[Mozilla CoC]: https://github.com/mozilla/diversity
131+
[FAQ]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations
133+

gradle/libs.versions.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ onyxsdkDevice = "1.2.32"
1212
datastore = "1.1.6"
1313
detekt = "1.23.8"
1414
androidxWork = "2.10.1"
15+
updatesCheck = "0.52.0"
16+
hbmartinRules = "0.1.7"
1517

1618
[libraries]
1719
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -33,9 +35,12 @@ androidx-material3 = { group = "androidx.compose.material3", name = "material3"
3335
androidx-work-runtime = { group = "androidx.work", name = "work-runtime-ktx", version.ref = "androidxWork" }
3436
onyxsdkDevice = { group = "com.onyx.android.sdk", name = "onyxsdk-device", version.ref = "onyxsdkDevice" }
3537
detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" }
38+
detekt-hbmartin = { group = "me.haroldmartin", name = "hbmartin-detekt-rules", version.ref = "hbmartinRules" }
3639

3740
[plugins]
3841
android-application = { id = "com.android.application", version.ref = "agp" }
3942
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
4043
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
4144
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
45+
updatesCheck = { id = "com.github.ben-manes.versions", version.ref = "updatesCheck" }
46+

0 commit comments

Comments
 (0)