Skip to content

Conversation

@maxbol
Copy link
Contributor

@maxbol maxbol commented Mar 16, 2025

Solves:

On MacOS, symlinking the chrome/ folder or any of it's contents produce inconsistent results, especially for userContent.css.

With this change, the copyOnActivation option can be set to true (and is by default on darwin hosts), which instead of symlinking the textfox configuration into place copies it into place on home manager activation.

@adriankarlen
Copy link
Owner

@snaeil do you mind checking this one? At least testing that it works on your machine.

@snaeil
Copy link
Contributor

snaeil commented Mar 27, 2025

@maxbol I checked it on Linux and it seems to work in general :-) , but config.newTabLogo is not working correctly with the following example:

  textfox = {
    enable = true;
    profile = "convenient";
    copyOnActivation = true;
    config = {
      background = {
        color = "#191724";
      };
      border = {
        color = "#908caa";
        width = "1px";
        transition = "1.0s ease";
        radius = "1px";
      };
      newtabLogo = ''
                Hello world!
                What's going on?
      '';
      font = { 
        size = "12px";
        accent = "#c4a7e7";
      };
    };
  };

because config.css will result in

:root { --tf-font-family: "SF Mono", Consolas, monospace; --tf-font-size: 12px; --tf-font-accent: #c4a7e7; --tf-background: #191724; --tf-border-color: #908caa; --tf-border-transition: 1.0s ease; --tf-border-width: 1px; --tf-border-radius: 1px; --tf-sidebery-margin: 0.8rem; --tf-display-horizontal-tabs: none; --tf-display-window-controls: none; --tf-display-nav-buttons: none; --tf-display-urlbar-icons: none; --tf-display-customize-sidebar: flex; --tf-display-titles: flex; --tf-newtab-logo: Hello world!
What's going on?
; }

So quotes are missing for the logo string and line breaks are not done correctly.

done
cp -L ${configCss} "$HOME/$PROFILE_DIR/chrome/config.css"
chmod 744 "$HOME/$PROFILE_DIR/chrome/config.css"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxbol Why exactly permission 744? What is the executable permission needed for?

@snaeil
Copy link
Contributor

snaeil commented Mar 27, 2025

@maxbol Apart from my comments above, some merge conflicts would be to resolved.

@maxbol
Copy link
Contributor Author

maxbol commented May 5, 2025

Oh dear. I was just about to have another look at this, and it looks like we've diverged quite a bit. I'll try to find some time to sort it out, but I'm going to have to have a look at your new integration with the firefox home-manager module and see if that works with all I've got going on on my end. End of the day I have a pretty specific setup (hot reloading of styles through a global theme manager), so it might be easier long term if I maintain my own nix module for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants