Add hiding widgets on homescreen as experimental feature#227
Add hiding widgets on homescreen as experimental feature#227nicoverbruggen wants to merge 4 commits intopgaskin:masterfrom
Conversation
Hook HomePageView's constructor to optionally hide widgets by their internal objectName (row1col2, row2col2, row3). This is the runtime equivalent of the corresponding kobopatch patches. The hook is optional and all widget lookups are null-checked, so unsupported firmware versions are handled gracefully. Also adds nh_dump_log() call on init for debugging (fork-only).
The row2col2 tweak was an experiment, unfortunately it does not work, as it also affects book covers in My Books.
|
I was originally wondering if I should even create this pull request in the first place, as this change is definitely less related to core NickelMenu functionality (the actual menu) than, say, the tab bar customization that's currently part of the latest release. But then again, customizing the tab bar is clearly marked as experimental in the docs, too. I figured since it's all marked as experimental anyway, you always have the option to remove this further down the line if the maintenance cost is too high or a future version of Nickel (e.g. with the upcoming 5.x updates) changes things up considerably. However, if you feel it's not a fit in terms of scope, I think that's totally understandable! |
|
Isn't this more suitable for Kobo Tweaks instead? But I still think it's a little bit risky to patch the Home view. If something goes wrong it may cause bootloop. Alternative method: redphx/kobo-tweaks#21 |
This pull request adds an experimental feature that's similar to the tab bar customization that was introduced in the latest stable version of NickelMenu. This change allows you to hide certain parts of the home screen.
Since it's now possible to hide certain unneeded features in the tab bar, I've been using
kobopatchto patch each of my devices with two particular tweaks that hide therow1col2androw3widgets on the homescreen.I even did some experimentation with
kobopatchto make a WASM version and an interactive patcher here to make patching easier. Unfortunately, this modification needs to be reapplied every time an update releases, so I wanted to integrate this as an experimental tweak that is a little bit more resilient.Since NickelMenu and its tab bar modifications persist due to the injection approach, I added configurable widget hiding for certain bits of the homescreen.
Both options can be separately toggled:
It looks like this when both are enabled:
Normally, since I'm only currently reading one book, I'd get recommendations on the right. That's hidden with
hide_home_row1col2_enabled. The section below My Books, promoting Kobo's other features, activity, Kobo Plus, etc. is now also hidden withhide_home_row3_enabled. I already used the tab bar customizations, too, as you can probably see.I've updated the documentation to mention this experimental feature and I've done my best to try to be as consistent with the rest of NickelMenu in terms of source code and best practices (as far as I can tell). Like the tab bar feature, it should not cause any issues if Kobo ends up changing the way their homescreen works in future versions of their software.
I've also added the latest software version number to
test/syms/main.go.I just figured I'd do a PR since I've made the changes anyway. (I've been successfully using this feature on my Kobo Clara BW. Pretty awesome that GitHub Actions just builds the project for you.)
I also want to take the opportunity to say thanks for all of the Kobo related work you've done over time... so, thank you!