Merge branch 'main' into patch-1

This commit is contained in:
tfuxu 2022-10-13 23:36:58 +02:00 committed by GitHub
commit e2512db571
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 212 additions and 132 deletions

View file

@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
name: Build flatpak
name: CI
on:
push:
branches:

View file

@ -28,5 +28,5 @@ jobs:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.ACCESS_TOKEN }}
issue-message: "Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the matrix room https://matrix.to/#/#Gradience-space:envs.net or the discord server https://discord.com/invite/rwNDGPJf"
pr-message: "Welcome on Gradience. 🥳 We really appreciate your pull request. The core team will review your issue as soon as possible. You can also join the matrix room https://matrix.to/#/#Gradience-space:envs.net or the discord server https://discord.com/invite/rwNDGPJf."
issue-message: "Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the matrix room https://matrix.to/#/#Gradience-space:envs.net or the discord server https://discord.com/invite/4njFDtfGEZ"
pr-message: "Welcome on Gradience. 🥳 We really appreciate your pull request. The core team will review your issue as soon as possible. You can also join the matrix room https://matrix.to/#/#Gradience-space:envs.net or the discord server https://discord.com/invite/4njFDtfGEZ."

336
README.md
View file

@ -1,135 +1,79 @@
<img align="left" alt="Gradience" src="https://github.com/GradienceTeam/Gradience/raw/main/data/icons/hicolor/scalable/apps/com.github.GradienceTeam.Gradience.svg">
<h1 align="center">
<img src="data/icons/hicolor/scalable/apps/com.github.GradienceTeam.Gradience.svg" alt="Gradience" width="192" height="192"/>
<br>
Gradience
</h1>
# Gradience
<p align="center">
<strong>Change the look of Adwaita, with ease</strong>
</p>
Change the look of Adwaita, with ease
<p align="center">
<a href="https://flathub.org/apps/details/com.github.GradienceTeam.Gradience">
<img width="200" alt="Download on Flathub" src="https://flathub.org/assets/badges/flathub-badge-i-en.svg"/>
</a>
<br>
</p>
![Gradience with Adwaita Light](https://github.com/GradienceTeam/Design/raw/main/Screenshots/colors.png)
<br>
<p align="center">
<a href="https://hosted.weblate.org/engage/GradienceTeam">
<img alt="Translation status" src="https://hosted.weblate.org/widgets/GradienceTeam/-/svg-badge.svg"/>
</a>
<a href="https://github.com/GradienceTeam/Gradience/actions/workflows/ci.yml">
<img alt="CI status" src="https://github.com/GradienceTeam/Gradience/actions/workflows/ci.yml/badge.svg"/>
</a>
<a href="https://flathub.org/apps/details/com.github.GradienceTeam.Gradience">
<img alt="Flathub downloads" src="https://img.shields.io/badge/dynamic/json?color=informational&label=downloads&logo=flathub&logoColor=white&query=%24.installs_total&url=https%3A%2F%2Fflathub.org%2Fapi%2Fv2%2Fstats%2Fcom.github.GradienceTeam.Gradience"/>
</a>
<a href="https://repology.org/project/gradience/versions">
<img alt="Packaging status" src="https://repology.org/badge/tiny-repos/gradience.svg">
</a>
</p>
<p align="center">
<a href="https://matrix.to/#/#Gradience:matrix.org">
<img alt="Chat on Matrix" src="https://img.shields.io/matrix/Gradience:matrix.org?label=matrix&logo=matrix"/>
</a>
<a href="https://discord.com/invite/4njFDtfGEZ">
<img alt="Chat on Discord" src="https://img.shields.io/discord/1013779899821064202?label=discord&logo=discord&logoColor=white"/>
</a>
</p>
<p align="center">
<img src="https://github.com/GradienceTeam/Design/raw/main/Covers/preview.png" alt="Preview"/>
</p>
Gradience is a tool for customizing Libadwaita applications and the adw-gtk3 theme.
> **Warning**
> [Gradience, stopthemingmy.app and Adwaita Developers](#gradience-stopthemingmyapp-and-adwaita-developers)
The main features of Gradience include the following:
- 🎨️ Changing any color of Adwaita theme
- 🖼️ Applying Material 3 color scheme from wallpaper
- 🎁️ Usage of other users presets
- ⚙️ Changing advanced options with CSS
- 🧩️ Extending functionality using plugins
<details>
<summary>More screenshots</summary>
<summary>📷️ More screenshots</summary>
![Monet Tab](https://github.com/GradienceTeam/Design/raw/main/Screenshots/monet_purple.png)
![Proof of work](https://github.com/GradienceTeam/Design/raw/main/Screenshots/proof_purple.png)
![Proof of Work](https://github.com/GradienceTeam/Design/raw/main/Screenshots/proof_purple.png)
</details>
[![Flatpak build](https://github.com/GradienceTeam/Gradience/actions/workflows/flatpak.yml/badge.svg)](https://github.com/GradienceTeam/Gradience/actions/workflows/flatpak.yml)
[![Copr build status](https://img.shields.io/badge/dynamic/json?color=blue&label=copr&query=builds.latest.state&url=https%3A%2F%2Fcopr.fedorainfracloud.org%2Fapi_3%2Fpackage%3Fownername%3Dlyessaadi%26projectname%3Dgradience%26packagename%3Dgradience%26with_latest_build%3DTrue)](https://copr.fedorainfracloud.org/coprs/lyessaadi/gradience/package/gradience/)
[![Flathub](https://img.shields.io/badge/dynamic/json?color=informational&label=downloads&logo=flathub&logoColor=white&query=%24.installs_total&url=https%3A%2F%2Fflathub.org%2Fapi%2Fv2%2Fstats%2Fcom.github.GradienceTeam.Gradience)](https://beta.flathub.org/apps/details/com.github.GradienceTeam.Gradience)
[![Translate on Weblate](https://hosted.weblate.org/widgets/GradienceTeam/-/svg-badge.svg)](https://hosted.weblate.org/engage/GradienceTeam)
[![Chat on Matrix](https://img.shields.io/matrix/Gradience:matrix.org?label=matrix&logo=matrix)](https://matrix.to/#/#Gradience:matrix.org)
[![Chat on Discord](https://img.shields.io/discord/1013779899821064202?label=discord&logo=discord&logoColor=white)](https://discord.com/invite/MYa8Sr7btJ)
<!--[![Flatpak build - Nightly](https://github.com/GradienceTeam/Gradience/actions/workflows/flatpak-nightly.yml/badge.svg)](https://github.com/GradienceTeam/Gradience/actions/workflows/flatpak-nightly.yml)-->
## Download
Gradience is available on Flathub.
<a href="https://beta.flathub.org/apps/details/com.github.GradienceTeam.Gradience">
<img width="200" alt="Download on Flathub" src="https://flathub.org/assets/badges/flathub-badge-i-en.svg"/>
</a>
## Building and Installing
Gradience can be installed using multiple methods.
- Flathub (Recommended)
- As RPM package
- As DEB package (not available yet)
- From AUR
### Flatpak
Gradience is available on Flathub. You can install it using the following command:
```bash
flatpak install flathub com.github.GradienceTeam.Gradience
```
### COPR
Gradience is available on COPR. You can install it using the following command:
```bash
dnf copr enable lyessaadi/gradience
dnf install gradience
```
### Debian (And derivates)
> **Warning**
> Not available yet. If you want, submit a PR.
### AUR
Gradience is available on AUR. You can install it using the following command:
```bash
yay -S gradience # or gradience-git
```
### Building from source
#### Requirements
- Python 3 `python`
- PyGObject `python-gobject`
- Blueprint [`blueprint-compiler`](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/setup.html)
- GTK 4 `gtk4`
- Libadwaita (>= 1.2.alpha) `libadwaita`
- Libsoup 3 (>= 3.2.0) `libsoup`
- Meson `meson`
- Ninja `ninja-build`
Install required Python libraries:
```sh
pip install -r requirements.txt
```
### Global installation
```sh
git clone https://github.com/GradienceTeam/Gradience.git
cd Gradience
meson builddir --prefix=/usr/local
sudo ninja -C builddir install
```
### Local build (for testing and development purposes)
```sh
git clone https://github.com/GradienceTeam/Gradience.git
cd Gradience
meson builddir
meson configure builddir -Dprefix="$(pwd)/builddir"
ninja -C builddir install
ninja -C builddir run
```
## 🎨️ Theming setup
> **Note**
> During testing and developement, as a convenience, you can use the `local.sh` script to quickly rebuild local builds.
> You can go to `Preferences` and apply overrides for Flatpak
### Building using flatpak-builder
1. Open Terminal
2. Run `git clone https://github.com/GradienceTeam/Gradience.git && cd Gradience`
3. Install the `43` version of GNOME runtime and SDK: `flatpak install org.gnome.Sdk//43 org.gnome.Platform//43`
4. Run: `flatpak-builder --install --user --force-clean repo/ build-aux/flatpak/com.github.GradienceTeam.Gradience.Devel.json`
Alternatively, open the project with GNOME Builder, then build and run it.
## Theming Setup
> **Note**
> You can also go to `Preferences` and apply overrides for Flatpak
<details>
<summary>🪛️ Manual setup</summary>
### Libadwaita applications
@ -151,43 +95,168 @@ Use [this guide](https://github.com/lassekongo83/adw-gtk3/blob/main/gtk4.md) to
- Run `sudo flatpak override --filesystem=xdg-config/gtk-3.0` or
- Use [Flatseal](https://github.com/tchx84/Flatseal) and adding `xdg-config/gtk-3.0` to **Other files** in the **Filesystem** section of **All Applications**
## Revert Theming
</details>
### Using app:
## 🔄 Revert Theming
Press on the menu button in the headerbar and press `Reset Applied Color Scheme`
> **Note**
> You can press on the menu button in the headerbar and press `Reset Applied Color Scheme`
> ![Main Gradience menu](https://raw.githubusercontent.com/GradienceTeam/Design/main/Screenshots/hamburger_menu.png)
![Main Gradience menu](https://raw.githubusercontent.com/GradienceTeam/Design/main/Screenshots/hamburger_menu.png)
<details>
<summary>🪛️ Manual revert</summary>
### Manually:
Remove GTK 3 and GTK 4 configs:
### Remove GTK 3 and GTK 4 configs
- Run `rm -rf .config/gtk-4.0 .config/gtk-3.0`
Remove adw-gtk3 theme:
### Remove adw-gtk3 theme
- Run `flatpak uninstall adw-gtk3` to remove Flatpak adw-gtk3 theme
- Run `rm -rf .themes/adw-gtk3 .themes/adw-gtk3-dark .local/share/themes/adw-gtk3 .local/share/themes/adw-gtk3-dark` to remove local adw-gtk3 theme
Reset Flatpak overrides:
### Reset Flatpak overrides
- Run `sudo flatpak override --reset`
> **Warning**
> This will reset all Flatpak overrides, such as Firefox Wayland override
## Roadmap
</details>
See [`ROADMAP.md`](ROADMAP.md)
## Contribute
## 📦️ Alternative installation methods
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more informations and a list of contributors
> **Warning**
> The main installation method is Flatpak from Flathub
### COPR
Gradience is available on COPR. You can install it using the following command:
```shell
dnf copr enable lyessaadi/gradience
dnf install gradience
```
### Debian (And derivates)
> **Warning**
> Not available yet.
### AUR
Gradience is available on AUR:
Using [Paru](https://github.com/morganamilo/paru):
```shell
paru -S gradience
```
For latest changes:
```shell
paru -S gradience-git
```
<details>
<summary>🪛️ Without AUR helpers</summary>
```shell
git clone https://aur.archlinux.org/gradience.git
cd gradience
makepkg -sic
```
For latest changes:
```shell
git clone https://aur.archlinux.org/gradience-git.git
cd gradience-git
makepkg -sic
```
</details>
## 🏗️ Building from source
### GNOME Builder
GNOME Builder is the environment used for developing this application.
It can use Flatpak manifests to create a consistent building and running
environment cross-distro. Thus, it is highly recommended you use it.
1. Download [GNOME Builder](https://flathub.org/apps/details/org.gnome.Builder).
2. In Builder, click the "Clone Repository" button at the bottom, using `https://github.com/GradienceTeam/Gradience.git` as the URL.
3. Click the build button at the top once the project is loaded.
### Meson
#### Prerequisites
The following packages are required to build Gradience:
- Python 3 `python`
- PyGObject `python-gobject`
- Blueprint [`blueprint-compiler`](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/setup.html)
- GTK 4 `gtk4`
- Libadwaita (>= 1.2.alpha) `libadwaita`
- Libsoup 3 (>= 3.2.0) `libsoup`
- Meson `meson`
- Ninja `ninja-build`
Required Python libraries:
```shell
pip install -r requirements.txt
```
#### Build Instruction
##### Global installation
```shell
git clone https://github.com/GradienceTeam/Gradience.git
cd Gradience
meson builddir --prefix=/usr/local
sudo ninja -C builddir install
```
##### Local build (for testing and development purposes)
```shell
git clone https://github.com/GradienceTeam/Gradience.git
cd Gradience
meson builddir
meson configure builddir -Dprefix="$(pwd)/builddir"
ninja -C builddir install
ninja -C builddir run
```
> **Note**
> During testing and developement, as a convenience, you can use the `local.sh` script to quickly rebuild local builds.
## 🙌 Contribute to Gradience
### Code
Fork this repository, then create a push request when you're done adding features or fixing bugs.
### Localization
You can help Gradience translate into your native language. If you found any typos
or think you can improve a translation, you can use the [Weblate](https://hosted.weblate.org/engage/GradienceTeam) platform.
[![Translations](https://hosted.weblate.org/widgets/GradienceTeam/-/gradience/287x66-white.png)](https://hosted.weblate.org/engage/GradienceTeam/)
## ✨️ Contributors
[![Contributors](https://contrib.rocks/image?repo=GradienceTeam/Gradience)](https://github.com/GradienceTeam/Gradience/graphs/contributors)
## About Name
## 🏷️ About the Name
Gradience was originally named Adwaita Manager.
@ -195,6 +264,17 @@ You can see the meaning of Gradience on [Wiktionary](https://en.wiktionary.org/w
The icon represents: _A Paint Roller repainting an Adwaita window, keeping it's functionality._
## Gradience, [stopthemingmy.app](https://stopthemingmy.app) and Adwaita Developers
## 🌱️ Gradience, [stopthemingmy.app](https://stopthemingmy.app) and Adwaita Developers
Gradience Team is not against [stopthemingmy.app](https://stopthemingmy.app) and Adwaita Developers idea, Gradience is a tool for tinkers that want to theme their desktops at their liking, and not a tool for distributions to change theme in them by default, Gradience Team agrees with importance of unified look of Adwaita to make sure that all apps work right and Developers have unified and stable tool for creating their apps.
## 💝 Acknowledgment
Special thanks to:
- Original author of Gradience, [Artyom Fomin](https://github.com/ArtyIF) for creating this project
- [Weblate](https://weblate.org) for providing translation platform
This README is based on README from [Kooha](https://github.com/SeaDve/Kooha) by [Dave Patrick Caberto](https://github.com/SeaDve)

View file

@ -80,7 +80,7 @@ def download_preset(name, repo_name, repo) -> None:
buglog(f"Error with decoding JSON data. Exc: {e}")
return False, False
data = json.dumps(raw)
data = json.dumps(raw, indent=4)
try:
with open(