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
Merge PR #556: launcher: compact top bar, opt-in (icon_only_buttons, wifi_label_width, library_button)
Gathin23644cc34d9ae0
diff --cc launcher/app/src/main/java/com/gathin/tvhome/Config.javaindex b7972ba60,b570974c9..f21495379--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java@@@ -73,8 -70,12 +73,14 @@@ final class Configfinal boolean dockRow;/** Reorder button in the top bar (config.xml reorder_button); the Settings long-press menu offers it either way. */final boolean reorderButton;+ /** Show the Wi-Fi/Ethernet pill in the top bar (config.xml, show_network_pill). */+ final boolean showNetworkPill;+ /** Wi-Fi and Settings pills as round icon buttons, Inputs keeps its label (config.xml icon_only_buttons). */+ final boolean iconOnlyButtons;+ /** App library as a round button in the top bar (config.xml library_button); needs app_library. */+ final boolean libraryButton;+ /** With icon_only_buttons, the Wi-Fi pill keeps the network name up to this width in dp (0: icon only). */+ final int wifiLabelWidth;final String vpnApp;final boolean showHomeSettingsShortcut;/** One line under the clock: CPU, free memory, free storage. Off unless config or a theme turns it on. */@@@ -116,7 -115,7 +122,7 @@@String liveTvAction, Map<String, String> launchActions, Map<String, String> appLabels,Map<String, String> appBanners, String sourcePanelService, String sourcePanelAction, String inputAction,int columns, int rowsBelowDock, boolean animations, boolean advancedEffects,- boolean shamsiDate, String greetingName, boolean moduleCards, boolean reducedMotion, boolean dockTitle, boolean dockRow, boolean reorderButton, boolean showNetworkPill, String vpnApp,- boolean shamsiDate, String greetingName, boolean moduleCards, boolean reducedMotion, boolean dockTitle, boolean dockRow, boolean reorderButton, boolean iconOnlyButtons, boolean libraryButton, int wifiLabelWidth, String vpnApp,++ boolean shamsiDate, String greetingName, boolean moduleCards, boolean reducedMotion, boolean dockTitle, boolean dockRow, boolean reorderButton, boolean showNetworkPill, boolean iconOnlyButtons, boolean libraryButton, int wifiLabelWidth, String vpnApp,boolean showHomeSettingsShortcut, boolean showStats, boolean appLibrary, int backgroundColor, int skyIntensity,int[] settingsKeycodes, boolean settingsKeyPanel, boolean wallpaperEnabled, File wallpaper, List<File> wallpapers,int wallpaperRotationMinutes, int wallpaperDim, boolean overlayApplied,@@@ -146,7 -145,9 +152,10 @@@this.dockTitle = dockTitle;this.dockRow = dockRow;this.reorderButton = reorderButton;+ this.showNetworkPill = showNetworkPill;+ this.iconOnlyButtons = iconOnlyButtons;+ this.libraryButton = libraryButton;+ this.wifiLabelWidth = wifiLabelWidth;this.vpnApp = vpnApp;this.showHomeSettingsShortcut = showHomeSettingsShortcut;this.showStats = showStats;@@@ -196,7 -196,9 +205,10 @@@boolean dockTitle = res.getBoolean(R.bool.dock_title);boolean dockRow = res.getBoolean(R.bool.dock_row);boolean reorderButton = res.getBoolean(R.bool.reorder_button);+ boolean showNetworkPill = res.getBoolean(R.bool.show_network_pill);+ boolean iconOnlyButtons = res.getBoolean(R.bool.icon_only_buttons);+ boolean libraryButton = res.getBoolean(R.bool.library_button);+ int wifiLabelWidth = res.getInteger(R.integer.wifi_label_width);String vpn = res.getString(R.string.vpn_app).trim();boolean homeSettings = res.getBoolean(R.bool.show_home_settings_shortcut);boolean showStats = res.getBoolean(R.bool.show_stats);@@@ -239,7 -239,9 +251,10 @@@dockTitle = bool(json, "dock_title", dockTitle);dockRow = bool(json, "dock_row", dockRow);reorderButton = bool(json, "reorder_button", reorderButton);+ showNetworkPill = bool(json, "show_network_pill", showNetworkPill);+ iconOnlyButtons = bool(json, "icon_only_buttons", iconOnlyButtons);+ libraryButton = bool(json, "library_button", libraryButton);+ wifiLabelWidth = integer(json, "wifi_label_width", wifiLabelWidth, 0, 300);vpn = string(json, "vpn_app", vpn);homeSettings = bool(json, "show_home_settings_shortcut", homeSettings);showStats = bool(json, "show_stats", showStats);@@@ -303,10 -303,10 +318,10 @@@packageMap(appBanners), panelService,panelAction, inputAction,Math.max(1, columns), Math.max(0, rowsBelow), animations, advancedEffects,- shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, showNetworkPill, vpn, homeSettings, showStats, library, background,- shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, iconOnlyButtons, libraryButton, wifiLabelWidth, vpn, homeSettings, showStats, library, background,++ shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, showNetworkPill, iconOnlyButtons, libraryButton, wifiLabelWidth, 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 --cc launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex 4037d0e2a,0b1bd7981..e65b9c62c--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@@ -516,7 -501,19 +516,20 @@@ public class MainActivity extends ActivbtnReorder = findViewById(R.id.btnReorder);btnReorder.setOnClickListener(v -> toggleReorder());btnReorder.setVisibility(cfg.reorderButton ? View.VISIBLE : View.GONE);+ if (!cfg.showNetworkPill) btnWifi.setVisibility(View.GONE);+ btnLibraryTop = findViewById(R.id.btnLibraryTop);+ btnLibraryTop.setOnClickListener(v -> {+ onLibraryRequested();+ libraryFromTopBar = true; // closing it goes back to this button, not to the pill after the last row+ });+ btnLibraryTop.setVisibility(cfg.libraryButton && cfg.appLibrary ? View.VISIBLE : View.GONE);+ iconOnlyButtons = cfg.iconOnlyButtons;+ wifiIconOnly = iconOnlyButtons && cfg.wifiLabelWidth <= 0;+ if (iconOnlyButtons) {+ if (cfg.wifiLabelWidth > 0) btnWifi.setMaxWidth(Math.round(cfg.wifiLabelWidth * density));+ else makeIconOnly(btnWifi);+ makeIconOnly((TextView) btnSettings);+ }btnSettings.setOnLongClickListener(v -> {showSettingsMenu();return true;@@@ -2030,10 -1956,14 +2050,14 @@@text = name.length() < text.length() && name.length() < 5 ? "" : name;SpannableString label = new SpannableString(text + " " + badge);label.setSpan(span, text.length() + 1, label.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);- btnWifi.setText(label);- } else {+ if (!TextUtils.equals(btnWifi.getText(), label)) btnWifi.setText(label);+ } else if (!TextUtils.equals(btnWifi.getText(), text)) {btnWifi.setText(text);}+ if (wifiIconOnly) {+ btnWifi.setContentDescription(btnWifi.getText());+ btnWifi.setText(null);+ }if (festive && diya != null) {if (online && flame == 0) flame = 3; // online some other way (cellular, USB tethering)diya.setSteady(steady);diff --cc launcher/app/src/main/res/values/config.xmlindex 0679ea414,a87dc6209..9247c4c0b--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@@ -114,11 -110,15 +114,19 @@@<!-- A reorder button (two arrows) in the top bar. Off by default: reordering is also in the Settingsbutton's long-press menu, so it needs no extra button on screen. --><bool name="reorder_button">false</bool>+ <!-- Wi-Fi and Settings as round icon-only buttons (the network name moves to the talkback description);+ Inputs keeps its label. -->+ <bool name="icon_only_buttons">false</bool>+ <!-- The app library as a round button in the top bar, beside Settings (app_library must be on too). -->+ <bool name="library_button">false</bool>+ <!-- With icon_only_buttons: keep the network name on the Wi-Fi pill up to this width in dp, cut with an ellipsis.+ 0 leaves the Wi-Fi pill as an icon. -->+ <integer name="wifi_label_width">0</integer>+ <!-- The Wi-Fi/Ethernet pill in the top bar. false hides it (on Android 14 with Location off it can+ only say "Wi-Fi", not the network name). Can also be set with "show_network_pill" in a theme. -->+ <bool name="show_network_pill">true</bool>+<!-- Grid rows left visible under the dock on the home screen. 0 = dock sits at the very bottom. Tiles shrink ifthe dock, its title and this many rows would not otherwise fit the screen height. --><integer name="rows_below_dock">0</integer>diff --cc themes/README.mdindex e9f887999,4331590e7..8f06e248c--- a/themes/README.md+++ b/themes/README.md@@@ -40,7 -40,9 +40,10 @@@ is ignored, and a file that doesn't par| `dock_title` | bool | The focused dock app's name in large type above the dock (`true`); `false` keeps only the glow || `dock_row` | bool | The dock as its own row with a band (`true`); `false` makes the dock apps the first tiles of one plain grid || `reorder_button` | bool | A reorder button in the top bar (`false` by default); reordering is always in the Settings button's long-press menu |+| `show_network_pill` | bool | The Wi-Fi/Ethernet pill in the top bar (`true` by default); `false` hides it |+ | `icon_only_buttons` | bool | Wi-Fi and Settings as round icon buttons; Inputs keeps its label (`false` by default) |+ | `wifi_label_width` | 0 to 300 | With `icon_only_buttons`, keep the network name on the Wi-Fi pill up to this width in dp, cut with an ellipsis; 0 leaves only the icon |+ | `library_button` | bool | The app library as a round button in the top bar, beside Settings; needs `app_library`. Closing the library returns to it || `app_library` | bool | An App library pill after the last Home row: every installed app, add one to Home or take it off (`false` by default). The choices stay on the TV when a theme is pushed or reset; see [docs/app-library.md](../docs/app-library.md) || `shamsi_date` | bool | Show the Solar Hijri date above the Gregorian one || `greeting_name` | string | A name after the greeting, e.g. `"Mr. Trịnh"` for GOOD MORNING, MR. TRỊNH; empty for the greeting alone |