Last active
April 10, 2022 02:28
-
-
Save alexdelorenzo/041f1d28df63419527bd189390a0595a to your computer and use it in GitHub Desktop.
Install Firefox with Global Menu patches on Ubuntu derived Linux distributions. https://alexdelorenzo.dev/notes/firefox-global-menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Copyright 2022 Alex DeLorenzo. Licensed under the AGPLv3. | |
# | |
# This script requires Bash, byobu, curl, and pup. You can find the latter here: | |
# https://github.com/ericchiang/pup | |
# For more information, see https://alexdelorenzo.dev/notes/firefox-global-menu | |
# | |
# Usage: | |
# $ ./install_ff.sh amd64 | |
readonly ARCH="${1:-amd64}" | |
readonly URL="https://packages.ubuntu.com/bionic/$ARCH/firefox/download" | |
readonly DEB_PATH="div#content > ul > li > a attr{href}" | |
readonly debUrl="$(curl -s "$URL" | pup "$DEB_PATH")" | |
readonly debFile="$(basename "$debUrl")" | |
# download if file does not exist | |
test -e "$debFile" || { | |
printf "Downloading %s\n" "$debUrl" | |
curl -O "$debUrl" | |
} | |
# get current and downloaded firefox versions | |
currVer="$(apt show firefox | grep Version | col2 | cut -d- -f1)" | |
downloadVer="$(dpkg -I "$debFile" | grep Version | col2 | cut -d- -f1)" | |
printf "Installed: %s\n" "$currVer" | |
printf "Downloaded: %s\n" "$downloadVer" | |
# check if installed version is different from downloaded version | |
test "$currVer" != "$downloadVer" && { | |
# install | |
sudo apt install ./"$debFile" | |
# hold version | |
sudo apt-mark hold firefox | |
} |
Possible to work around this by customizing your toolbar and checkmarking show titlebar or maybe a more proper fix, but it involves editing the css of Firefox to bring back the normal buttons without the title bar.
Thanks for the heads up about the byobu
dependency, @rbreaves.
I haven't had problems with the sizes of the window buttons, but that might be because I'm using KWin and its default window decorations, and not Firefox's.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some dependencies are needed.
Also install brew imo and do
brew install pup
to save the hassle of trying to get it up and running.There is also an issue of the close, minimize and restore/maximize buttons disappearing with this fix as well.