Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

docs: add archive notice #266

Merged
merged 3 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@

## [1.0.3](https://github.com/catppuccin/gtk/compare/v1.0.2...v1.0.3) (2024-06-01)

> [!IMPORTANT]
> **This will be the last release before this repository is archived.** To understand why, see [#262](https://github.com/catppuccin/gtk/issues/262).

### Performance Improvements

* improving performance, layout ([#215](https://github.com/catppuccin/gtk/issues/215)) ([cadc3e2](https://github.com/catppuccin/gtk/commit/cadc3e2ac24f93c6641f9f87ee5d044433c65ce7))

## [1.0.2](https://github.com/catppuccin/gtk/compare/v1.0.1...v1.0.2) (2024-05-27)


### Bug Fixes

* alt tab menu ([#209](https://github.com/catppuccin/gtk/issues/209)) ([cae57c8](https://github.com/catppuccin/gtk/commit/cae57c80f81fd1cc40fab2655109b09fa97103b9))

## [1.0.1](https://github.com/catppuccin/gtk/compare/v1.0.0...v1.0.1) (2024-05-27)


### Bug Fixes

* alt tab menu ([#209](https://github.com/catppuccin/gtk/issues/209)) ([cae57c8](https://github.com/catppuccin/gtk/commit/cae57c80f81fd1cc40fab2655109b09fa97103b9))
198 changes: 10 additions & 188 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,194 +1,16 @@
<h3 align="center">
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
Catppuccin for <a href="https://gtk.org/">GTK</a>
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
</h3>
<h2 align="center">🚧 This repository has been archived 🚧</h2>

<p align="center">
<a href="https://github.com/catppuccin/gtk/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/gtk?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/gtk/issues"><img src="https://img.shields.io/github/issues/catppuccin/gtk?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/gtk/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/gtk?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
</p>
GTK, while being one of our most popular ports, can only be described as a
nightmare to consistently theme and maintain. To understand why this port has
been archived, please see [#262](https://github.com/catppuccin/gtk/issues/262).

<p align="center">
<img src="assets/res.webp"/>
</p>
We recognise that users will still want to theme GTK in Catppuccin. This
repository has been heavily refactored to be more maintainable and
understandable by others. The usage and installation instructions can be found
in [docs/USAGE.md](/docs/USAGE.md) and a detailed description of the codebase
structure can be found in [docs/ARCHITECTURE.md](/docs/ARCHITECTURE.md).

This GTK theme is based on the [Colloid](https://github.com/vinceliuice/Colloid-gtk-theme) theme made by [vinceliuice](https://github.com/vinceliuice)

## Installation

This GTK theme requires:

- GTK `>=3.20`
- Python 3+

### Automated script

We provide a Python script to automate the process of installing the theme:

<!-- x-release-please-start-version -->

```bash
curl -LsSO "https://raw.githubusercontent.com/catppuccin/gtk/v1.0.3/install.py"
python3 install.py <flavor> <accent>
[catppuccin-gtk] [INFO] - Installation info:
flavor: mocha
accent: blue
dest: /home/<user>/.local/share/themes
link: False

remote_url: https://github.com/catppuccin/gtk/releases/download/v1.0.3/catppuccin-mocha-blue-standard+default.zip
[catppuccin-gtk] [INFO] - Starting download...
[catppuccin-gtk] [INFO] - Response status: 200
[catppuccin-gtk] [INFO] - Download finished, zip is valid
[catppuccin-gtk] [INFO] - Verifying download..
[catppuccin-gtk] [INFO] - Download verified
[catppuccin-gtk] [INFO] - Extracting...
[catppuccin-gtk] [INFO] - Extraction complete
[catppuccin-gtk] [INFO] - Theme installation complete!
```

### Arch Linux

With your favourite AUR helper, you can install your flavor of choice:

```bash
yay -S catppuccin-gtk-theme-<flavor>
paru -S catppuccin-gtk-theme-<flavor>
```

### Nix

We have created a Nix module ([catppuccin/nix](https://github.com/catppuccin/nix)) for theming apps under Nix, and recommend that you use it.
You can set up our Nix module for GTK with the following config:

```nix
{inputs, ...}: {
imports = [inputs.catppuccin.homeManagerModules.catppuccin];
gtk = {
enable = true;
catppuccin = {
enable = true;
flavor = "mocha";
accent = "pink";
size = "standard";
tweaks = [ "normal" ];
};
};
}
```

> [!TIP]
> For further information on the options available with our module, see the [full documentation](https://github.com/catppuccin/nix/blob/main/docs/home-manager-options.md#gtkcatppuccinenable).

Alternatively, if you are not using our Nix module, you can grab the theme from [nixpkgs/catppuccin-gtk](https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/themes/catppuccin-gtk/default.nix)

## Flatpak
Flatpak by default restricts access to themes, to allow access, use the following:
```bash
sudo flatpak override --filesystem=$HOME/.local/share/themes
```

After you've allowed access, set the theme, using the following:
```bash
# Change to suite your flavor / accent combination
export FLAVOR="mocha"
export ACCENT="mauve"

# Set the theme
sudo flatpak override --env=GTK_THEME="catppuccin-${FLAVOR}-${ACCENT}-standard+default"
```

### Manual installation

If your distro does not package our theme, and the installation script will not work for your use case, you can pull down releases and extract them yourself. You can find the [latest release on GitHub](https://github.com/catppuccin/gtk/releases/tag/v1.0.3).

```bash
cd ~/.local/share/themes

# Set the root URL
export ROOT_URL="https://https://github.com/catppuccin/gtk/releases/download"

# Change to the tag you want to download
export RELEASE="v1.0.3"

# Change to suite your flavor / accent combination
export FLAVOR="mocha"
export ACCENT="mauve"
curl -LsS "${ROOT_URL}/${RELEASE}/catppuccin-${FLAVOR}-${ACCENT}-standard+default.zip"

# Extract the catppuccin zip file
unzip catppuccin-${FLAVOR}-${ACCENT}-standard+default.zip

# Set the catppuccin theme directory
export THEME_DIR="$HOME/.local/share/themes/catppuccin-${FLAVOR}-${ACCENT}-standard+default"

# Optionally, add support for libadwaita
mkdir -p "${HOME}/.config/gtk-4.0" &&
ln -sf "${THEME_DIR}/gtk-4.0/assets" "${HOME}/.config/gtk-4.0/assets" &&
ln -sf "${THEME_DIR}/gtk-4.0/gtk.css" "${HOME}/.config/gtk-4.0/gtk.css" &&
ln -sf "${THEME_DIR}/gtk-4.0/gtk-dark.css" "${HOME}/.config/gtk-4.0/gtk-dark.css"
```

<!-- x-release-please-end -->

## Building

If our prebuilt offerings do not match your requirements, you will have to build the theme from source.

### Requirements

- Python 3+
- `sassc`, the Sass compiler
- `inkscape`, `optipng`, for rendering PNGs

> [!WARNING]
> We use a submodule to bring in colloid, the theme this theme is based on. You will need to clone
> with `git clone <url> --recurse-submodules` to bring in the submodule.

To build the theme, simply invoke `build.py`:

```bash
python3 build.py mocha --dest ./build -a rosewater --tweaks rimless
[catppuccin-gtk] [INFO] - Patches seem to be applied, remove "colloid/.patched" to force application (this may fail)
[catppuccin-gtk] [INFO] - Building temp tweaks file
[catppuccin-gtk] [INFO] - Inserting gnome-shell imports
[catppuccin-gtk] [INFO] - Building main theme
[catppuccin-gtk] [INFO] - Build info:
build_root: ./build
theme_name: catppuccin
flavor: mocha
accent: rosewater
size: standard
tweaks: Tweaks(tweaks=['rimless'])
[catppuccin-gtk] [INFO] - Building into './build/catppuccin-mocha-rosewater-standard+rimless'...
[catppuccin-gtk] [INFO] - Main build complete
[catppuccin-gtk] [INFO] - Bundling assets...
[catppuccin-gtk] [INFO] - Asset bundling done
[catppuccin-gtk] [INFO] - Done!
```

You can now find the built theme under `./build`. If you want to package the theme up as a zip instead, pass `--zip` to the build script.

## 💝 Thanks to

**Current maintainers**

- [nullishamy](https://github.com/nullishamy)
- [npv12](https://github.com/npv12)
- [ghostx31](https://github.com/ghostx31)
- [Syndrizzle](https://github.com/Syndrizzle)

**Contributions**

- [rubyowo](https://github.com/rubyowo) - CI and docs
- [braheezy](https://github.com/braheezy) - Instructions for the GDM theme

**Previous maintainer(s)**

- [sadrach-cl](https://github.com/sadrach-cl)
Good luck.

&nbsp;

Expand Down
34 changes: 19 additions & 15 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,31 @@ to give us more flexibility and control over the theme (see https://github.com/c

We have reimplemented Colloid's build system (previously implemented in Shell) in Python to make it easier to maintain, extend, and iterate on.
With this re-implementation, we have several distinct components in the system, described below:
1) Patching
2) SCSS
2) Assets

1. Patching
2. SCSS
3. Assets

## Patching

We patch our colloid submodule to add additional functionality and (temporarily) fix bugs found in Colloid.
We do this through `.patch` files, applied with `git apply` when the build script boots up.
We patch our Colloid submodule to add additional functionality and (temporarily) fix bugs found in Colloid.
We do this through `.patch` files, applied with `git apply` when the build script boots up.
The build script will store some state in the submodule to ensure it does not get needlessly patched.

The patches are stored in `patches/colloid`, and currently have our palette, the Plank theme, and a modification to Colloid
The patches are stored in [sources/patches/colloid](../sources/patches/colloid), and currently have our palette, the Plank theme, and a modification to Colloid
to allow all of our accents to load. When we find issues in Colloid, they will be patched through this system before being submitted upstream.

## SCSS

[This section assumes the directory root is at `colliod/src/sass`]
> [!IMPORTANT]
> This section assumes the directory root is at `sources/colloid/src/sass`

The bulk of the theme is implemented here, in SCSS. This is by far the most modular part of Colloid out of the box, requiring minimal patching from our end to function.
To start, we move the Colloid submodule into its own temporary copy. This is to allow us to run multiple builds in parallel, which would be otherwise impossible due to the
file changes necessitated by each build, described below.

With our temporary copy established, we generate the 'tweaks' for the build. This sets up a file (`_tweaks-temp.scss`) which describes the various knobs and dials for the build:

```scss
@import 'color-palette-catppuccin-mocha';

Expand All @@ -43,32 +46,33 @@ $rimless: 'false';
$window_button: 'mac';
$float: 'false';
```

We edit in the correct palette import for the flavour we're building, and set the other variables based on user / build state input.

With the tweaks setup, we can now invoke `sassc` (the SCSS compiler) to build all of our CSS files. We run all of the SCSS builds in parallel, for performance.
With the SCSS complete, we have now finished most of the work required for the build.


## Assets

We build our own assets to ship with the theme, based on the processes used in Colloid.
We build our own assets to ship with the theme, based on the processes used in Colloid.

We build assets for GTK, to include UI elements such as buttons, checkboxes,
etc. This is done through standard find-and-replace, as these assets are just SVGs. We do not support GTK2, so do not have to support the older PNG assets used there.

We also build assets for Xfce's Xfwm4, which are first patched from a source SVG, and then rendered through the `inkscape` CLI.
This operation is done once, at the start of a build process (e.g CI, to be reused for every subsequent build), or once until they change in the future for local development.
The script to generate these assets can be found at [`patches/xfwm4/generate_assets.py`](./patches/xfwm4/generate_assets.py)

We also build assets for Xfce's Xfwm4, which are first patched from a source SVG, and then rendered through the `inkscape` CLI.
This operation is done once, at the start of a build process (e.g CI, to be reused for every subsequent build), or once until they change in the future for local development.
The script to generate these assets can be found at [`sources/patches/xfwm4/generate_assets.py`](../sources/patches/xfwm4/generate_assets.py)

## CI integration

The CI system utilizes the build system, as described above, but with some unique parallelization elements to improve performance.
We have chosen to only build a limited subset of possible tweaks in CI, to constrain the time it takes to run.
We have chosen to only build a limited subset of possible tweaks in CI, to constrain the time it takes to run.

Currently, we build a matrix of:

- Flavor
- Accent

The CI will run all 4 flavours in parallel (see above for precautions taken to ensure this functions correctly), and build each accent serially.
We collate the logs for these runs into files so that they can be shown neatly at the end of the run.
We collate the logs for these runs into files so that they can be shown neatly at the end of the run.

15 changes: 0 additions & 15 deletions docs/CHANGELOG.md

This file was deleted.

Loading