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

Commit dfc0e19

Browse files
committed
docs(ARCHITECTURE): format + update links
1 parent 82036f6 commit dfc0e19

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

docs/ARCHITECTURE.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,31 @@ to give us more flexibility and control over the theme (see https://github.com/c
66

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

1314
## Patching
1415

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

19-
The patches are stored in `patches/colloid`, and currently have our palette, the Plank theme, and a modification to Colloid
20+
The patches are stored in [sources/patches/colloid](../sources/patches/colloid), and currently have our palette, the Plank theme, and a modification to Colloid
2021
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.
2122

2223
## SCSS
2324

24-
[This section assumes the directory root is at `colliod/src/sass`]
25+
> [!IMPORTANT]
26+
> This section assumes the directory root is at `sources/colloid/src/sass`
2527
2628
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.
2729
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
2830
file changes necessitated by each build, described below.
2931

3032
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:
33+
3134
```scss
3235
@import 'color-palette-catppuccin-mocha';
3336

@@ -43,32 +46,33 @@ $rimless: 'false';
4346
$window_button: 'mac';
4447
$float: 'false';
4548
```
49+
4650
We edit in the correct palette import for the flavour we're building, and set the other variables based on user / build state input.
4751

4852
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.
4953
With the SCSS complete, we have now finished most of the work required for the build.
5054

51-
5255
## Assets
5356

54-
We build our own assets to ship with the theme, based on the processes used in Colloid.
57+
We build our own assets to ship with the theme, based on the processes used in Colloid.
5558

5659
We build assets for GTK, to include UI elements such as buttons, checkboxes,
5760
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.
5861

59-
We also build assets for Xfce's Xfwm4, which are first patched from a source SVG, and then rendered through the `inkscape` CLI.
60-
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.
61-
The script to generate these assets can be found at [`patches/xfwm4/generate_assets.py`](./patches/xfwm4/generate_assets.py)
62-
62+
We also build assets for Xfce's Xfwm4, which are first patched from a source SVG, and then rendered through the `inkscape` CLI.
63+
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.
64+
The script to generate these assets can be found at [`sources/patches/xfwm4/generate_assets.py`](../sources/patches/xfwm4/generate_assets.py)
6365

6466
## CI integration
6567

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

6971
Currently, we build a matrix of:
72+
7073
- Flavor
7174
- Accent
7275

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

0 commit comments

Comments
 (0)