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: date_below_clock, to put the date under the clock
TheWombRaider4b99dd786085
diff --git a/docs/switches.md b/docs/switches.mdindex 38819542e..aa4d26a32 100644--- a/docs/switches.md+++ b/docs/switches.md@@ -45,3 +45,4 @@ fits the rules; keys from before the rule sit on its wanted list until a screens| `dock_band_all` | <img src="switches/single_row.jpg" width="320" alt="dock_band_all on a TV"> || `uniform_tiles` | <img src="switches/uniform_tiles.jpg" width="320" alt="uniform_tiles on a TV"> || `lunar_date` | <img src="switches/lunar_date.jpg" width="320" alt="lunar_date on a TV"> |+| `date_below_clock` | <img src="switches/date_below_clock.jpg" width="320" alt="date_below_clock on a TV"> |diff --git a/docs/switches/date_below_clock.jpg b/docs/switches/date_below_clock.jpgnew file mode 100644index 000000000..c27bdd10dBinary files /dev/null and b/docs/switches/date_below_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 92f2ff9ab..12a9761ed 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java@@ -88,6 +88,8 @@ final class Config {/** Lunisolar date under the date (config.json lunar_date), computed for lunarUtcOffset hours east of UTC (-1: by locale). */final boolean lunarDate;final int lunarUtcOffset;+ /** The date on its own line under the clock instead of beside it (config.xml, date_below_clock). */+ final boolean dateBelowClock;/** Name after the greeting ("Good morning, Mr. Trịnh"); empty for the greeting alone. */final String greetingName;final boolean moduleCards;@@ -250,7 +252,7 @@ final class Config {List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, boolean appGlow, boolean fadeRows, int homeIdleClockMinutes,boolean keyFilter, boolean dockGlass, String glowStyle, boolean wallpaperCaptions,boolean handleViewInputs, boolean tileMenu, boolean dockEvenPadding, boolean cinematicDots, boolean cinematicWhiteFocus, boolean wifiStatusColor, int cinematicScrim, int cinematicArt,- Map<String, Set<String>> wallpaperMoods, boolean gamepadPassthrough, boolean consumeVolumeKeys, 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) {+ Map<String, Set<String>> wallpaperMoods, boolean gamepadPassthrough, boolean consumeVolumeKeys, 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) {this.handleViewInputs = handleViewInputs;this.tileMenu = tileMenu;this.inputKeycodes = inputKeycodes;@@ -280,6 +282,7 @@ final class Config {this.shamsiDate = shamsiDate;this.lunarDate = lunarDate;this.lunarUtcOffset = lunarUtcOffset;+ this.dateBelowClock = dateBelowClock;this.greetingName = greetingName;this.moduleCards = moduleCards;this.reducedMotion = reducedMotion;@@ -446,6 +449,7 @@ final class Config {Map<String, Set<String>> wallpaperMoods = moods(res.getString(R.string.wallpaper_moods));String glowStyle = res.getString(R.string.glow_style);boolean wifiStatusWarnings = res.getBoolean(R.bool.wifi_status_warnings);+ boolean dateBelowClock = res.getBoolean(R.bool.date_below_clock);List<String> topBarApps = new ArrayList<>(Arrays.asList(res.getStringArray(R.array.top_bar_apps)));boolean showGreeting = res.getBoolean(R.bool.show_greeting);boolean headerWhite = res.getBoolean(R.bool.header_white);@@ -540,6 +544,7 @@ final class Config {JSONObject moods = json.optJSONObject("wallpaper_moods");if (moods != null) wallpaperMoods = moods(moods);wifiStatusWarnings = bool(json, "wifi_status_warnings", wifiStatusWarnings);+ dateBelowClock = bool(json, "date_below_clock", dateBelowClock);topBarApps = stringList(json, "top_bar_apps", topBarApps);showGreeting = bool(json, "show_greeting", showGreeting);headerWhite = bool(json, "header_white", headerWhite);@@ -605,7 +610,7 @@ final class Config {Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, restoreKeyServices, wallpaperEnabled, wallpaper,wallpapers, rotationMinutes, wallpaperDim, dockOpacity, wallpaperOrder, applied,festival, inputKeycodes, appKeys, stockHomeRedirect, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow, appGlow, fadeRows,- Math.max(0, idleClockMinutes), keyFilter, dockGlass, glowStyle, wallpaperCaptions, handleViewInputs, tileMenu, dockEvenPadding, cinematicDots, cinematicWhiteFocus, wifiStatusColor, cinematicScrim, cinematicArt, wallpaperMoods, gamepadPassthrough, consumeVolumeKeys, wifiStatusWarnings, topBarApps, showGreeting, headerWhite, clockWallpaper, Math.max(0, Math.min(90, clockWallpaperDim)), clockGlow, glassStyle, singleRow && dockRow, dockBandAll, lunar, lunarOffset);+ Math.max(0, idleClockMinutes), keyFilter, dockGlass, glowStyle, wallpaperCaptions, handleViewInputs, tileMenu, dockEvenPadding, cinematicDots, cinematicWhiteFocus, wifiStatusColor, cinematicScrim, cinematicArt, wallpaperMoods, gamepadPassthrough, consumeVolumeKeys, wifiStatusWarnings, topBarApps, showGreeting, headerWhite, clockWallpaper, Math.max(0, Math.min(90, clockWallpaperDim)), clockGlow, glassStyle, singleRow && dockRow, dockBandAll, lunar, lunarOffset, dateBelowClock);}/**diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex d992768a0..bf2d4a9ff 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@ -454,15 +454,20 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {findViewById(R.id.clockDivider).setBackgroundColor(Color.WHITE);}if (getResources().getBoolean(R.bool.rtl_menu_bar)) {- // Center Hebrew greetings over the numeric time, independent of a visible AM/PM label.- findViewById(R.id.clock).addOnLayoutChangeListener((v, l, t, right, bottom, ol, ot, or, ob) -> {+ // Center Hebrew greetings over the numeric time, independent of a visible AM/PM label. The clock's row+ // is watched too: date_below_clock can move the whole row right under a wider date.+ View clock = findViewById(R.id.clock);+ View clockRow = (View) clock.getParent();+ View.OnLayoutChangeListener centerGreeting = (v, l, t, right, bottom, ol, ot, or, ob) -> {ViewGroup.LayoutParams params = greeting.getLayoutParams();- if (params.width != right - l) {- params.width = right - l;+ if (params.width != clock.getWidth()) {+ params.width = clock.getWidth();greeting.setLayoutParams(params);}- greeting.setTranslationX(l);- });+ greeting.setTranslationX(clockRow.getLeft() + clock.getLeft());+ };+ clock.addOnLayoutChangeListener(centerGreeting);+ clockRow.addOnLayoutChangeListener(centerGreeting);}btnWifi = findViewById(R.id.btnWifi);shamsiDate = findViewById(R.id.shamsiDate);@@ -479,6 +484,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {lunarOffset = Lunar.offsetFor(cfg.lunarUtcOffset, Locale.getDefault());if (lunar) lunarDate.setVisibility(View.VISIBLE);greetingName = cfg.greetingName;+ if (cfg.dateBelowClock) moveDateBelowClock();if (shamsi) {shamsiDate.setVisibility(View.VISIBLE);TextView date = findViewById(R.id.date);@@ -2247,6 +2253,28 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {hideHero();}+ /**+ * date_below_clock: the date column moves to its own line under the clock, in the vertical LinearLayout that holds+ * the clock's row, and the line between them goes. In Hebrew (rtl_menu_bar) the date and the clock's row sit right.+ */+ private void moveDateBelowClock() {+ View column = (View) findViewById(R.id.date).getParent();+ View clockRow = (View) findViewById(R.id.clock).getParent();+ LinearLayout clockColumn = (LinearLayout) clockRow.getParent();+ ((ViewGroup) column.getParent()).removeView(column);+ findViewById(R.id.clockDivider).setVisibility(View.GONE);+ // Its own width, not the column's: in Hebrew the column is only as wide as the clock.+ LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(+ ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);+ lp.topMargin = Math.round(4 * density);+ if (getResources().getBoolean(R.bool.rtl_menu_bar)) {+ // Date and clock flush right; the greeting stays left and follows the clock by translation.+ lp.gravity = Gravity.RIGHT;+ ((LinearLayout.LayoutParams) clockRow.getLayoutParams()).gravity = Gravity.RIGHT;+ }+ clockColumn.addView(column, clockColumn.indexOfChild(clockRow) + 1, lp);+ }+/** The first top-bar button after Inputs that is shown, in bar order (top_bar_apps, the network pill, ...); Settings is always there. */private View firstTopButton() {ViewGroup bar = findViewById(R.id.topButtons);diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xmlindex 8dbd32bec..efd70cbff 100644--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@ -202,6 +202,9 @@<bool name="shamsi_date">false</bool><!-- Lunisolar (Vietnamese / Chinese) date under the date; config.json lunar_date, lunar_utc_offset (7 or 8, default by locale). --><bool name="lunar_date">false</bool>+ <!-- The date (with the Shamsi and lunar lines) on its own line under the clock instead of beside it, for a top bar+ whose pills leave the date too little room. Can also be set with "date_below_clock" in a theme. -->+ <bool name="date_below_clock">false</bool><!-- A name after the greeting: "Mr. Trịnh" shows GOOD MORNING, MR. TRỊNH. Empty: the greeting alone. --><string name="greeting_name" translatable="false"></string>diff --git a/themes/README.md b/themes/README.mdindex a4c5310cd..9866428ef 100644--- a/themes/README.md+++ b/themes/README.md@@ -79,6 +79,7 @@ A new key needs one there in the same pull request.| `shamsi_date` | bool | Show the Solar Hijri date above the Gregorian one || `lunar_date` | bool | Show the lunisolar date under the Gregorian one, e.g. `LUNAR 13/9 · YEAR OF THE HORSE`, or `13/9 ÂM LỊCH · BÍNH NGỌ` in Vietnamese; a leap month is marked. Off by default || `lunar_utc_offset` | 0 to 14 | Hours east of UTC the lunar calendar is computed for: `7` is the Vietnamese calendar, `8` the Chinese one; they differ by a day now and then (and by a month in 1985). Unset: 7 when the TV is in Vietnamese, 8 otherwise |+| `date_below_clock` | bool | The date (with the Shamsi and lunar lines) on its own line under the clock instead of beside it, for a top bar whose pills leave the date too little room (`false` by default) || `greeting_name` | string | A name after the greeting, e.g. `"Mr. Trịnh"` for GOOD MORNING, MR. TRỊNH; empty for the greeting alone || `show_greeting` | bool | The greeting above the clock (`true` by default); `false` hides it || `header_white` | bool | The date and the line between the clock and the date in the clock's full white instead of dimmed (`false` by default) |