From 972ba5cd934039e85382cc2e27301516c3b5479b Mon Sep 17 00:00:00 2001 From: sudoxnym Date: Mon, 8 Dec 2025 20:15:48 +0100 Subject: [PATCH] simplify readme --- README.md | 111 ++++++++---------------------------------------------- 1 file changed, 16 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index 0eb8419..bff0fd1 100644 --- a/README.md +++ b/README.md @@ -1,109 +1,30 @@ -

- nightd banner -

+# nightd -

nightd

-

- screen dimmer for android tv
- keep your media playing while the screen goes dark -

+screen dimmer for android tv. keeps media playing while the screen goes dark. -

- latest release - license - android 7.0+ -

+## download ---- +[nightd.apk](https://github.com/sudoxnym/nightd/releases/latest) -## what is this? +## install -nightd is a tiny android tv app that blacks out your screen while keeping your media playing. perfect for: +```bash +adb install nightd.apk +``` -- **falling asleep to music/podcasts** - screen goes dark, audio keeps playing -- **saving power on oled displays** - no burn-in, no wasted pixels -- **background audio** - cast audio without lighting up your room - -## modes - -| mode | what it does | -|------|-------------| -| **dim** | single overlay layer (~40% darker) | -| **black** | 5 stacked layers = pitch black (android limits overlay opacity to 80%, so we stack 'em) | - -cycle order: `off → dim → black → off` - -## installation - -1. download the latest [nightd.apk](https://github.com/sudoxnym/nightd/releases/latest) -2. sideload via adb: `adb install nightd.apk` -3. grant "display over other apps" permission when prompted +grant "display over other apps" permission when prompted. ## usage -### with key mapper (recommended) +use [key mapper](https://github.com/keymapperorg/KeyMapper) to bind to a remote button. -use [key mapper](https://github.com/keymapperorg/KeyMapper) to bind nightd to remote buttons: +set up an **activity** intent: +- **action:** `com.sudoxnym.nightd.TOGGLE` +- **package:** `com.sudoxnym.nightd` +- **class:** `com.sudoxnym.nightd.ToggleActivity` -| action | intent | -|--------|--------| -| toggle | `com.sudox.nightd.TOGGLE` | -| dim mode | `com.sudox.nightd.DIM` | -| black mode | `com.sudox.nightd.BLACK` | -| turn off | `com.sudox.nightd.OFF` | - -**package:** `com.sudox.nightd` -**service:** `com.sudox.nightd.NightdService` - -example: bind "zoom in" to toggle, "zoom out" to off. - -### with adb - -```bash -# toggle (cycles through off → dim → black → off) -adb shell am startservice -a com.sudox.nightd.TOGGLE com.sudox.nightd/.NightdService - -# specific modes -adb shell am startservice -a com.sudox.nightd.DIM com.sudox.nightd/.NightdService -adb shell am startservice -a com.sudox.nightd.BLACK com.sudox.nightd/.NightdService -adb shell am startservice -a com.sudox.nightd.OFF com.sudox.nightd/.NightdService -``` - -## how it works - -android limits overlay opacity to 80% per layer. to achieve true black, nightd stacks 5 layers: - -``` -0.8 × 0.8 × 0.8 × 0.8 × 0.8 = 0.032 (96.8% blocked) -``` - -plus it sets screen brightness to 0 for good measure. - -## permissions - -- **SYSTEM_ALERT_WINDOW** - required to draw overlay -- **FOREGROUND_SERVICE** - keeps the overlay running -- **WRITE_SETTINGS** - adjusts screen brightness (optional, gracefully fails) - -## building from source - -```bash -# clone -git clone https://github.com/sudoxnym/nightd.git -cd nightd - -# build (requires android ndk) -./gradlew assembleRelease - -# or use the aapt/d8/apksigner toolchain directly -``` +other actions: `OFF`, `DIM`, `BLACK` ## license -MIT - do whatever you want with it. - ---- - -

- built by sudoxnym for the sleep-deprived -

+MIT