Compare commits
54 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5b6c477850 | ||
|
4f4501f83b | ||
|
8d9803f089 | ||
|
26b0d12b1b | ||
|
5b043b61c6 | ||
|
3b802c6b03 | ||
|
939386a30a | ||
|
e279ceffca | ||
|
c577226e9c | ||
|
76cccfa215 | ||
|
9082969c1c | ||
|
f3faf6d9da | ||
|
761a075ca9 | ||
|
9849cea54f | ||
|
0f516404fd | ||
|
23a48d8b81 | ||
|
03376d1003 | ||
|
5255501faf | ||
|
1897b09f23 | ||
|
eb7ed7ab2c | ||
|
831a06c672 | ||
|
f13a2b2e08 | ||
|
a40e058320 | ||
|
d6d1e951e4 | ||
|
59a26aa3cd | ||
|
dbcaeb738f | ||
|
50203b06bb | ||
|
329e522c08 | ||
|
3fc72208de | ||
|
b75165df4d | ||
|
1a5f20809a | ||
|
5c05af916a | ||
|
19d4e9cd5b | ||
|
d5f542f484 | ||
|
0997e92071 | ||
|
d11e6465bd | ||
|
6c350cc3eb | ||
|
7c470654a7 | ||
|
50e9e0120b | ||
|
f2b5321c23 | ||
|
ade94e3bd6 | ||
|
a9cbb4cf93 | ||
|
9e75eac1e5 | ||
|
01ea28f3a3 | ||
|
538067923b | ||
|
a53263bad2 | ||
|
45df79e72c | ||
|
ed3abe04f8 | ||
|
e907775723 | ||
|
c79e453e62 | ||
|
68167565f7 | ||
|
7e40f9c9ab | ||
|
41d54ae759 | ||
|
382e960588 |
33
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
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.
|
6
.github/workflows/release.yml
vendored
@@ -20,10 +20,10 @@ jobs:
|
||||
cache: 'pip'
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
- name: Install colloid specific deps
|
||||
run: sudo apt-get install sassc
|
||||
- name: Install colloid specific dependencies
|
||||
run: sudo apt update && sudo apt install -y sassc inkscape optipng
|
||||
- name: Generate themes
|
||||
run: python ./install.py all -a all --zip -d $PWD/releases
|
||||
run: python ./install.py all -a all --zip -d $PWD/releases --recreate-asset
|
||||
- name: Add zips to release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
|
4
.gitignore
vendored
@@ -2,6 +2,10 @@ pkgs/
|
||||
*-temp.scss
|
||||
__pycache__
|
||||
venv/
|
||||
.venv
|
||||
bin/
|
||||
lib*/
|
||||
*.cfg
|
||||
|
||||
# Releases folder
|
||||
releases
|
||||
|
149
README.md
@@ -25,31 +25,85 @@ This GTK theme is based on the [Colloid](https://github.com/vinceliuice/Colloid-
|
||||
|
||||
- GTK `>=3.20`
|
||||
- `gnome-themes-extra` (or `gnome-themes-standard`)
|
||||
- Murrine engine
|
||||
|
||||
### Installation
|
||||
|
||||
1. Download and extract the theme zip from [releases](https://github.com/catppuccin/gtk/releases/) or you can install the theme from the [AUR](#for-arch-linux-users).
|
||||
1. Download and extract the theme zip from [releases](https://github.com/catppuccin/gtk/releases/).
|
||||
2. Move the theme folder to **".themes"** in your home directory. **(~/.themes)** (Skip this step if you are using the AUR package)
|
||||
3. Select the downloaded theme via your desktop specific tweaks application (**gnome-tweaks** on Gnome 3+).
|
||||
|
||||
### For Arch Linux users
|
||||
|
||||
We have 4 AUR packages for all the 4 flavours of the theme:
|
||||
|
||||
- [Latte](https://aur.archlinux.org/packages/catppuccin-gtk-theme-latte)
|
||||
- [Frappe](https://aur.archlinux.org/packages/catppuccin-gtk-theme-frappe)
|
||||
- [Macchiato](https://aur.archlinux.org/packages/catppuccin-gtk-theme-macchiato)
|
||||
- [Mocha](https://aur.archlinux.org/packages/catppuccin-gtk-theme-mocha)
|
||||
|
||||
With your favourite AUR helper, install them:
|
||||
|
||||
```bash
|
||||
yay -S catppuccin-gtk-theme-mocha catppuccin-gtk-theme-macchiato catppuccin-gtk-theme-frappe catppuccin-gtk-theme-latte
|
||||
```
|
||||
|
||||
### For gtk-4.0 users
|
||||
### For Nix users
|
||||
|
||||
To theme gtk-4.0 applications you have to manually symlink the `~/.config/gtk-4.0/` to the themes folder. Use the following commands
|
||||
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:
|
||||
|
||||
```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";
|
||||
})
|
||||
...
|
||||
];
|
||||
```
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# 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";
|
||||
};
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
```bash
|
||||
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"
|
||||
@@ -59,30 +113,84 @@ ln -sf "${THEME_DIR}/gtk-4.0/gtk-dark.css" "${HOME}/.config/gtk-4.0/gtk-dark.css
|
||||
### For Flatpak users
|
||||
|
||||
1. To give your Flatpaks access to your themes folder run:
|
||||
|
||||
```bash
|
||||
sudo flatpak override --filesystem=$HOME/.themes
|
||||
```
|
||||
|
||||
2. To set the theme for all Flatpaks, replace `##theme##` with the name of the theme you want to use and run this command:
|
||||
|
||||
```bash
|
||||
sudo flatpak override --env=GTK_THEME=##theme##
|
||||
```
|
||||
3. For a more in depth tutorial see Hamza Algohary's tutorial on [It's Foss](https://itsfoss.com/flatpak-app-apply-theme/)
|
||||
|
||||
3. For a more in depth tutorial see Hamza Algohary's tutorial on [It's FOSS](https://itsfoss.com/flatpak-app-apply-theme/)
|
||||
|
||||
### Handling GTK theme installation from window manager
|
||||
|
||||
1. Install unzip and curl.
|
||||
2. Go to your window manager config file.
|
||||
3. Add an entrance to the config file to be executed when your window manager is loaded.
|
||||
- i3/sway example:
|
||||
```
|
||||
# catppuccin
|
||||
set $ctp-version v0.6.1
|
||||
exec_always if [ ! -e ~/.themes/Catppuccin-Frappe-Standard-Lavender-dark ]; then \
|
||||
mkdir -p ~/.themes \
|
||||
&& curl -L https://github.com/catppuccin/gtk/releases/download/$ctp-version/Catppuccin-Frappe-Standard-Lavender-dark.zip -o ~/.themes/catppuccin.zip \
|
||||
&& unzip ~/.themes/catppuccin.zip -d ~/.themes/ \
|
||||
&& rm -rf ~/.themes/catppuccin.zip; fi
|
||||
```
|
||||
> Note: The previous example execute that script every time i3/sway is reloaded.
|
||||
4. Set the GTK_THEME environment variable:
|
||||
|
||||
```sh
|
||||
export GTK_THEME='Catppuccin-Frappe-Standard-Lavender-dark:dark'
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> in order to update the theme's version, just change the variable `$ctp-version`.
|
||||
|
||||
### GDM Theme
|
||||
|
||||
> [!WARNING]
|
||||
> Applying a custom theme to GDM is not recommended as it is not themeable, however you can do it through certain *hacks*.
|
||||
|
||||
To apply the theme to GDM, A new `gnome-shell-theme.gresource.xml` needs to be complied.
|
||||
To achieve this, you can run the following:
|
||||
|
||||
```bash
|
||||
# Backup the current gresource file.
|
||||
sudo cp -av /usr/share/gnome-shell/gnome-shell-theme.gresource{,~}
|
||||
sudo glib-compile-resources --target="/usr/share/gnome-shell/gnome-shell-theme.gresource" --sourcedir="$THEME_DIR" "$THEME_DIR/gnome-shell-theme.gresource.xml"
|
||||
```
|
||||
|
||||
Make sure to replace `$THEME_DIR` to where the theme was extracted accordingly.
|
||||
|
||||
- For nix users, it'll be the nix store path of the package.
|
||||
- For AUR users, it'll be in `~/.themes`
|
||||
- Otherwise, it'll be wherever you extracted the theme.
|
||||
|
||||
### Using the script
|
||||
|
||||
**Note**: Ensure that you have atleast python version 3.10 installed
|
||||
**Note**: Ensure that you have at least Python version 3.10 installed
|
||||
|
||||
Set up the installer using
|
||||
|
||||
Clone the repository using
|
||||
```bash
|
||||
git clone --recurse-submodules git@github.com:catppuccin/gtk.git
|
||||
cd gtk
|
||||
virtualenv -p python3 venv # to be created only once and only if you need a virtual env
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
To check out the install script, run
|
||||
|
||||
```bash
|
||||
python install.py --help
|
||||
```
|
||||
|
||||
> Tip: `python install.py --help` allows the following options:
|
||||
|
||||
```
|
||||
@@ -92,43 +200,58 @@ Compulsory field Specify color variant(s) [mocha|frappe|macchiato|latte|a
|
||||
-a, --accent VARIANT... Specify theme color variant(s) [rosewater|flamingo|pink|mauve|red|maroon|peach|yellow|green|teal|sky|
|
||||
sapphire|blue|lavender|all] (Default: blue)
|
||||
-s, --size VARIANT... Specify size variant [standard|compact] (Default: standard variant)
|
||||
-l, --libadwaita Link installed gtk-4.0 theme to config folder for all libadwaita app use this theme
|
||||
-l, --link Link installed gtk-4.0 theme to config folder for all libadwaita app use this theme
|
||||
--zip Zips up the finally produced themes.
|
||||
--tweaks Specify versions for tweaks [black|rimless|normal]
|
||||
--tweaks Specify versions for tweaks [black|rimless|normal|float]
|
||||
1. black: Blackness color version
|
||||
2. rimless: Remove the 1px border about windows and menus
|
||||
3. normal: Normal windows button style (titlebuttons: max/min/close)
|
||||
4. float: Floating gnome-shell panel style
|
||||
-h, --help Show help
|
||||
```
|
||||
|
||||
You can install any theme like the following example
|
||||
|
||||
```bash
|
||||
python install.py mocha -a sky --tweaks rimless -d ~/.themes
|
||||
|
||||
```
|
||||
|
||||
You can build all possible variations of the theme possible using the following command and it will install it to releases folder
|
||||
|
||||
```bash
|
||||
python install.py all -a all
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
You need to install the following packages to build the theme. Check with your distribution for the package names in the repository
|
||||
|
||||
- `sassc`
|
||||
- `inkscape`
|
||||
- `optipng`
|
||||
|
||||
A few important notes to keep in mind
|
||||
|
||||
* `recolor.py` handles all changes that needs to be done to colloid to ensure it generated catppuccin colors. If vinceliuice changes anything in his theme in future, that is where you must change
|
||||
* `var.py` includes all different variables that you can tinker around as per your personal requirements.
|
||||
* `create_theme.py` consists of a wrapper that will recolor the colloid theme, install it as per the args provided and rename it accordingly.
|
||||
- `recolor.py` handles all changes that needs to be done to colloid to ensure it generated catppuccin colors. If vinceliuice changes anything in his theme in future, that is where you must change
|
||||
- `var.py` includes all different variables that you can tinker around as per your personal requirements.
|
||||
- `create_theme.py` consists of a wrapper that will recolor the colloid theme, install it as per the args provided and rename it accordingly.
|
||||
|
||||
## 💝 Thanks to
|
||||
|
||||
**Current maintainers**
|
||||
|
||||
- [npv12](https://github.com/npv12)
|
||||
- [ghostx31](https://github.com/ghostx31)
|
||||
- [Syndrizzle](https://github.com/Syndrizzle)
|
||||
|
||||
**Contributions**
|
||||
- [rubyowo](https://github.com/rubyowo) - for working on the build and CI script
|
||||
|
||||
- [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)
|
||||
|
||||
|
||||
|
2
colloid
11
install.py
@@ -59,7 +59,7 @@ parser.add_argument("--tweaks",
|
||||
default=[],
|
||||
nargs="+",
|
||||
dest="tweaks",
|
||||
choices=["black", "rimless", "normal"],
|
||||
choices=["black", "rimless", "normal", "float"],
|
||||
help="Some specifc tweaks. like black, rimless, normal buttons")
|
||||
|
||||
parser.add_argument("-l", "--link",
|
||||
@@ -76,6 +76,13 @@ parser.add_argument("--zip",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
dest="zip")
|
||||
|
||||
parser.add_argument("--recreate-asset",
|
||||
help="Recreate assets for xfwm4 and such",
|
||||
type=bool,
|
||||
default=False,
|
||||
action=argparse.BooleanOptionalAction,
|
||||
dest="rec_asset")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if "all" in args.flavor:
|
||||
@@ -99,4 +106,4 @@ if not os.listdir(work_dir):
|
||||
subprocess.call("git submodule update --init --recursive", shell=True)
|
||||
|
||||
filename = create_theme(flavors, accents, dest,
|
||||
args.link, args.name, args.size, args.tweaks, args.zip)
|
||||
args.link, args.name, args.size, args.tweaks, args.zip, args.rec_asset)
|
||||
|
1543
patches/xfwm4/assets-Catppuccin-frappe-Normal.svg
Normal file
After Width: | Height: | Size: 60 KiB |
1328
patches/xfwm4/assets-Catppuccin-frappe.svg
Normal file
After Width: | Height: | Size: 49 KiB |
1543
patches/xfwm4/assets-Catppuccin-latte-Normal.svg
Normal file
After Width: | Height: | Size: 60 KiB |
1328
patches/xfwm4/assets-Catppuccin-latte.svg
Normal file
After Width: | Height: | Size: 49 KiB |
1543
patches/xfwm4/assets-Catppuccin-macchiato-Normal.svg
Normal file
After Width: | Height: | Size: 60 KiB |
1328
patches/xfwm4/assets-Catppuccin-macchiato.svg
Normal file
After Width: | Height: | Size: 49 KiB |
1543
patches/xfwm4/assets-Catppuccin-mocha-Normal.svg
Normal file
After Width: | Height: | Size: 60 KiB |
1328
patches/xfwm4/assets-Catppuccin-mocha.svg
Normal file
After Width: | Height: | Size: 49 KiB |
1546
patches/xfwm4/assets-Light-Catppuccin-frappe-Normal.svg
Normal file
After Width: | Height: | Size: 60 KiB |
1368
patches/xfwm4/assets-Light-Catppuccin-frappe.svg
Normal file
After Width: | Height: | Size: 49 KiB |
1546
patches/xfwm4/assets-Light-Catppuccin-latte-Normal.svg
Normal file
After Width: | Height: | Size: 60 KiB |
1368
patches/xfwm4/assets-Light-Catppuccin-latte.svg
Normal file
After Width: | Height: | Size: 49 KiB |
1546
patches/xfwm4/assets-Light-Catppuccin-macchiato-Normal.svg
Normal file
After Width: | Height: | Size: 60 KiB |
1368
patches/xfwm4/assets-Light-Catppuccin-macchiato.svg
Normal file
After Width: | Height: | Size: 49 KiB |
1546
patches/xfwm4/assets-Light-Catppuccin-mocha-Normal.svg
Normal file
After Width: | Height: | Size: 60 KiB |
1368
patches/xfwm4/assets-Light-Catppuccin-mocha.svg
Normal file
After Width: | Height: | Size: 49 KiB |
@@ -1 +1 @@
|
||||
catppuccin>=1.1.1
|
||||
catppuccin>=1.1.1,<2.0.0
|
@@ -4,13 +4,14 @@ 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 zip_multiple_folders
|
||||
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,
|
||||
name: str = theme_name, size: str = "standard", tweaks=[], zip = False) -> None:
|
||||
name: str = theme_name, size: str = "standard", tweaks=[], zip = False, recreate_assets = False) -> None:
|
||||
|
||||
try:
|
||||
os.makedirs(dest) # Create our destination directory
|
||||
@@ -18,6 +19,9 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
|
||||
pass
|
||||
|
||||
for type in types:
|
||||
if recreate_assets:
|
||||
recreate_xfwm4_assets(type)
|
||||
|
||||
for accent in accents:
|
||||
# Recolor colloid wrt our selection like mocha. latte
|
||||
recolor(ctp_colors[type], accent)
|
||||
@@ -35,8 +39,8 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
|
||||
try:
|
||||
# Rename colloid generated files as per catppuccin
|
||||
new_filename = dest + \
|
||||
f"/{theme_name}-{type.capitalize()}-{size.capitalize()}-{accent.capitalize()}-{theme_style.title()}"
|
||||
filename = f"{theme_name}"
|
||||
f"/{name}-{type.capitalize()}-{size.capitalize()}-{accent.capitalize()}-{theme_style.title()}"
|
||||
filename = f"{name}"
|
||||
if def_color_map[accent] != 'default':
|
||||
filename += f"-{def_color_map[accent].capitalize()}"
|
||||
filename += f"-{theme_style.capitalize()}"
|
||||
@@ -53,6 +57,7 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
|
||||
os.rename(dest + "/" + filename + '-xhdpi',
|
||||
new_filename + '-xhdpi')
|
||||
os.rename(dest + "/" + filename, new_filename)
|
||||
replacetext(new_filename + '/index.theme', filename, new_filename.split("/")[-1])
|
||||
print("Successfully renamed file")
|
||||
except Exception as e:
|
||||
print("Failed to rename the files due to:", e)
|
||||
|
32
scripts/patches.py
Normal file
@@ -0,0 +1,32 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from scripts.var import src_dir, repo_dir, work_dir
|
||||
|
||||
def recreate_xfwm4_assets(flavour):
|
||||
"""
|
||||
Recolors xfwm4 assets based on the flavour
|
||||
|
||||
Args:
|
||||
flavour (Flavour): The flavour to recolor
|
||||
"""
|
||||
|
||||
# Delete assets that already exists and copy new assets file
|
||||
folders = ["assets", "assets-Light"]
|
||||
variants = ["", "-Normal"]
|
||||
sizes = ["", "-hdpi", "-xhdpi"]
|
||||
assets_folder = f"{src_dir}/assets/xfwm4"
|
||||
|
||||
for folder in folders:
|
||||
for variant in variants:
|
||||
for size in sizes:
|
||||
shutil.rmtree(f"{assets_folder}/{folder}{variant}{size}", ignore_errors=True)
|
||||
|
||||
|
||||
patched_asset = f"{repo_dir}/patches/xfwm4/{folder}-Catppuccin-{flavour}{variant}.svg"
|
||||
shutil.copy(patched_asset, f"{assets_folder}/{folder}{variant}.svg")
|
||||
|
||||
os.chdir(assets_folder)
|
||||
subprocess.call(f"{assets_folder}/render-assets.sh", shell=True) # Rebuild all assets
|
||||
os.chdir(work_dir)
|
@@ -1,8 +1,7 @@
|
||||
from catppuccin import Flavour
|
||||
|
||||
from .utils import replacetext, replaceAllText
|
||||
from .var import (def_accent_dark, def_accent_light, def_color_map, src_dir,
|
||||
theme_name, work_dir)
|
||||
from .var import (def_accent_dark, def_accent_light, def_color_map, src_dir, work_dir)
|
||||
|
||||
|
||||
def recolor_accent(flavor, accent: str = "blue"):
|
||||
@@ -71,10 +70,9 @@ def recolor(flavor, accent: str):
|
||||
Recolor the theme. currently hard code it frappe
|
||||
"""
|
||||
print("Recoloring to suit catppuccin theme")
|
||||
replacetext(f"{work_dir}/install.sh", "Colloid", theme_name)
|
||||
|
||||
print("Recoloring accents")
|
||||
recolor_accent(flavor, accent)
|
||||
print("Recoloring firefox")
|
||||
recolor_firefox(flavor, accent)
|
||||
|
||||
print("MOD: Gtkrc.sh")
|
||||
|
@@ -25,7 +25,7 @@ def replacetext(filepath: str, search_text: str, replace_text: str) -> None:
|
||||
f.seek(0)
|
||||
f.write(file)
|
||||
f.truncate()
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
print(f"Failed to recolor {filepath}")
|
||||
|
||||
|
||||
|