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

Added gnomeTheme.noThemedIcons #763

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
release:
types: [published]

jobs:
publish_aur_package:
name: Publish AUR package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Generate PKGBUILD
env:
RELEASE: ${{ github.event.release.tag_name }}
run: ./scripts/generate-pkgbuild.sh

- name: Publish firefox-gnome-theme to the AUR
uses: KSXGitHub/github-actions-deploy-aur@v2.7.1
with:
pkgname: firefox-gnome-theme
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: ${{ github.event.release.tag_name }}
updpkgsums: true
test: true
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Test

on: [push]

jobs:
Expand All @@ -16,7 +18,7 @@ jobs:
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
sudo apt update
sudo apt install firefox

- name: Setup 1 - create a Firefox profile
run: firefox --headless --createprofile test

Expand All @@ -26,7 +28,6 @@ jobs:
- name: Teardown 1
run: rm -rf ls ~/.mozilla/firefox/


- name: Setup 2 - create a new Firefox profile
run: firefox --headless --createprofile test

Expand All @@ -38,4 +39,3 @@ jobs:

- name: Teardown 2
run: rm -rf ls ~/.mozilla/firefox/

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
customChrome.css
customContent.css
PKGBUILD
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

This theme follows latest GNOME Adwaita style.

> [!WARNING]
> ### Disclaimer:
> Be aware that this theme might do things that are not supported by upstream Firefox. If you face an issue while using this theme, report it here first or test if it is reproducible in vanilla Firefox.
>
Expand All @@ -29,12 +30,21 @@ Matrix room: [#firefox-gnome-theme:matrix.org](https://matrix.to/#/#firefox-gnom

### Firefox versions support

The `master` branch of this repo supports the current Firefox stable release `122`.
The `master` branch of this repo supports the current Firefox stable release `126`.

Theme versions compatible with older Firefox releases are preserved as git tags.

We also have the `beta` and `nightly` branches for fixes only applicable to the current Firefox beta and nightly versions.

# Installation

## Package managers

### Arch Linux

1. Install the [AUR package](https://aur.archlinux.org/packages/firefox-gnome-theme) `firefox-gnome-theme`
2. Follow the instructions at `cat /usr/share/doc/firefox-gnome-theme/INSTALL.md`

## One command install with curl

To install this theme, you can run this command, which uses *curl* to download a script that will also download the latest released version of the theme (not the master version) and run the **auto-install** script for you.
Expand Down Expand Up @@ -235,6 +245,11 @@ Optional features can be enabled by creating new `boolean` preferences in `about

> **Note:** This feature has a [known color bug](#icons-color-broken-with-system-icons).


- **No themed icons** `gnomeTheme.noThemedIcons`

Use default Firefox icons instead of the included icons.

- **Symbolic tab icons** `gnomeTheme.symbolicTabIcons`

Make all tab icons look kinda like symbolic icons.
Expand Down
42 changes: 42 additions & 0 deletions scripts/generate-pkgbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh

# Exit on error
set -e

if [ -z "$RELEASE" ]; then
echo "\$RELEASE not set, aborting"
exit 1
fi

pkgver=$(echo "$RELEASE" | sed 's/v//')

cat << EOF > ./PKGBUILD
# Maintainer: Marko Korhonen <firefox-gnome-theme@marko.korhonen.cc>
# Based on the existing AUR package firefox-gnome-theme-git
# This PKGBUILD is automatically generated by https://github.com/rafaelmardojai/firefox-gnome-theme/blob/$RELEASE/scripts/generate-pkgbuild.sh
# when a release is published on GitHub. Do not edit this file directly.

pkgname=firefox-gnome-theme
pkgver=$pkgver
pkgrel=1
pkgdesc='A GNOME theme for Firefox'
arch=('any')
url="https://github.com/rafaelmardojai/\$pkgname"
license=('Unlicense')
optdepends=('firefox: primary compatible browser' 'librewolf: alternative compatible browser')
conflicts=("\$pkgname-git")
install="\$pkgname.install"
source=("\$pkgname-\$pkgver.tar.gz::https://github.com/rafaelmardojai/\$pkgname/archive/refs/tags/v\$pkgver.tar.gz" "INSTALL.md")
md5sums=('TO_BE_GENERATED'
'25f18456221ffc91f472b1abff8aae84')

package() {
cd "\$srcdir/\$pkgname-\$pkgver"
install -d "\$pkgdir/usr/lib/\$pkgname"
cp -ra theme userChrome.css userContent.css configuration "\$pkgdir/usr/lib/\$pkgname"

# Install docs
install -Dm644 README.md "\$pkgdir/usr/share/doc/\$pkgname/README.md"
install -Dm644 "\$srcdir/INSTALL.md" "\$pkgdir/usr/share/doc/\$pkgname/INSTALL.md"
}
EOF
12 changes: 12 additions & 0 deletions scripts/rebase-branches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

git checkout beta
git rebase master
git push origin beta -f

git checkout nightly
git rebase beta
git push origin nightly -f

git checkout master

2 changes: 1 addition & 1 deletion theme/gnome-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
#customization-footer::before {
background: url(../icon.svg) no-repeat;
background-size: contain;
content: "Firefox GNOME theme v122";
content: "Firefox GNOME theme v126";
padding: 9px 9px 9px 50px;
}
78 changes: 39 additions & 39 deletions theme/parts/csd.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

/* Headerbar top border corners rounded */
:root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #nav-bar {
border-radius: env(-moz-gtk-csd-titlebar-radius) env(-moz-gtk-csd-titlebar-radius) 0 0 !important;
border-radius: env(-moz-gtk-csd-titlebar-radius, 8px) env(-moz-gtk-csd-titlebar-radius, 8px) 0 0 !important;
}


/* Window buttons: at least 1 button */
@media (-moz-gtk-csd-minimize-button), (-moz-gtk-csd-maximize-button), (-moz-gtk-csd-close-button) {
:root {
Expand All @@ -15,8 +16,8 @@
}
/* Window buttons: at least 2 buttons */
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-close-button),
(-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
(-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-close-button),
(-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
:root {
--gnome-navbar-csd-offset: 80px;
}
Expand All @@ -34,7 +35,7 @@
padding-right: var(--gnome-navbar-csd-offset) !important;
}
/* Fullscreen headerbar padding for 1 button */
:root[tabsintitlebar][inFullscreen] #nav-bar {
:root[tabsintitlebar][inFullscreen]:not([inDOMFullscreen]) #nav-bar {
padding-right: 43px !important;
}

Expand All @@ -53,7 +54,7 @@
}

/* Fullscreen headerbar padding for 1 button */
:root[tabsintitlebar][inFullscreen] #nav-bar {
:root[tabsintitlebar][inFullscreen]:not([inDOMFullscreen]) #nav-bar {
padding-left: 50px !important;
padding-right: 3px !important
}
Expand All @@ -67,7 +68,7 @@

/* Force the restore button to appear regardless of maximize button's status */
:root[tabsintitlebar][inFullscreen]:not([inDOMFullscreen]) #titlebar .titlebar-buttonbox-container {
visibility: visible !important;
visibility: visible !important;
}
:root[tabsintitlebar][inFullscreen]:not([inDOMFullscreen]) #titlebar .titlebar-buttonbox-container .titlebar-restore {
display: inherit !important;
Expand All @@ -86,7 +87,7 @@

/* Remove default style of titlebar */
:root[tabsintitlebar] #titlebar {
-moz-appearance: none !important;
appearance: none !important;
}

/* Fix the issue when dragging tabs */
Expand All @@ -96,20 +97,20 @@

/* Window buttons box */
:root[tabsintitlebar] #titlebar .titlebar-buttonbox-container {
-moz-appearance: none !important;
appearance: none !important;
padding: 5px;
position: absolute !important;
right: 0;
top: 0;
display: block !important;
}
:root[tabsintitlebar] #titlebar .titlebar-buttonbox {
-moz-appearance: none !important;
appearance: none !important;
}

/* Window buttons style */
:root[tabsintitlebar]:not([inFullscreen]) #titlebar .titlebar-button {
-moz-appearance: none !important;
/*! appearance: none !important; */
padding: 0 2px !important;
background: var(--gnome-button-background) !important;
transition: background 0.3s;
Expand All @@ -122,48 +123,47 @@
width: 24px !important;
}

:root[tabsintitlebar][inFullscreen] #titlebar .titlebar-buttonbox {
background: transparent !important;
border-radius: 6px !important;
height: 34px !important;
width: 34px !important;
transition: background .3s;
}

:root[tabsintitlebar][inFullscreen] #titlebar .titlebar-buttonbox:hover {
outline: 0 !important;
background: var(--gnome-hover-color) !important;
}

:root[tabsintitlebar] #titlebar toolbarbutton > .toolbarbutton-icon {
padding: 0 !important;
stroke: none !important;
-moz-context-properties: fill, fill-opacity !important;
@media not (-moz-bool-pref: "gnomeTheme.noThemedIcons") {
:root[tabsintitlebar] #titlebar .titlebar-button > .toolbarbutton-icon {
appearance: none !important;
height: 16px !important;
padding: 0 !important;
stroke: none !important;
width: 16px !important;
-moz-context-properties: fill, fill-opacity !important;
}
}

:root[tabsintitlebar] #titlebar .titlebar-button .toolbarbutton-icon,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton .toolbarbutton-icon {
width: 16px;
}
:root[tabsintitlebar] #titlebar .titlebar-button:not([disabled]):hover,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton:not([disabled]):hover {
:root[tabsintitlebar] #titlebar .titlebar-button:not([disabled]):hover {
background: var(--gnome-button-hover-background) !important;
}
:root[tabsintitlebar] #titlebar .titlebar-button:not([disabled]):active,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton:not([disabled]):active {
:root[tabsintitlebar] #titlebar .titlebar-button:hover > .toolbarbutton-icon {
background: none !important;
}
:root[tabsintitlebar] #titlebar .titlebar-button:not([disabled]):active {
background: var(--gnome-button-active-background) !important;
}

:root[tabsintitlebar] #titlebar .titlebar-button:-moz-window-inactive,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton:-moz-window-inactive {
:root[tabsintitlebar] #titlebar .titlebar-button:-moz-window-inactive {
filter: opacity(0.5);
}

/* Restore button (fullscreen) */
:root[tabsintitlebar][inFullscreen] #titlebar .titlebar-buttonbox-container {
padding: 0 !important;
}

:root[tabsintitlebar][inFullscreen] #titlebar .titlebar-button {
border-radius: 6px !important;
height: 34px !important;
width: 34px !important;
transition: background .3s;
}

/* OPTIONAL: Allow draging the window from headerbar buttons */
@media (-moz-bool-pref: "gnomeTheme.dragWindowHeaderbarButtons") {
:root[tabsintitlebar] #nav-bar *,
:root[tabsintitlebar] #titlebar .titlebar-button,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton {
:root[tabsintitlebar] #titlebar .titlebar-button {
-moz-window-dragging: drag;
}

Expand Down
3 changes: 2 additions & 1 deletion theme/parts/headerbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/* Headerbar */
#nav-bar {
background: var(--gnome-headerbar-background) !important;
border: 0 !important;
padding: 6px 3px !important;
}

Expand Down Expand Up @@ -46,4 +47,4 @@
#navigator-toolbox[inFullscreen] > * {
line-height: normal;
}
}
}