Skip to content
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

Add setstyle command for userChrome.css like setpref for user.js #2079

Open
alerque opened this issue Jan 7, 2020 · 1 comment
Open

Add setstyle command for userChrome.css like setpref for user.js #2079

alerque opened this issue Jan 7, 2020 · 1 comment

Comments

@alerque
Copy link
Contributor

alerque commented Jan 7, 2020

In a nutshell, what I want is a way to sanely manage my entire browser experience in version controlled dotfiles. Firefox has historically made this very hard by expecting uniquely named profile directories on each machine.

I'm fine with using Firefox Sync for addons so that's covered.

I dont's use saved passwords (in favor of a KeepassXC setup), so that's covered.

Tridactyl allows me to have setpref() in my tridactylrc file, so most of what user.js would be used for is covered.

What I'm missing is a way to manage the few manual tweaks I've had to put in userChrome.css because there is literally no other place they work from. Already most of what is in that file is put there for me by Tridactyl, what I can't seem to do is place my own arbitrary rules there. For example I have these:

@import "firefox-gnome-theme/userChrome.css";

#sidebar {
  max-width: none !important;
  min-width: 0px !important;
}

I wonder if there is a way Tridactl can use it's native messenger and knowledge of where the profile directory is to take over the contents of that file entirely.

  • Add a way to add/remove arbitrary bits like:

    setstyle #sidebar { max-width: none !important; min-width: 0px !important; }

    This option would enable adding CSS rules into trydactylrc and versioning them along side all other preferences.

  • Add a way to save/load the css styles similar to how the RC can be dumped or sourced:

    sourcestyle mystyles.css

    This option would allow keeping a css file in the Tridactyl config that had a full version of my preferred styles.

@bovine3dom
Copy link
Member

bovine3dom commented Jan 8, 2020

You can roll your own quite easily. Just follow what we're doing in guiset

const profile_dir = await Native.getProfileDir()
via :jsb using the tri.native object to access the Native you see used in guiset.

A PR adding setstyle would be welcome :)

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

No branches or pull requests

2 participants