Skip to content

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

launcher: app_glow, the focus highlight in the focused app's colour on every tile (opt-in)

Cristian Rojasb3c1d3d1afa5
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 b55b5a100..e55397a69 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java
@@ -126,6 +126,8 @@ final class Config {
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;
+ /** The focus highlight in the focused app's colour on every tile (config.xml, app_glow), as cinematic_home does for the dock. */
+ final boolean appGlow;
/** Minutes Home may sit untouched before the clock screensaver (config.xml, home_idle_clock_minutes); 0 is off. */
final int homeIdleClockMinutes;
@@ -138,7 +140,7 @@ final class Config {
int[] settingsKeycodes, boolean settingsKeyPanel, boolean wallpaperEnabled, File wallpaper, List<File> wallpapers,
int wallpaperRotationMinutes, int wallpaperDim, String wallpaperOrder, boolean overlayApplied,
Festival festival, int[] inputKeycodes, List<String> appKeys,
- List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, int homeIdleClockMinutes) {
+ List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, boolean appGlow, int homeIdleClockMinutes) {
this.inputKeycodes = inputKeycodes;
this.appKeys = Collections.unmodifiableList(appKeys);
this.dockApps = Collections.unmodifiableList(dockApps);
@@ -188,6 +190,7 @@ final class Config {
this.raceCalendar = Collections.unmodifiableList(raceCalendar);
this.cinematicHome = cinematicHome;
this.ambientGlow = ambientGlow;
+ this.appGlow = appGlow;
this.homeIdleClockMinutes = homeIdleClockMinutes;
}
@@ -238,6 +241,7 @@ final class Config {
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 appGlow = res.getBoolean(R.bool.app_glow);
int idleClockMinutes = res.getInteger(R.integer.home_idle_clock_minutes);
boolean applied = false;
@@ -287,6 +291,7 @@ final class Config {
appKeys = stringList(json, "app_keys", appKeys);
cinematic = bool(json, "cinematic_home", cinematic);
ambientGlow = bool(json, "ambient_glow", ambientGlow);
+ appGlow = bool(json, "app_glow", appGlow);
idleClockMinutes = integer(json, "home_idle_clock_minutes", idleClockMinutes, 0, 1440);
}
// A theme push or reset invalidates choices made on the TV. On first use, remember the
@@ -346,7 +351,7 @@ final class Config {
shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, showNetworkPill, iconOnlyButtons, libraryButton, wifiLabelWidth, alwaysShowNames, wallpaperTrueColor, vpn, homeSettings, showStats, library, background,
Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, wallpaperEnabled, wallpaper,
wallpapers, rotationMinutes, wallpaperDim, wallpaperOrder, applied,
- festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow,
+ festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow, appGlow,
Math.max(0, idleClockMinutes));
}
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 e89977e15..404a9dcc1 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -128,6 +128,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
/** config.xml ambient_glow, overridable by a theme. Off: the glow view is gone and no fade or colour animator
* is started for it, so a focus move costs nothing extra on a launcher that runs all day. */
private boolean ambientGlow;
+ /** config.xml app_glow: the highlight takes the focused app's colour on every tile. */
+ private boolean appGlow;
private ImageView heroArt;
private static final float HERO_ART_ALPHA = 0.5f;
/** Softened artwork per app (HeroArt, about 5 KB each), made the first time its dock tile is focused. */
@@ -337,6 +339,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
// a fade renders it into a full-screen offscreen buffer first.
ambient.forceHasOverlappingRendering(false);
ambientGlow = cfg.ambientGlow;
+ appGlow = cfg.appGlow;
if (!ambientGlow) ambient.setVisibility(View.GONE);
heroName = findViewById(R.id.heroName);
hero = findViewById(R.id.hero);
@@ -1201,9 +1204,10 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
glassCardW = card.getWidth();
glassTargetX = x;
glassTargetY = y;
- // Cinematic shelf: the highlight glows in the dock app's colour, plain white in the grid.
- int accent = cinematic && !festive && position < COLUMNS ? adapter.ambientColorAt(position) : 0;
- if (cinematic && !festive && accent != glassAccent) {
+ // Cinematic shelf: the highlight glows in the dock app's colour, plain white in the grid. app_glow: every tile.
+ boolean coloured = (appGlow || cinematic && position < COLUMNS) && !festive;
+ int accent = coloured ? adapter.ambientColorAt(position) : 0;
+ if ((cinematic || appGlow) && !festive && accent != glassAccent) {
glassAccent = accent;
glass.setAccent(accent);
}
diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xml
index 4ca1b963c..baa38bcc4 100644
--- a/launcher/app/src/main/res/values/config.xml
+++ b/launcher/app/src/main/res/values/config.xml
@@ -191,6 +191,9 @@
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>
+ <!-- The focus highlight glows in the focused app's colour on every tile, as the cinematic shelf does for the
+ dock, without cinematic_home. Can also be set with "app_glow": true in a theme's config.json. -->
+ <bool name="app_glow">false</bool>
<!-- Minutes Home may sit untouched before it shows the clock screensaver (ClockActivity); 0 turns it off.
Unlike the system screensaver this never starts over live TV or an app, which matters on TVs whose
Live TV window does not keep the screen on (CVTE): there the system screensaver would start in the
diff --git a/themes/README.md b/themes/README.md
index e9ae32cfe..d56b4d07e 100644
--- a/themes/README.md
+++ b/themes/README.md
@@ -75,6 +75,7 @@ is ignored, and a file that doesn't parse is ignored as a whole, so a theme can
| `home_idle_clock_minutes` | 0 to 1440 | Minutes Home may sit untouched before it shows the clock screensaver (a thin clock and date drifting over a slow glow, as the system "Clock" screensaver does). Any key returns to Home. It starts only from Home, never over Live TV or an app; 0 is off (default) |
| `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 |
+| `app_glow` | bool | The focus highlight glows in the focused app's colour on every tile, as `cinematic_home` does for the dock (`false` by default) |
## Wallpapers