Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.
Python adbadblockandroid-tvandroid-tv-launcherapple-tvbloatware-removalclaude-codedebloatfire-tvgoogle-tvlauncherprivacysmart-tvsony-braviatclvibe-codingxiaomi
Launcher: back_opens_clock, so Back on Home opens the clock screensaver
Tom Whitwellc63d36a17fef
diff --git a/docs/switches.md b/docs/switches.mdindex 3a351b30b..1a934fd14 100644--- a/docs/switches.md+++ b/docs/switches.md@@ -31,6 +31,7 @@ fits the rules; keys from before the rule sit on its wanted list until a screens| `festival` | <img src="../themes/dussehra/screenshot.jpg" width="320" alt="festival on a TV"> || `settings_key_panel` | <img src="quick-settings-panel.jpg" width="320" alt="settings_key_panel on a TV"> || `home_idle_clock_minutes` | <img src="clock-screensaver.png" width="320" alt="home_idle_clock_minutes on a TV"> |+| `back_opens_clock` | <img src="switches/back_opens_clock.jpg" width="320" alt="back_opens_clock on a TV"> || `gamepad_passthrough` | <img src="switches/gamepad_passthrough.jpg" width="320" alt="gamepad_passthrough on a TV"> || `consume_volume_keys` | <img src="switches/consume_volume_keys.jpg" width="320" alt="consume_volume_keys on a TV"> || `wifi_status_warnings` | <img src="switches/wifi_status_warnings.jpg" width="320" alt="wifi_status_warnings on a TV"> |diff --git a/docs/switches/back_opens_clock.jpg b/docs/switches/back_opens_clock.jpgnew file mode 100644index 000000000..29c375e01Binary files /dev/null and b/docs/switches/back_opens_clock.jpg differdiff --git a/launcher/app/src/main/java/com/gathin/tvhome/Config.java b/launcher/app/src/main/java/com/gathin/tvhome/Config.javaindex 8f923fceb..a689a035d 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java@@ -131,6 +131,8 @@ final class Config {final boolean iconOnlyInputs;/** With vpn_pill, the VPN pill as a round lock button (config.xml / theme icon_only_vpn). */final boolean iconOnlyVpn;+ /** Back on the Home screen opens the clock screensaver instead of doing nothing (config.xml / theme back_opens_clock). */+ final boolean backOpensClock;/** App library as a round button in the top bar (config.xml library_button); needs app_library. */final boolean libraryButton;/** The App library pill after the last Home row; false hides it while libraryButton is on (show_library_pill). */@@ -281,7 +283,7 @@ final class Config {boolean keyFilter, boolean dockGlass, String glowStyle, boolean wallpaperCaptions,boolean handleViewInputs, boolean tileMenu, boolean dockEvenPadding, boolean dockBand, boolean cinematicDots, boolean cinematicWhiteFocus, boolean wifiStatusColor, int cinematicScrim, int cinematicArt,Map<String, Set<String>> wallpaperMoods, boolean gamepadPassthrough, boolean consumeVolumeKeys, boolean powerOnHome, boolean homeLongPressHome, boolean wifiStatusWarnings, List<String> topBarApps, boolean showGreeting, boolean headerWhite, boolean clockWallpaper, int clockWallpaperDim, boolean clockGlow, String glassStyle, boolean singleRow, boolean dockBandAll, boolean lunarDate, int lunarUtcOffset, boolean dateBelowClock, boolean vpnPill, String locale, boolean powerOnHomeAlways, boolean inputsConnectedOnly,- int openOnStartNetworkWait, boolean iconOnlyVpn) {+ int openOnStartNetworkWait, boolean iconOnlyVpn, boolean backOpensClock) {this.handleViewInputs = handleViewInputs;this.tileMenu = tileMenu;this.inputKeycodes = inputKeycodes;@@ -331,6 +333,7 @@ final class Config {this.iconOnlyButtons = iconOnlyButtons;this.iconOnlyInputs = iconOnlyInputs;this.iconOnlyVpn = iconOnlyVpn;+ this.backOpensClock = backOpensClock;this.libraryButton = libraryButton;this.showLibraryPill = showLibraryPill;this.wifiLabelWidth = wifiLabelWidth;@@ -456,6 +459,7 @@ final class Config {boolean iconOnlyButtons = res.getBoolean(R.bool.icon_only_buttons);boolean iconOnlyInputs = res.getBoolean(R.bool.icon_only_inputs);boolean iconOnlyVpn = res.getBoolean(R.bool.icon_only_vpn);+ boolean backOpensClock = res.getBoolean(R.bool.back_opens_clock);boolean libraryButton = res.getBoolean(R.bool.library_button);boolean showLibraryPill = res.getBoolean(R.bool.show_library_pill);int wifiLabelWidth = res.getInteger(R.integer.wifi_label_width);@@ -565,6 +569,7 @@ final class Config {iconOnlyButtons = bool(json, "icon_only_buttons", iconOnlyButtons);iconOnlyInputs = bool(json, "icon_only_inputs", iconOnlyInputs);iconOnlyVpn = bool(json, "icon_only_vpn", iconOnlyVpn);+ backOpensClock = bool(json, "back_opens_clock", backOpensClock);libraryButton = bool(json, "library_button", libraryButton);showLibraryPill = bool(json, "show_library_pill", showLibraryPill);wifiLabelWidth = integer(json, "wifi_label_width", wifiLabelWidth, 0, 300);@@ -687,7 +692,7 @@ final class Config {consumeVolumeKeys, powerOnHome, homeLongPressHome, wifiStatusWarnings, topBarApps, showGreeting, headerWhite, clockWallpaper,Math.max(0, Math.min(90, clockWallpaperDim)), clockGlow, glassStyle, singleRow && dockRow, dockBandAll, lunar, lunarOffset,dateBelowClock, vpnPill, locale, powerOnHomeAlways, inputsConnectedOnly,- Math.max(0, Math.min(600, openOnStartNetworkWait)), iconOnlyVpn);+ Math.max(0, Math.min(600, openOnStartNetworkWait)), iconOnlyVpn, backOpensClock);}/**diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex fd97c5427..3ca221f19 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@ -121,6 +121,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {private long settingsRevision;/** Idle time on Home before ClockActivity; 0 is off (config.xml, home_idle_clock_minutes). */private long idleClockMs;+ /** Back on Home opens ClockActivity (config.xml, back_opens_clock). */+ private boolean backOpensClock;private final Runnable showIdleClock = () -> startActivity(new Intent(this, ClockActivity.class));private String liveTvAction;private String liveTvInputId;@@ -450,6 +452,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {festive = festival.active(LocalDate.now());liveTvPkg = cfg.liveTvPackage;idleClockMs = cfg.homeIdleClockMinutes * MINUTE_MS;+ backOpensClock = cfg.backOpensClock;bootToLiveTv = cfg.bootToLiveTv;openOnStartChoice = cfg.openOnStartChoice;openOnStartWaitMs = cfg.openOnStartNetworkWait * 1000L;@@ -1663,7 +1666,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {@Overridepublic void onBackPressed() {- // Home screen: Back goes nowhere.+ // Home screen: Back goes nowhere, unless back_opens_clock is on.+ if (backOpensClock) startActivity(new Intent(this, ClockActivity.class));}// ---- glass highlight -------------------------------------------------------------------------diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xmlindex 14e30b9d8..92bf13d97 100644--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@ -491,6 +491,10 @@Live TV window does not keep the screen on (CVTE): there the system screensaver would start in themiddle of a programme. Can also be set with "home_idle_clock_minutes": 10 in a theme's config.json. --><integer name="home_idle_clock_minutes">0</integer>+ <!-- Back on the Home screen opens the clock screensaver (ClockActivity, the same screen as+ home_idle_clock_minutes). Back keeps working as usual inside apps and Settings; only Home's own Back+ press changes. Off by default (Back does nothing on Home); a theme can set "back_opens_clock": true. -->+ <bool name="back_opens_clock">false</bool><!-- The clock screensaver (Home idle clock and the system screensaver) over Home's wallpaper instead of black witha coloured glow. The clock still moves every minute. Can also be set with "clock_wallpaper" in a theme. --><bool name="clock_wallpaper">false</bool>diff --git a/themes/README.md b/themes/README.mdindex 36667e493..40587e934 100644--- a/themes/README.md+++ b/themes/README.md@@ -137,6 +137,7 @@ A new key needs one there in the same pull request.| `inputs_connected_only` | bool | The Inputs list shows only HDMI ports and CEC devices that report connected; empty ports, the AV jacks and devices asleep in standby fold behind a "More inputs" row that expands them. Some TVs (TCL) report an empty HDMI port as connected-standby, the same state a sleeping device has, so a device in standby is folded too. An HDMI row whose state the TV cannot be trusted with stays (`false` by default) || `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/venv/bin/python -I tools/race_calendar.py <theme folder>`, which fetches the season from the free Jolpica API; the launcher itself never goes online || `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) |+| `back_opens_clock` | bool | Back on the Home screen opens the clock screensaver (the same screen as `home_idle_clock_minutes`) instead of doing nothing. Back inside apps, Settings and the App library is unchanged; any key leaves the clock for Home. `false` by default || `clock_wallpaper` | bool | The clock screensaver over Home's wallpaper instead of black with a coloured glow; the clock still moves every minute (`false` by default) || `clock_wallpaper_dim` | 0 to 90 | How dark that wallpaper is behind the clock, in percent (50 by default) || `clock_glow` | bool | The clock screensaver's coloured glow (`true` by default); `false` leaves the moving clock on plain black, e.g. for an OLED |