by nextos · 7y ago · 0 comments
You can't use user.js as a regular dotfile such as .emacs, .vimrc or .muttrc. That is, once you set an option you need to manually unset it. I wished they introduced a more sane mechanism.
Besides, there is no way to programmatically declare you want to use some addons.
IMHO, all this makes maintaining relatively complex user configurations very costly.
What I did was created a fork, ie https://github.com/dngray/ghacks-user.js/tree/fx-desktop
Then I added it as a submodule, ie "yadm submodule add ..." as they mention here https://stackoverflow.com/a/18797720
Yadm allows for a bootstrap[0], so I simply do:
ln -sf ~/.config/firefox/chrome/userChrome.css ~/.mozilla/firefox/$FIREFOX_PROFILE.default/chrome/userChrome.css
git --git-dir=/home/{{ YADM_USER }}/.config/firefox/ghacks-user.js/.git --work-tree=/home/{{ YADM_USER }}/.config/firefox/ghacks-user.js checkout fx-desktop
cp ~/.config/firefox/ghacks-user.js/user.js ~/.mozilla/firefox/$FIREFOX_PROFILE.default/user.js
Note the Jinja2[1] syntax there.[0]: https://yadm.io/docs/bootstrap [1]: https://yadm.io/docs/alternates
Options that can be set only for the duration of the current session?