-
Notifications
You must be signed in to change notification settings - Fork 38
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
create install script #81
base: main
Are you sure you want to change the base?
Conversation
Might require testing on MacOS, will probably do a Windows .ps1 script later |
@bmFtZQ This is probably all I'll do for now, let me know what you think Check out #82 (comment) to see how it looks installing on linux, there is also the uninstall feature which I've not shown in that video clip, but you can verify it or I can show you somehow |
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.
Sorry for taking so long to respond this!
I already had an update script here but it requires the user to manually enter the profile path.
I think your installation script is better but it has some issues/changes that could be made to improve it:
- Don't modify
prefs.js
, instead use theuser.js
file which can be used to enable options automatically. - The commands used to execute the script could be shortened to make installation more convenient (see the file comments for more details).
- Maybe use curl to download a tarball of the repository instead of using git as it isn't installed by default on most systems. The URL for downloading a tarball of the repo is: https://github.com/bmFtZQ/edge-frfox/archive/refs/heads/main.tar.gz
…emove unneeded code, modify user.js instead
…r.js lines, not file
b32ed1e
to
f1e020b
Compare
…t answer to 'yes' in uninstall.
The preferences that firefox sets are found in prefs.js, which means they can easily be removed (which sets them to default) provided firefox is closed. Of course, this would mean we also remove the prefs in user.js, because we don't want to set them again. TL;DR change nothing about how it's currently being installed, but on uninstall, remove prefs in user.js and prefs.js. The option is there, let me know if you prefer that instead. |
When uninstalling I think removing the preferences should be optional and the script could prompt the user with something like this:
Then also create a backup of the existing files before starting (create a copy with When installing, maybe the script can look in the If someone's existing user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("layout.css.color-mix.enabled", true);
user_pref("layout.css.light-dark.enabled", true); then only |
… already exists in user.js
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.
The Windows version works great, though the widget.macos.native-context-menus
preference isn't needed there as it would have no effect on Windows.
With the bash script, there are a few changes (mostly related to adding quotes around path names), but also an annoying bug due to differences in the BSD and GNU versions of sed
.
112d334
to
272b2c2
Compare
Happy New Year! |
Happy new year! |
@bmFtZQ PR is ready to merge unless you want anything else changed. |
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.
Two final changes, first remove/fix the section that asks you if you want to remove preferences. I think it is unnecessary with the option to remove preferences from user.js
and prefs.js
.
The second change is just adding some new additional preference values. (One for Linux, and one for Windows.)
done; | ||
|
||
ans="y" | ||
echo -e "${CYAN}NOTE: enter 'a' to answer 'yes' to all questions.${NC}"; |
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.
The following section does not seem to work in either Linux or macOS it shows the prompt, but then nothing happens. The next line printed to the terminal is uninstall complete
.
I think this section can just be removed, deleting the contents of user.js
can just be handled by the other section (if the user input yes for that question).
} | ||
|
||
$ans = "y" | ||
Write-Host "NOTE: enter 'a' to answer 'yes' to all questions." -ForegroundColor Cyan |
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.
Same thing as mentioned in the bash shell script.
$FIREFOX_DIR="$env:APPDATA\Mozilla\Firefox"; | ||
$PROFILE_ROOTDIR="$($FIREFOX_DIR)\Profiles\$((Select-String -Path "$($FIREFOX_DIR)\profiles.ini" -Pattern "Path=.*\.(dev-edition-default|default-.*)" | Select-Object -Last 1).Line.Substring(14))"; | ||
$OPTIONALS=@{ | ||
"browser.theme.dark-private-windows" = "false" |
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.
While we're here, add the new optional preference for Windows: browser.theme.windows.accent-color-in-tabs.enabled
= true
.
PROFILE_ROOTDIR=$FIREFOX_DIR/$(grep -E "Path=.*\.(dev-edition-default|default-.*)" "$FIREFOX_DIR/profiles.ini" | tail -1 | cut -c 6-); | ||
OPTIONALS=( | ||
"widget.macos.native-context-menus" "false" | ||
"browser.theme.dark-private-windows" "false" |
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.
Same as in the powershell script, but with widget.gtk.rounded-bottom-corners.enabled
= true
instead.
Designed to make the installation a lot simpler, by just using
curl
to execute the script