Skip to content

Commit

Permalink
refactor: build themes with whiskers (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
dacid44 authored Nov 16, 2024
1 parent a00b786 commit fea2e50
Show file tree
Hide file tree
Showing 72 changed files with 8,021 additions and 854 deletions.
95 changes: 31 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,85 +36,52 @@

## Usage

### COSMIC Desktop Appearance

1. Clone this repository locally
Clone this repository locally:

```bash
git clone https://github.com/catppuccin/cosmic-desktop.git
```

2. Open COSMIC Settings and navigate to `Desktop -> Appearance`
3. Click `Import` and browse to where you cloned this repository
4. Select the desired theme under `cosmic-settings`
Follow the instructions below to apply the theme to your desktop and terminal.

### COSMIC Terminal Color Scheme
### COSMIC Desktop Appearance

1. Clone this repository locally
2. Open COSMIC Terminal and navigate to `View -> Color schemes...`
3. Click `Import` and browse to where you cloned this repository
4. Select the desired theme under `cosmic-term`
1. Open COSMIC Settings and navigate to `Desktop -> Appearance`.
2. Click `Import` and browse to where you cloned this repository.
3. Select your desired theme from the [themes/cosmic-settings](./themes/cosmic-settings) directory.

### Generating Custom Configs
### COSMIC Terminal Color Scheme

`generate.py` allows you to generate custom configs for COSMIC Desktop.
You can use this script to generate a custom config with your preferred colors and other settings.
1. Open COSMIC Terminal and navigate to `View -> Color schemes...`.
2. Click `Import` and browse to where you cloned this repository.
3. Select your desired theme from the [themes/cosmic-term](./themes/cosmic-term) directory.

1. To use the script, you need to have `python` and `pip` installed on your system.
2. Clone this repository locally and cd into it
### Generating Custom Configurations

```bash
git clone https://github.com/catppuccin/cosmic-desktop.git
cd cosmic-desktop
```
The themes included in this repository are generated via [catppuccin/whiskers](https://github.com/catppuccin/whiskers).
To learn how to modify the generated themes, follow the instructions listed below:

3. Create a virtual environment and install the required dependencies
1. Install [catppuccin/whiskers](https://github.com/catppuccin/whiskers#installation).
2. Navigate to the root of this respository.
3. Run `whiskers` with `--overrides` set to a JSON object with your desired options, for example:

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
```bash
whiskers templates/cosmic-settings.tera --overrides='{"roundness": "square", "window_hint_color": "peach", "bg_alpha": 0.8}'
```

4. Run the script with your desired options
#### Available Settings

```bash
$ python generate.py --help
usage: generate.py [-h] [--accent [accent color]]
[--bg-alpha [background alpha]] [--frosted frosted effect]
[--outer-gap [outer gap size]]
[--inner-gap [inner gap size]]
[--active-hint [active hint size]]
[--roundness [roundness]]
[--window-hint-color [window hint color]]
[theme flavor]

Generate a Catppuccin theme for Cosmic Desktop

positional arguments:
theme flavor The flavor of the theme to generate. Can be 'mocha',
'frappe', 'macchiato', or 'latte'.

options:
-h, --help show this help message and exit
--accent [accent color], -a [accent color]
The accent color to use for the theme.
--bg-alpha [background alpha], -b [background alpha]
The alpha value of the background color.
--frosted frosted effect, -f frosted effect
Whether to use frosted glass effect for the theme.
--outer-gap [outer gap size], -o [outer gap size]
The size of the outer gap.
--inner-gap [inner gap size], -i [inner gap size]
The size of the inner gap.
--active-hint [active hint size], -ah [active hint size]
The size of the active hint.
--roundness [roundness], -r [roundness]
The roundness of the corners. Can be 'round',
'slightly round', or 'square'.
--window-hint-color [window hint color], -whc [window hint color]
The color of the window hint.
```
- `accent`: The primary/accent color. May be any of the Catppuccin palette color names, or a list of color names. Defaults to rendering a version of the theme for every palette accent color.
- `roundness`: The roundness of the corners. Can be `round`, `slightlyround`, or `square`. Defaults to `round`.
- `window_hint_color`: The color of the window hint. May be any of the Catppuccin palette color names. Defaults to matching the accent color.
- `bg_alpha`: The alpha value (opacity) of the window background color. Must be a float between `0.0` and `1.0`. Defaults to `1.0`.
- `frosted`: Enables blurred transparency. Must be a boolean. Defaults to `false`.
- `outer_gap_size`: Compositor outer gap size. Must be an integer. Defaults to `0`.
- `inner_gap_size`: Compositor inner gap size. Must be an integer. Defaults to `8`.
- `active_hint_size`: Compositor active window hint outline width. Must be an integer. Defaults to `3`.

You can also use `whiskers` with `--flavor` to only render a single flavor (`latte`, `frappe`, `macchiato`, `mocha`).
By default, a version of the theme for all 4 flavors will be rendered.

## 💝 Thanks to

Expand Down
87 changes: 0 additions & 87 deletions cosmic-term.py

This file was deleted.

37 changes: 0 additions & 37 deletions cosmic-term/Catppuccin-Frappe.ron

This file was deleted.

37 changes: 0 additions & 37 deletions cosmic-term/Catppuccin-Latte.ron

This file was deleted.

37 changes: 0 additions & 37 deletions cosmic-term/Catppuccin-Macchiato.ron

This file was deleted.

37 changes: 0 additions & 37 deletions cosmic-term/Catppuccin-Mocha.ron

This file was deleted.

Loading

0 comments on commit fea2e50

Please sign in to comment.