-
-
Notifications
You must be signed in to change notification settings - Fork 199
Adding Zen Browser matugen template #1181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… firefox userchrome is named, also changed output directory to DMS config directory (like firefox)
…lors to better align with how pywalfox handles backgrounds/toolbars
…ontrast on selected urls in dropdown
|
I think this PR is ready for review. Since I opened the draft, I have tweaked the CSS file for more appropriate use of the color palette from different themes. I also removed several CSS elements that don't appear to be used by Zen anymore. The theming ability of Zen has drifted considerably from how its handled in Firefox (which is why pywalfox no longer works). I have drafted some documentation that could be included in the Zen BrowserIn more recent updates, Zen Browser has changed the way theming is handled. You can no longer use Pywalfox or Firefox extensions to control most elements of the browser theme. The browser theme is controlled mostly through CSS elements in the When you have Zen installed, DMS will dynamically generate a theme file for you to use. Because the Zen profile directory contains a random hash, we cannot place the file in your profile directory. Instead it is generated within the DankMaterialShell config directory ( # Find default profile directory
export PROFILE_DIR=$(find ~/.zen -maxdepth 1 -type d -name "*.Default Profile" | head -n 1)
mkdir -p $PROFILE_DIR/chrome
ln -sf ~/.config/DankMaterialShell/zen.css "$PROFILE_DIR/chrome/userChrome.css"Note: live reloading of the file on theme change doesn't work and requires a browser restart. |
| appendConfig(opts, cfgFile, "pywalfox", "pywalfox.toml") | ||
| } | ||
| if !opts.ShouldSkipTemplate("zenbrowser") { | ||
| appendConfig(opts, cfgFile, "zen", "zenbrowser.toml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is zen the correct binary name? I'm using zen-browser-bin and I have it zen-browser.
| appendConfig(opts, cfgFile, "zen", "zenbrowser.toml") | |
| appendConfig(opts, cfgFile, "zen-browser", "zenbrowser.toml") |
|
Hmm didn't realize that the AUR zen had a different binary name. In my install on NixOS I had it compiled out to |
With Zen browser no longer working correctly with Pywalfox, I decided to use matugen to create a
userChrome.cssfile to theme the browser. I used matugen color properties as well as dank16 ones for profile colors. Upon my testing on several themes with both dark/light variants, it does appear to look decent.The tricky part with utilizing this for the end user will be automatically placing the generated
userChrome.cssfile in the correct location. Similarly to Firefox, the file is stored in the profile folder (which has a random hash in the name), so it can't really be done globally. For example, when doing this with my own matugen template, I did the following:The default profile name is random, so we can't just assume this location for all users like we would other themes. For this PR, I opted to place the generated file in the
~/.cache/dms/folder. My thought was that if someone wanted to utilize the DMS theme for Zen, they could then create a symbolic link from this file to their Zen profile folder:dank-zenbrowser.css -> userChrome.css.If this is too cumbersome or seems too involved to add, that's fine. Just figured I'd offer it up since I spent some time making the template.