Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5c05af916a | ||
|
19d4e9cd5b | ||
|
d5f542f484 | ||
|
0997e92071 | ||
|
d11e6465bd | ||
|
6c350cc3eb | ||
|
7c470654a7 | ||
|
50e9e0120b | ||
|
f2b5321c23 | ||
|
ade94e3bd6 | ||
|
a9cbb4cf93 |
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -20,10 +20,10 @@ jobs:
|
|||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
- name: Install colloid specific deps
|
- name: Install colloid specific dependencies
|
||||||
run: sudo apt-get install sassc
|
run: sudo apt update && sudo apt install -y sassc inkscape optipng
|
||||||
- name: Generate themes
|
- 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
|
- name: Add zips to release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
13
README.md
13
README.md
@@ -128,7 +128,7 @@ 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|
|
-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)
|
sapphire|blue|lavender|all] (Default: blue)
|
||||||
-s, --size VARIANT... Specify size variant [standard|compact] (Default: standard variant)
|
-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.
|
--zip Zips up the finally produced themes.
|
||||||
--tweaks Specify versions for tweaks [black|rimless|normal]
|
--tweaks Specify versions for tweaks [black|rimless|normal]
|
||||||
1. black: Blackness color version
|
1. black: Blackness color version
|
||||||
@@ -148,11 +148,16 @@ python install.py all -a all
|
|||||||
|
|
||||||
## Development
|
## 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
|
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
|
- `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.
|
- `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.
|
- `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
|
## 💝 Thanks to
|
||||||
|
|
||||||
|
2
colloid
2
colloid
Submodule colloid updated: 6ddd8e1932...2449ab52c2
@@ -79,7 +79,7 @@ parser.add_argument("--zip",
|
|||||||
parser.add_argument("--recreate-asset",
|
parser.add_argument("--recreate-asset",
|
||||||
help="Recreate assets for xfwm4 and such",
|
help="Recreate assets for xfwm4 and such",
|
||||||
type=bool,
|
type=bool,
|
||||||
default=True,
|
default=False,
|
||||||
action=argparse.BooleanOptionalAction,
|
action=argparse.BooleanOptionalAction,
|
||||||
dest="rec_asset")
|
dest="rec_asset")
|
||||||
|
|
||||||
|
@@ -6,12 +6,12 @@ from typing import List
|
|||||||
from scripts.ctp_colors import ctp_colors
|
from scripts.ctp_colors import ctp_colors
|
||||||
from scripts.patches import recreate_xfwm4_assets
|
from scripts.patches import recreate_xfwm4_assets
|
||||||
from scripts.recolor import recolor
|
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
|
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 = True) -> None:
|
name: str = theme_name, size: str = "standard", tweaks=[], zip = False, recreate_assets = False) -> None:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.makedirs(dest) # Create our destination directory
|
os.makedirs(dest) # Create our destination directory
|
||||||
@@ -19,11 +19,12 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
for type in types:
|
for type in types:
|
||||||
|
if recreate_assets:
|
||||||
|
recreate_xfwm4_assets(type)
|
||||||
|
|
||||||
for accent in accents:
|
for accent in accents:
|
||||||
# Recolor colloid wrt our selection like mocha. latte
|
# Recolor colloid wrt our selection like mocha. latte
|
||||||
recolor(ctp_colors[type], accent)
|
recolor(ctp_colors[type], accent)
|
||||||
if recreate_assets:
|
|
||||||
recreate_xfwm4_assets(type)
|
|
||||||
theme_style: str = "light" if type == "latte" else "dark"
|
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]}"
|
install_cmd: str = f"./install.sh -c {theme_style} -s {size} -n {name} -d {dest} -t {def_color_map[accent]}"
|
||||||
if tweaks:
|
if tweaks:
|
||||||
@@ -38,8 +39,8 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
|
|||||||
try:
|
try:
|
||||||
# Rename colloid generated files as per catppuccin
|
# Rename colloid generated files as per catppuccin
|
||||||
new_filename = dest + \
|
new_filename = dest + \
|
||||||
f"/{theme_name}-{type.capitalize()}-{size.capitalize()}-{accent.capitalize()}-{theme_style.title()}"
|
f"/{name}-{type.capitalize()}-{size.capitalize()}-{accent.capitalize()}-{theme_style.title()}"
|
||||||
filename = f"{theme_name}"
|
filename = f"{name}"
|
||||||
if def_color_map[accent] != 'default':
|
if def_color_map[accent] != 'default':
|
||||||
filename += f"-{def_color_map[accent].capitalize()}"
|
filename += f"-{def_color_map[accent].capitalize()}"
|
||||||
filename += f"-{theme_style.capitalize()}"
|
filename += f"-{theme_style.capitalize()}"
|
||||||
@@ -56,6 +57,7 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
|
|||||||
os.rename(dest + "/" + filename + '-xhdpi',
|
os.rename(dest + "/" + filename + '-xhdpi',
|
||||||
new_filename + '-xhdpi')
|
new_filename + '-xhdpi')
|
||||||
os.rename(dest + "/" + filename, new_filename)
|
os.rename(dest + "/" + filename, new_filename)
|
||||||
|
replacetext(new_filename + '/index.theme', filename, new_filename.split("/")[-1])
|
||||||
print("Successfully renamed file")
|
print("Successfully renamed file")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Failed to rename the files due to:", e)
|
print("Failed to rename the files due to:", e)
|
||||||
|
Reference in New Issue
Block a user