Project Code 20

My custom Chromium patches, including:

PKGBUILD is of ungoogled-chromium although these patches can be applied to any Chromium build.

Custom Startpage

Problem: Google Chrome (Chromium pictured here) requires you to install an extension to change your new tab page. This would be fine, except that new tab loses focus of the searchbar! It also loads far slower than it should.

Solution: Build Chromium with all instances of chrome://newtab replaced with your custom startpage URL. This patch does the replacement, and also adds some checks to ensure the URL is hidden and the searchbar keeps its focus. 😃


GTK Dark Theme

Problem: Chrome does not respect GTK themes when it sets prefers-color-scheme. It’s a somewhat long-lived bug in Chromium on Linux. Here is the bugreport and Electron issue:

Solution-(ish): Use this patch to add a very naive forced update to the Web and NativeUI themes. This most likely should be done with listeners like Chromium already uses for Windows and MacOS, but GTK seems deliberately left out.

I don’t know enough about the monolithic structure to provide an actual contribution, but this works well enough for me.

Chromium / Firefox Comparisons

Before (web content theme not changed)


After (theme changes, thank you Mr. Duck)