Compare commits

...

15 Commits

Author SHA1 Message Date
Isabel
fb3ceb6211 chore: update colloid (#182) 2024-05-19 17:52:42 +01:00
Isabel
4b73517739 refactor: nix flake (#180) 2024-05-19 17:51:50 +01:00
Hammy
0c3e8817da build: add nix shell (#176) 2024-04-30 21:08:39 +01:00
Hammy
baecd17698 docs(issue_templates): use issue forms (#175) 2024-04-30 20:25:27 +01:00
Isabel
877e75568c docs(README): add info for using catppuccin/nix (#174) 2024-04-30 19:44:32 +01:00
Hammy
b353190bef ci(release): update action versions and set draft (#173) 2024-04-30 19:01:28 +01:00
Minh Hieu
558953cdd2 fix(status_bar): correctly apply latte colours (#166)
This commit removes the hardcoded string "latte"
and fixes latte from not properly applying
to the status bar.

---------

Co-authored-by: Isabel <isabel@isabelroses.com>
2024-04-30 18:37:42 +01:00
Isabel
9e82be620c docs(issue_template): remote outdated comment (#172) 2024-04-30 17:55:05 +01:00
Yomi Ikuru
662a18a2d6 docs(README): update Nix home-manager example (#170) 2024-04-30 17:48:45 +01:00
Pranav Nedungadi
9da440ced6 Merge pull request #169 from OscarM3615/main
chore(colloid): update submodule
2024-04-20 08:04:14 +05:30
Óscar Miranda
42abad4561 chore(colloid): update submodule 2024-04-17 12:12:51 -06:00
Himanshu
edef76faba chore: update colloid submodule 2024-04-06 20:44:16 +05:30
te_hieuhm1
e7314059e2 chores: update colloid 2024-04-06 15:05:49 +07:00
Himanshu
355e12387f fix(install): fix catppuccin python in install script 2024-04-01 23:40:14 +05:30
Jonathan Conder
7000de38a1 fix(install): update catppuccin dependency 2024-03-23 09:05:08 +13:00
17 changed files with 288 additions and 200 deletions

View File

@@ -1,33 +0,0 @@
---
name: Bug report
about: Create a bug report about the GTK theme.
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Mention your distribution and your theme version**
Please mention your Linux distribution and the theme version you've installed.
**Select how you installed the theme**
- [ ] GitHub Releases
- [ ] AUR package
- [ ] Nixpkg
- [ ] Using the python install script <!-- If you installed using the python script, please mention the command that you ran for installation. -->
- [ ] Flatpak
**Symlinked the gtk-4.0 folder?**
Have you symlinked the `gtk-4.0` folder as mentioned in the [README](https://github.com/catppuccin/gtk/blob/e907775723eb68a5628c1bcd718b9d822cea9aee/README.md?plain=1#L85-L93)? **This is not applicable for users who have installed the theme with the Nixpkg.**
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If possible, please share screenshots of the bug you've encountered.
**Additional context**
Please mention any additional context that might be applicable.

53
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Bug Report
description: Report your bugs with the theme here!
labels: [bug]
body:
- type: checkboxes
attributes:
label: Is there an existing issue outlining your problem?
description: Please search to see if an issue already exists for your problem.
options:
- label: I have searched the existing issues and they do not solve my problem.
required: true
- type: textarea
attributes:
label: Describe the bug.
description: Also tell us, what do you expect to see?
placeholder: The tabs are darker than they should be...
validations:
required: true
- type: textarea
attributes:
label: Attach screenshots.
description: If applicable, attach screenshots which clearly highlight the bug.
- type: dropdown
id: installation_method
attributes:
label: How did you install the theme?
options:
- GitHub Release
- AUR Package
- catppuccin/nix
- Nixpkgs
- Flatpak
- From source (Python script)
validations:
required: true
- type: checkboxes
attributes:
label: If using GTK4, have you symlinked the "gtk-4.0" folder?
description: "The instructions for symlinking are described in the [README](https://github.com/catppuccin/gtk/tree/877e75568c9bb0d57c7ddda85b246fa17af45e57?tab=readme-ov-file#for-gtk-4-users)."
options:
- label: I have symlinked the `gtk-4.0` folder.
required: false
- type: input
attributes:
label: What GNOME version are you seeing the bug on?
description: "Follow [GNOME's instructions](https://help.gnome.org/users/gnome-help/stable/gnome-version.html.en) to find out what version you are running."
placeholder: "GNOME Version 42.9"
validations:
required: true
- type: textarea
attributes:
label: Any additional comments?
description: Add any information that hasn't been covered in the previous sections!

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Community Discord
url: https://discord.com/servers/catppuccin-907385605422448742
about: Chat to other community members!

18
.github/ISSUE_TEMPLATE/enhancement.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Enhancement Issue
description: Request improvements to the theme here!
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Is there an existing issue outlining your improvement?
description: Please search to see if your improvement has already been raised as an issue.
options:
- label: I have searched the existing issues and my improvement has not been raised yet.
required: true
- type: textarea
attributes:
label: What would you like to see added and/or changed?
description: Make sure to mention why you think this is an improvement!
placeholder: I'd like to have an extra configuration option for...
validations:
required: true

18
.github/ISSUE_TEMPLATE/meta.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Meta Issue
description: Raise any issue regarding the repository here!
labels: [meta]
body:
- type: checkboxes
attributes:
label: Is there an existing issue outlining your problem?
description: Please search to see if an issue already exists for your problem.
options:
- label: I have searched the existing issues and they do not solve my problem.
required: true
- type: textarea
attributes:
label: Describe the issue.
description: Bugs should be raised under a [Bug Report](https://github.com/catppuccin/gtk/issues/new?assignees=&labels=bug&template=bug.yml).
placeholder: The README is missing crucial information such as...
validations:
required: true

View File

@@ -1,20 +1,19 @@
name: "GTK theme release"
name: "Release"
on:
on:
push:
tags:
- "*"
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
@@ -25,6 +24,7 @@ jobs:
- name: Generate themes
run: python ./install.py all -a all --zip -d $PWD/releases --recreate-asset
- name: Add zips to release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
draft: true
files: ./releases/*.zip

View File

@@ -49,56 +49,29 @@ yay -S catppuccin-gtk-theme-mocha catppuccin-gtk-theme-macchiato catppuccin-gtk-
### For Nix users
The [catppuccin-gtk](https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/themes/catppuccin-gtk/default.nix) package in Nixpkgs allows you to specify the accents, size, tweaks and variant (flavour) of the theme by overriding the package.
By default, the variant is `frappe`, the accent is `blue`, the size is `standard`, and no tweaks are enabled. To change them, override the package. A list of valid choices are available in the package definition [here](https://github.com/NixOS/nixpkgs/blob/7ce8e7c4cf90492a631e96bcfe70724104914381/pkgs/data/themes/catppuccin-gtk/default.nix#L16).
Example:
We suggest you use [catppuccin/nix](https://github.com/catppuccin/nix).
Alternatively, you can use [catppuccin-gtk](https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/themes/catppuccin-gtk/default.nix) from nixpkgs.
```nix
# as per wiki examples
environment.systemPackages = with pkgs; [
...
(catppuccin-gtk.override {
accents = [ "pink" ]; # You can specify multiple accents here to output multiple themes
size = "compact";
tweaks = [ "rimless" "black" ]; # You can also specify multiple tweaks here
variant = "macchiato";
})
...
];
```
{inputs, ...}: {
imports = [inputs.catppuccin.homeManagerModules.catppuccin];
To use it in home-manager:
```nix
# home.nix
{
pkgs,
...
}: {
gtk = {
enable = true;
theme = {
name = "Catppuccin-Macchiato-Compact-Pink-Dark";
package = pkgs.catppuccin-gtk.override {
accents = [ "pink" ];
size = "compact";
tweaks = [ "rimless" "black" ];
variant = "macchiato";
};
catppuccin = {
enable = true;
flavor = "mocha";
accent = "pink";
size = "standard";
tweaks = [ "normal" ];
};
};
}
# Now symlink the `~/.config/gtk-4.0/` folder declaratively:
xdg.configFile = {
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
};
```
> [!TIP]
> For further information on the options available, see the [full documentation](https://github.com/catppuccin/nix/blob/main/docs/home-manager-options.md#gtkcatppuccinenable).
### For GTK 4 users
To theme GTK 4 applications you have to manually symlink the `~/.config/gtk-4.0/` to the themes folder. Use the following commands

Submodule colloid updated: 6cf7ea0237...1a13048ea1

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1715961556,
"narHash": "sha256-+NpbZRCRisUHKQJZF3CT+xn14ZZQO+KjxIIanH3Pvn4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4a6b83b05df1a8bd7d99095ec4b4d271f2956b64",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

18
flake.nix Normal file
View File

@@ -0,0 +1,18 @@
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs =
{ nixpkgs, ... }:
let
forAllSystems =
function:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
system: function nixpkgs.legacyPackages.${system}
);
in
{
devShells = forAllSystems (pkgs: {
default = pkgs.callPackage ./shell.nix { };
});
};
}

View File

@@ -9,7 +9,7 @@ import argparse
import os
import subprocess
from scripts.ctp_colors import ctp_colors, get_all_accent
from scripts.ctp_colors import get_all_accent, get_all_flavors
from scripts.create_theme import create_theme
from scripts.var import theme_name, work_dir
@@ -86,12 +86,12 @@ parser.add_argument("--recreate-asset",
args = parser.parse_args()
if "all" in args.flavor:
flavors = ctp_colors.keys()
flavors = get_all_flavors()
else:
flavors = args.flavor
if "all" in args.accent:
accents = get_all_accent().keys()
accents = get_all_accent()
else:
accents = args.accent

View File

@@ -1 +1 @@
catppuccin>=1.1.1,<2.0.0
catppuccin>=2.0.0

View File

@@ -1,16 +1,16 @@
from catppuccin import PALETTE
import os
import shutil
import subprocess
from typing import List
from scripts.ctp_colors import ctp_colors
from scripts.patches import recreate_xfwm4_assets
from scripts.recolor import recolor
from scripts.utils import replacetext, zip_multiple_folders
from scripts.var import def_color_map, repo_dir, src_dir, theme_name, work_dir
def create_theme(types: List[str], accents: List[str], dest: str, link: bool = False,
def create_theme(types: List[str], accents: List[str], dest: str, link: bool = False,
name: str = theme_name, size: str = "standard", tweaks=[], zip = False, recreate_assets = False) -> None:
try:
@@ -24,7 +24,7 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
for accent in accents:
# Recolor colloid wrt our selection like mocha. latte
recolor(ctp_colors[type], accent)
recolor(getattr(PALETTE, type), accent)
theme_style: str = "light" if type == "latte" else "dark"
install_cmd: str = f"./install.sh -c {theme_style} -s {size} -n {name} -d {dest} -t {def_color_map[accent]}"
if tweaks:

View File

@@ -1,16 +1,11 @@
from catppuccin import Flavour
from catppuccin import PALETTE
import dataclasses
def get_all_flavors():
return [f.name for f in dataclasses.fields(PALETTE)]
ctp_colors = {
"latte": Flavour.latte(),
"mocha": Flavour.mocha(),
"frappe": Flavour.frappe(),
"macchiato": Flavour.macchiato()
}
def get_all_accent():
accent = {}
for key, value in Flavour.latte().__dict__.items():
if key not in ['white', 'black', 'text', 'subtext0', 'subtext1', 'overlay0', 'overlay1', 'overlay2', 'surface0', 'surface1', 'surface2', 'base', 'mantle', 'crust']:
accent[key] = value
return accent
exclude = ['white', 'black', 'text', 'subtext0', 'subtext1', 'overlay0', 'overlay1', 'overlay2', 'surface0', 'surface1', 'surface2', 'base', 'mantle', 'crust']
return [f.name for f in dataclasses.fields(PALETTE.latte.colors) if f.name not in exclude]

View File

@@ -1,69 +1,69 @@
from catppuccin import Flavour
from catppuccin import PALETTE
from .utils import replacetext, replaceAllText
from .var import (def_accent_dark, def_accent_light, def_color_map, src_dir, work_dir)
def recolor_accent(flavor, accent: str = "blue"):
def recolor_accent(colors, accent: str = "blue"):
"""
Recolors the accent color in a file.
flavor:
colors:
The flavor to recolor to. Like mocha, frappe, latte, etc.
accent:
The accent color to replace. Defaults to Blue
"""
print(f"Recoloring all accents")
replaceAllText( # Recolor as per base for dark theme.
work_dir, def_accent_dark[def_color_map[accent]], flavor.__dict__[accent].hex)
work_dir, def_accent_dark[def_color_map[accent]], getattr(colors, accent).hex)
replaceAllText( # Recolor as per accent for light. Hard code it as latte
work_dir, def_accent_light[def_color_map[accent]], Flavour.latte().__dict__[accent].hex)
work_dir, def_accent_light[def_color_map[accent]], getattr(PALETTE.latte.colors, accent).hex)
def recolor_firefox(flavor, accent: str = "blue"):
def recolor_firefox(colors, accent: str = "blue"):
"""
Recolor the custom gnomish firefox to catpuccin color
"""
firefox_color_file_dark = f"{src_dir}/other/firefox/chrome/Colloid/colors/dark.css"
firefox_color_file_light = f"{src_dir}/other/firefox/chrome/Colloid/colors/light.css"
replacetext(firefox_color_file_light, "2e3436", flavor.base.hex)
replacetext(firefox_color_file_light, "fafafa", Flavour.latte().base.hex)
replacetext(firefox_color_file_light, "f2f2f2", flavor.crust.hex)
replacetext(firefox_color_file_light, "303030", Flavour.mocha().base.hex)
replacetext(firefox_color_file_light, "ffffff", flavor.base.hex)
replacetext(firefox_color_file_light, "5b9bf8", flavor.surface0.hex)
replacetext(firefox_color_file_light, "3c84f7", flavor.__dict__[accent].hex)
replacetext(firefox_color_file_light, "dedede", flavor.surface1.hex)
replacetext(firefox_color_file_light, "f0f0f0", flavor.surface0.hex)
replacetext(firefox_color_file_light, "FAFAFA", flavor.surface1.hex)
replacetext(firefox_color_file_light, "fafafa", flavor.surface0.hex)
replacetext(firefox_color_file_light, "323232", flavor.mantle.hex)
replacetext(firefox_color_file_light, "d5d0cc", flavor.subtext1.hex)
replacetext(firefox_color_file_light, "#2e3436", colors.base.hex)
replacetext(firefox_color_file_light, "#fafafa", PALETTE.latte.colors.base.hex)
replacetext(firefox_color_file_light, "#f2f2f2", colors.crust.hex)
replacetext(firefox_color_file_light, "#303030", PALETTE.mocha.colors.base.hex)
replacetext(firefox_color_file_light, "#ffffff", colors.base.hex)
replacetext(firefox_color_file_light, "#5b9bf8", colors.surface0.hex)
replacetext(firefox_color_file_light, "#3c84f7", getattr(colors, accent).hex)
replacetext(firefox_color_file_light, "#dedede", colors.surface1.hex)
replacetext(firefox_color_file_light, "#f0f0f0", colors.surface0.hex)
replacetext(firefox_color_file_light, "#FAFAFA", colors.surface1.hex)
replacetext(firefox_color_file_light, "#fafafa", colors.surface0.hex)
replacetext(firefox_color_file_light, "#323232", colors.mantle.hex)
replacetext(firefox_color_file_light, "#d5d0cc", colors.subtext1.hex)
# Buttons
replacetext(firefox_color_file_light, "fd5f51", flavor.red.hex)
replacetext(firefox_color_file_light, "38c76a", flavor.green.hex)
replacetext(firefox_color_file_light, "fdbe04", flavor.yellow.hex)
replacetext(firefox_color_file_light, "#fd5f51", colors.red.hex)
replacetext(firefox_color_file_light, "#38c76a", colors.green.hex)
replacetext(firefox_color_file_light, "#fdbe04", colors.yellow.hex)
# Dark
replacetext(firefox_color_file_dark, "eeeeee", flavor.base.hex)
replacetext(firefox_color_file_dark, "2c2c2c", Flavour.mocha().base.hex)
replacetext(firefox_color_file_dark, "242424", flavor.crust.hex)
replacetext(firefox_color_file_dark, "ffffff", Flavour.latte().base.hex)
replacetext(firefox_color_file_dark, "383838", flavor.base.hex)
replacetext(firefox_color_file_dark, "3584e4", flavor.surface0.hex)
replacetext(firefox_color_file_dark, "78aeed", flavor.__dict__[accent].hex)
replacetext(firefox_color_file_dark, "363636", flavor.surface1.hex)
replacetext(firefox_color_file_dark, "404040", flavor.surface0.hex)
replacetext(firefox_color_file_dark, "4F4F4F", flavor.surface1.hex)
replacetext(firefox_color_file_dark, "444444", flavor.surface0.hex)
replacetext(firefox_color_file_dark, "323232", flavor.mantle.hex)
replacetext(firefox_color_file_dark, "919191", flavor.subtext1.hex)
replacetext(firefox_color_file_dark, "#eeeeee", colors.base.hex)
replacetext(firefox_color_file_dark, "#2c2c2c", PALETTE.mocha.colors.base.hex)
replacetext(firefox_color_file_dark, "#242424", colors.crust.hex)
replacetext(firefox_color_file_dark, "#ffffff", PALETTE.latte.colors.base.hex)
replacetext(firefox_color_file_dark, "#383838", colors.base.hex)
replacetext(firefox_color_file_dark, "#3584e4", colors.surface0.hex)
replacetext(firefox_color_file_dark, "#78aeed", getattr(colors, accent).hex)
replacetext(firefox_color_file_dark, "#363636", colors.surface1.hex)
replacetext(firefox_color_file_dark, "#404040", colors.surface0.hex)
replacetext(firefox_color_file_dark, "#4F4F4F", colors.surface1.hex)
replacetext(firefox_color_file_dark, "#444444", colors.surface0.hex)
replacetext(firefox_color_file_dark, "#323232", colors.mantle.hex)
replacetext(firefox_color_file_dark, "#919191", colors.subtext1.hex)
# Buttons
replacetext(firefox_color_file_dark, "fd5f51", flavor.red.hex)
replacetext(firefox_color_file_dark, "38c76a", flavor.green.hex)
replacetext(firefox_color_file_dark, "fdbe04", flavor.yellow.hex)
replacetext(firefox_color_file_dark, "#fd5f51", colors.red.hex)
replacetext(firefox_color_file_dark, "#38c76a", colors.green.hex)
replacetext(firefox_color_file_dark, "#fdbe04", colors.yellow.hex)
def recolor(flavor, accent: str):
"""
@@ -71,75 +71,78 @@ def recolor(flavor, accent: str):
"""
print("Recoloring to suit catppuccin theme")
print("Recoloring accents")
recolor_accent(flavor, accent)
colors = flavor.colors
latte_colors = PALETTE.latte.colors
mocha_colors = PALETTE.mocha.colors
recolor_accent(colors, accent)
print("Recoloring firefox")
recolor_firefox(flavor, accent)
recolor_firefox(colors, accent)
print("MOD: Gtkrc.sh")
replacetext(f"{work_dir}/gtkrc.sh", "background_light='#FFFFFF'",
f"background_light='#{Flavour.latte().base.hex}'") # use latte_base for background_light
f"background_light='{latte_colors.base.hex}'") # use latte_base for background_light
replacetext(f"{work_dir}/gtkrc.sh", "titlebar_light='#F2F2F2'",
f"titlebar_light='#{Flavour.latte().crust.hex}'") # use latte_crust for titlebar_light
f"titlebar_light='{latte_colors.crust.hex}'") # use latte_crust for titlebar_light
replacetext(f"{work_dir}/gtkrc.sh",
"titlebar_light='#F2F2F2'", f"titlebar_light='#{Flavour.latte().crust.hex}'")
"titlebar_light='#F2F2F2'", f"titlebar_light='{latte_colors.crust.hex}'")
if flavor == Flavour.latte():
if flavor.name == PALETTE.latte.name:
replacetext(f"{work_dir}/gtkrc.sh", "background_dark='#0F0F0F'",
f"background_dark='#{Flavour.mocha().base.hex}'")
f"background_dark='{mocha_colors.base.hex}'")
replacetext(f"{work_dir}/gtkrc.sh", "background_darker='#121212'",
f"background_darker='#{Flavour.mocha().mantle.hex}'")
f"background_darker='{mocha_colors.mantle.hex}'")
replacetext(f"{work_dir}/gtkrc.sh",
"background_alt='#212121'", f"background_alt='#{Flavour.mocha().crust.hex}'")
"background_alt='#212121'", f"background_alt='{mocha_colors.crust.hex}'")
replacetext(f"{work_dir}/gtkrc.sh", "titlebar_dark='#030303'",
f"titlebar_dark='#{Flavour.mocha().crust.hex}'")
f"titlebar_dark='{mocha_colors.crust.hex}'")
replacetext(f"{work_dir}/gtkrc.sh", "background_dark='#2C2C2C'",
f"background_dark='#{Flavour.mocha().base.hex}'")
f"background_dark='{mocha_colors.base.hex}'")
replacetext(f"{work_dir}/gtkrc.sh", "background_darker='#3C3C3C'",
f"background_darker='#{Flavour.mocha().mantle.hex}'")
f"background_darker='{mocha_colors.mantle.hex}'")
replacetext(f"{work_dir}/gtkrc.sh",
"background_alt='#464646'", f"background_alt='#{Flavour.mocha().crust.hex}'")
"background_alt='#464646'", f"background_alt='{mocha_colors.crust.hex}'")
replacetext(f"{work_dir}/gtkrc.sh",
"titlebar_dark='#242424'", f"titlebar_dark='#{Flavour.mocha().crust.hex}'")
"titlebar_dark='#242424'", f"titlebar_dark='{mocha_colors.crust.hex}'")
else:
replacetext(f"{work_dir}/gtkrc.sh", "background_dark='#0F0F0F'",
f"background_dark='#{flavor.base.hex}'")
f"background_dark='{colors.base.hex}'")
replacetext(f"{work_dir}/gtkrc.sh", "background_darker='#121212'",
f"background_darker='#{flavor.mantle.hex}'")
f"background_darker='{colors.mantle.hex}'")
replacetext(f"{work_dir}/gtkrc.sh",
"background_alt='#212121'", f"background_alt='#{flavor.crust.hex}'")
"background_alt='#212121'", f"background_alt='{colors.crust.hex}'")
replacetext(f"{work_dir}/gtkrc.sh", "titlebar_dark='#030303'",
f"titlebar_dark='#{flavor.crust.hex}'")
f"titlebar_dark='{colors.crust.hex}'")
replacetext(f"{work_dir}/gtkrc.sh", "background_dark='#2C2C2C'",
f"background_dark='#{flavor.base.hex}'")
f"background_dark='{colors.base.hex}'")
replacetext(f"{work_dir}/gtkrc.sh", "background_darker='#3C3C3C'",
f"background_darker='#{flavor.mantle.hex}'")
f"background_darker='{colors.mantle.hex}'")
replacetext(f"{work_dir}/gtkrc.sh",
"background_alt='#464646'", f"background_alt='#{flavor.crust.hex}'")
"background_alt='#464646'", f"background_alt='{colors.crust.hex}'")
replacetext(f"{work_dir}/gtkrc.sh",
"titlebar_dark='#242424'", f"titlebar_dark='#{flavor.crust.hex}'")
"titlebar_dark='#242424'", f"titlebar_dark='{colors.crust.hex}'")
print("Mod SASS Color_Palette_default")
# Greys
if flavor == Flavour.latte(): # Hardcode till someone smarter than me comes along
if flavor.name == PALETTE.latte.name:
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-050: #FAFAFA", f"grey-050: #{flavor.crust.hex}")
"grey-050: #FAFAFA", f"grey-050: {colors.crust.hex}")
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-100: #F2F2F2", f"grey-100: #{flavor.mantle.hex}")
"grey-100: #F2F2F2", f"grey-100: {colors.mantle.hex}")
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-150: #EEEEEE", f"grey-150: #{flavor.base.hex}")
"grey-150: #EEEEEE", f"grey-150: {colors.base.hex}")
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-200: #DDDDDD", f"grey-200: #{flavor.surface0.hex}") # Surface 0 Late
"grey-200: #DDDDDD", f"grey-200: {colors.surface0.hex}") # Surface 0 Late
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-250: #CCCCCC", f"grey-250: #{flavor.surface1.hex}") # D = Surface 1 Late
"grey-250: #CCCCCC", f"grey-250: {colors.surface1.hex}") # D = Surface 1 Late
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-650: #3C3C3C", f"grey-650: #{Flavour.mocha().surface0.hex}") # H $surface $tooltip
"grey-650: #3C3C3C", f"grey-650: {mocha_colors.surface0.hex}") # H $surface $tooltip
replacetext(f"{src_dir}/sass/_color-palette-default.scss", "grey-700: #2C2C2C",
f"grey-700: #{Flavour.mocha().base.hex}") # G $background; $base; titlebar-backdrop; $popover
f"grey-700: {mocha_colors.base.hex}") # G $background; $base; titlebar-backdrop; $popover
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-750: #242424", f"grey-750: #{Flavour.mocha().crust.hex}") # F $base-alt
"grey-750: #242424", f"grey-750: {mocha_colors.crust.hex}") # F $base-alt
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-800: #212121", f"grey-800: #{Flavour.mocha().crust.hex}") # E $panel-solid;p
"grey-800: #212121", f"grey-800: {mocha_colors.crust.hex}") # E $panel-solid;p
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-850: #121212", f"grey-850: #020202") # H Darknes
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
@@ -148,23 +151,23 @@ def recolor(flavor, accent: str):
"grey-950: #030303", f"grey-950: #000000") # F Darknes
else:
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-050: #FAFAFA", f"grey-050: #{flavor.overlay2.hex}")
"grey-050: #FAFAFA", f"grey-050: {colors.overlay2.hex}")
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-100: #F2F2F2", f"grey-100: #{flavor.overlay1.hex}")
"grey-100: #F2F2F2", f"grey-100: {colors.overlay1.hex}")
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-150: #EEEEEE", f"grey-150: #{flavor.overlay0.hex}")
"grey-150: #EEEEEE", f"grey-150: {colors.overlay0.hex}")
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-200: #DDDDDD", f"grey-200: #{flavor.surface2.hex}") # Surface 0 Late
"grey-200: #DDDDDD", f"grey-200: {colors.surface2.hex}") # Surface 0 Late
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-250: #CCCCCC", f"grey-250: #{flavor.surface1.hex}") # D = Surface 1 Late
"grey-250: #CCCCCC", f"grey-250: {colors.surface1.hex}") # D = Surface 1 Late
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-650: #3C3C3C", f"grey-650: #{flavor.surface0.hex}") # H $surface $tooltip
"grey-650: #3C3C3C", f"grey-650: {colors.surface0.hex}") # H $surface $tooltip
replacetext(f"{src_dir}/sass/_color-palette-default.scss", "grey-700: #2C2C2C",
f"grey-700: #{flavor.base.hex}") # G $background; $base; titlebar-backdrop; $popover
f"grey-700: {colors.base.hex}") # G $background; $base; titlebar-backdrop; $popover
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-750: #242424", f"grey-750: #{flavor.crust.hex}") # F $base-alt
"grey-750: #242424", f"grey-750: {colors.crust.hex}") # F $base-alt
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-800: #212121", f"grey-800: #{flavor.crust.hex}") # E $panel-solid;p
"grey-800: #212121", f"grey-800: {colors.crust.hex}") # E $panel-solid;p
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"grey-850: #121212", f"grey-850: #020202") # H Darknes
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
@@ -180,8 +183,8 @@ def recolor(flavor, accent: str):
# Buttons
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"button-close: #fd5f51", f"button-close: #{flavor.red.hex}")
"button-close: #fd5f51", f"button-close: {colors.red.hex}")
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"button-max: #38c76a", f"button-max: #{flavor.green.hex}")
"button-max: #38c76a", f"button-max: {colors.green.hex}")
replacetext(f"{src_dir}/sass/_color-palette-default.scss",
"button-min: #fdbe04", f"button-min: #{flavor.yellow.hex}")
"button-min: #fdbe04", f"button-min: {colors.yellow.hex}")

View File

@@ -8,7 +8,7 @@ tmp_dir = f"{repo_dir}/releases"
theme_name = "Catppuccin"
# Map catppuccin colors to colloid ones
# These are mostly unused except for resources for lower gtk versions.
# These are mostly unused except for resources for lower gtk versions.
# These assets are in png format and I am not really interested right now to recolor them using opencv
# Maybe someone more motivated can follow through
def_color_map = {
@@ -28,23 +28,23 @@ def_color_map = {
'lavender': 'default'}
def_accent_light = {
'default': '3c84f7',
'purple': 'AB47BC',
'pink': 'EC407A',
'red': 'E53935',
'orange': 'F57C00',
'yellow': 'FBC02D',
'green': '4CAF50',
'teal': '009688'
'default': '#3c84f7',
'purple': '#AB47BC',
'pink': '#EC407A',
'red': '#E53935',
'orange': '#F57C00',
'yellow': '#FBC02D',
'green': '#4CAF50',
'teal': '#009688'
}
def_accent_dark = {
'default': '5b9bf8',
'purple': 'BA68C8',
'pink': 'F06292',
'red': 'F44336',
'orange': 'FB8C00',
'yellow': 'FFD600',
'green': '66BB6A',
'teal': '4DB6AC'
'default': '#5b9bf8',
'purple': '#BA68C8',
'pink': '#F06292',
'red': '#F44336',
'orange': '#FB8C00',
'yellow': '#FFD600',
'green': '#66BB6A',
'teal': '#4DB6AC'
}

11
shell.nix Normal file
View File

@@ -0,0 +1,11 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
name = "dev-shell";
buildInputs = with pkgs; [
python311
python311Packages.catppuccin
sassc
];
}