Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Launcher: ambient_glow option to turn off the app-coloured glow

Renjith Sasidharanfd4056c47a01
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/Config.java b/launcher/app/src/main/java/com/gathin/tvhome/Config.java
index 8f41173e3..a55dee8ef 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java
@@ -104,6 +104,8 @@ final class Config {
final List<RaceWeekend.Race> raceCalendar;
/** Cinematic top shelf (config.xml, cinematic_home): the focused dock app's artwork behind a larger shelf. */
final boolean cinematicHome;
+ /** The glow in the focused app's colour behind the dock (config.xml, ambient_glow); false keeps the background plain. */
+ final boolean ambientGlow;
private Config(List<String> dockApps, boolean fillDock, List<String> hiddenApps, String liveTvPackage,
String liveTvAction, Map<String, String> launchActions, Map<String, String> appLabels,
@@ -114,7 +116,7 @@ final class Config {
int[] settingsKeycodes, boolean settingsKeyPanel, boolean wallpaperEnabled, File wallpaper, List<File> wallpapers,
int wallpaperRotationMinutes, int wallpaperDim, boolean overlayApplied,
Festival festival, int[] inputKeycodes, List<String> appKeys,
- List<RaceWeekend.Race> raceCalendar, boolean cinematicHome) {
+ List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow) {
this.inputKeycodes = inputKeycodes;
this.appKeys = Collections.unmodifiableList(appKeys);
this.dockApps = Collections.unmodifiableList(dockApps);
@@ -156,6 +158,7 @@ final class Config {
this.festival = festival;
this.raceCalendar = Collections.unmodifiableList(raceCalendar);
this.cinematicHome = cinematicHome;
+ this.ambientGlow = ambientGlow;
}
/** The folder the theme tools push into; null when external storage is unavailable. */
@@ -198,6 +201,7 @@ final class Config {
int[] inputKeycodes = res.getIntArray(R.array.input_key_keycodes);
List<String> appKeys = new ArrayList<>(Arrays.asList(res.getStringArray(R.array.app_keys)));
boolean cinematic = res.getBoolean(R.bool.cinematic_home);
+ boolean ambientGlow = res.getBoolean(R.bool.ambient_glow);
boolean applied = false;
File dir = dir(ctx);
@@ -238,6 +242,7 @@ final class Config {
inputKeycodes = intArray(json, "input_key_keycodes", inputKeycodes);
appKeys = stringList(json, "app_keys", appKeys);
cinematic = bool(json, "cinematic_home", cinematic);
+ ambientGlow = bool(json, "ambient_glow", ambientGlow);
}
// A theme push or reset invalidates choices made on the TV. On first use, remember the
// current theme without clearing choices from an older launcher version.
@@ -291,7 +296,7 @@ final class Config {
shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, vpn, homeSettings, showStats, library, background,
Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, wallpaperEnabled, wallpaper,
wallpapers, rotationMinutes, wallpaperDim, applied,
- festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json), cinematic);
+ festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow);
}
/**
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index 7597e0e60..b11be4c2d 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -319,6 +319,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
// The glow is one bitmap, so its alpha can be applied while drawing it. Otherwise every frame of
// a fade renders it into a full-screen offscreen buffer first.
ambient.forceHasOverlappingRendering(false);
+ // Off by config: the view never draws, and the fades below only change the alpha of a gone view.
+ if (!cfg.ambientGlow) ambient.setVisibility(View.GONE);
heroName = findViewById(R.id.heroName);
hero = findViewById(R.id.hero);
// The hero is now a group (name, and the cinematic lines): without this every fade of the default
diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xml
index 3deebbea4..cde31f577 100644
--- a/launcher/app/src/main/res/values/config.xml
+++ b/launcher/app/src/main/res/values/config.xml
@@ -159,4 +159,9 @@
dots, the focus glow takes the app's colour and the dock band turns translucent. false keeps the plain
shelf. Can also be set with "cinematic_home": true in a theme's config.json. -->
<bool name="cinematic_home">false</bool>
+
+ <!-- The glow behind the dock in the focused app's colour (red for YouTube, blue for Prime Video). false keeps
+ only background_color or the wallpaper behind everything. Can also be set with "ambient_glow": false in a
+ theme's config.json. -->
+ <bool name="ambient_glow">true</bool>
</resources>
diff --git a/themes/README.md b/themes/README.md
index d08c19670..25f88a625 100644
--- a/themes/README.md
+++ b/themes/README.md
@@ -65,6 +65,7 @@ is ignored, and a file that doesn't parse is ignored as a whole, so a theme can
| `app_keys` | list of strings | Remote buttons that open an app, as `"190:com.google.android.youtube.tv"` or `"KEYCODE_BUTTON_3:com.google.android.youtube.tv"`, for `InputKeyService` or `HomeKeyService` |
| `race_calendar` | list of races | F1 race-weekend mode: from 12 hours before a weekend's first session until 4 hours after the race starts, a panel under the clock shows the next session with a countdown (or the live one) and the weekend's session times in the TV's time zone. Write it with `tools/race_calendar.py <theme folder>`, which fetches the season from the free Jolpica API; the launcher itself never goes online |
| `cinematic_home` | bool | Cinematic top shelf: the focused dock app's artwork, softened, fills the top of the screen in its colour, with a larger name, "Last opened" (apps opened from Home), dock position dots, a focus glow in the app's colour and a translucent dock band; off by default |
+| `ambient_glow` | bool | The glow behind the dock in the focused app's colour (`true` by default); `false` keeps only `background_color` or the wallpaper, e.g. for a calm photo background |
## Wallpapers