8000 initial commit · catppuccin/solvespace@3ef8f6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ef8f6a

Browse files
committed
initial commit
0 parents  commit 3ef8f6a

9 files changed

+357
-0
lines changed

.editorconfig

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# EditorConfig is awesome: https://EditorConfig.org
4+
5+
root = true
6+
7+
[*]
8+
charset = utf-8
9+
indent_size = 2
10+
indent_style = space
11+
end_of_line = lf
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
# go
16+
[*.go]
17+
indent_style = tab
18+
indent_size = 4
19+
20+
# python
21+
[*.{ini,py,py.tpl,rst}]
22+
indent_size = 4
23+
24+
# rust
25+
[*.rs]
26+
indent_size = 4
27+
28+
# documentation, utils
29+
[*.{md,mdx,diff}]
30+
trim_trailing_whitespace = false
31+
32+
# windows shell scripts
33+
[*.{cmd,bat,ps1}]
34+
end_of_line = crlf

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Catppuccin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<h3 align="center">
2+
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
3+
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
4+
Catppuccin for <a href="https://solvespace.com">SolveSpace</a>
5+
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
6+
</h3>
7+
8+
<p align="center">
9+
<a href="https://github.com/ndsboy/solvespace/stargazers"><img src="https://img.shields.io/github/stars/ndsboy/solvespace?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
10+
<a href="https://github.com/ndsboy/solvespace/issues"><img src="https://img.shields.io/github/issues/ndsboy/solvespace?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
11+
<a href="https://github.com/ndsboy/solvespace/contributors"><img src="https://img.shields.io/github/contributors/ndsboy/solvespace?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
12+
</p>
13+
14+
<p align="center">
15+
<img src="https://github.com/ndsboy/solvespace/blob/main/assets/preview.png"/>
16+
</p>
17+
18+
## Previews
19+
20+
<details>
21+
<summary>🌻 Latte</summary>
22+
<img src="https://github.com/ndsboy/solvespace/blob/main/assets/latte.png"/>
23+
</details>
24+
<details>
25+
<summary>🪴 Frappé</summary>
26+
<img src="https://github.com/ndsboy/solvespace/blob/main/assets/frappe.png"/>
27+
</details>
28+
<details>
29+
<summary>🌺 Macchiato</summary>
30+
<img src="https://github.com/ndsboy/solvespace/blob/main/assets/macchiato.png"/>
31+
</details>
32+
<details>
33+
<summary>🌿 Mocha</summary>
34+
<img src="https://github.com/ndsboy/solvespace/blob/main/assets/mocha.png"/>
35+
</details>
36+
37+
## Usage
38+
39+
### Overwriting your current settings
40+
41+
1. Download and replace the current `settings.json`:
42+
43+
- 🌻 Latte:
44+
45+
```shell
46+
curl -o ~/.config/solvespace/settings.json https://raw.githubusercontent.com/ndsboy/solvespace/main/themes/latte.json
47+
```
48+
49+
- 🪴 Frappe:
50+
51+
```shell
52+
curl -o ~/.config/solvespace/settings.json https://raw.githubusercontent.com/ndsboy/solvespace/main/themes/frappe.json
53+
```
54+
55+
- 🌺 Macchiato:
56+
57+
```shell
58+
curl -o ~/.config/solvespace/settings.json https://raw.githubusercontent.com/ndsboy/solvespace/main/themes/macchiato.json
59+
```
60+
61+
- 🌿 Mocha:
62+
63+
```shell
64+
curl -o ~/.config/solvespace/settings.json https://raw.githubusercontent.com/ndsboy/solvespace/main/themes/mocha.json
65+
```
66+
67+
### Merging with your current settings via script
68+
69+
1. Clone this repository locally
70+
71+
```shell
72+
git clone https://github.com/ndsboy/solvespace.git && cd solvespace
73+
```
74+
75+
2. Apply the theme via script:
76+
77+
- 🌻 Latte:
78+
79+
```shell
80+
./build.py latte ~/.config/solvespace/settings.json
81+
```
82+
83+
- 🪴 Frappe:
84+
85+
```shell
86+
./build.py frappe ~/.config/solvespace/settings.json
87+
```
88+
89+
- 🌺 Macchiato:
90+
91+
```shell
92+
./build.py macchiato ~/.config/solvespace/settings.json
93+
```
94+
95+
- 🌿 Mocha:
96+
97+
```shell
98+
./build.py mocha ~/.config/solvespace/settings.json
99+
```
100+
101+
### Merging with your current settings manually
102+
103+
1. Open your theme from the `themes` folder in the browser
104+
105+
2. Open `~/.config/solvespace/settings.json` with your favourite text editor
106+
107+
3. At the second last line of the file (before the `}`), add a comma `,` and then paste the content of your theme (excluding `{` and `}`). You can ignore any warnings about duplicate keys, as SolveSpace will clean them up.
108+
109+
## 💝 Thanks to
110+
111+
- [ndsboy](https://github.com/ndsboy)
112+
113+
&nbsp;
114+
115+
<p align="center">
116+
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" />
117+
</p>
118+
119+
<p align="center">
120+
Copyright &copy; 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
121+
</p>
122+
123+
<p align="center">
124+
<a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a>
125+
</p>

build.py

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env python3
2+
3+
from pathlib import Path
4+
import json
5+
import sys
6+
import urllib.request
7+
8+
def main():
9+
with urllib.request.urlopen('https://raw.githubusercontent.com/catppuccin/palette/main/palette.json') as f:
10+
data = f.read().decode('utf-8')
11+
colors = json.loads(data)
12+
13+
colormap = {
14+
"BackgroundColor": "base",
15+
"ModelColor_0": "text",
16+
"ModelColor_1": "overlay0",
17+
"ModelColor_2": "base",
18+
"ModelColor_3": "red",
19+
"ModelColor_4": "green",
20+
"ModelColor_5": "teal",
21+
"ModelColor_6": "blue",
22+
"ModelColor_7": "mauve",
23+
"Style_ActiveGrp_Color": "text",
24+
"Style_Construction_Color": "green",
25+
"Style_InactiveGrp_Color": "surface0",
26+
"Style_Datum_Color": "green",
27+
"Style_SolidEdge_Color": "subtext0",
28+
"Style_Constraint_Color": "mauve",
29+
"Style_Selected_Color": "red",
30+
"Style_Hovered_Color": "yellow",
31+
"Style_ContourFill_Color": "lavender",
32+
"Style_Normals_Color": "blue",
33+
"Style_Analyze_Color": "sky",
34+
"Style_DrawError_Color": "red",
35+
"Style_DimSolid_Color": "surface0",
36+
"Style_HiddenEdge_Color": "overlay0",
37+
"Style_Outline_Color": "subtext0"
38+
}
39+
40+
settings = {}
41+
settings_file = Path(sys.argv[2])
42+
if settings_file.exists():
43+
settings = json.loads(settings_file.read_text())
44+
45+
for color in colormap:
46+
hx = colors[sys.argv[1]][colormap[color]]["hex"]
47+
settings[color] = int(hx[5:7]+hx[3:5]+hx[1:3], 16)
48+
49+
settings_file.write_text(json.dumps(settings, indent = " "))
50+
51+
if __name__ == "__main__":
52+
if len(sys.argv) < 3:
53+
print("missing arguments: ./build.py [theme] [path]")
54+
exit(1)
55+
main()

settings.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"BackgroundColor": 2369338,
3+
"Style_ActiveGrp_Color": 13292533,
4+
"Style_Construction_Color": 10934933,
5+
"Style_InactiveGrp_Color": 3553871,
6+
"Style_Datum_Color": 9164234,
7+
"Style_SolidEdge_Color": 10857931,
8+
"Style_Constraint_Color": 13017334,
9+
"Style_Selected_Color": 15566742,
10+
"Style_Hovered_Color": 15651999,
11+
"Style_ContourFill_Color": 12041720,
12+
"Style_Normals_Color": 9088500,
13+
"Style_Analyze_Color": 9557987,
14+
"Style_DrawError_Color": 15566742,
15+
"Style_DimSolid_Color": 3553871,
16+
"Style_HiddenEdge_Color": 7238541,
17+
"Style_Outline_Color": 10857931
18+
}

themes/frappe.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"BackgroundColor": 4600880,
3+
"ModelColor_0": 16109766,
4+
"ModelColor_1": 9730419,
5+
"ModelColor_2": 4600880,
6+
"ModelColor_3": 8684263,
7+
"ModelColor_4": 9032102,
8+
"ModelColor_5": 12503169,
9+
"ModelColor_6": 15641228,
10+
"ModelColor_7": 15113930,
11+
"Style_ActiveGrp_Color": 16109766,
12+
"Style_Construction_Color": 9032102,
13+
"Style_InactiveGrp_Color": 5850433,
14+
"Style_Datum_Color": 9032102,
15+
"Style_SolidEdge_Color": 13544869,
16+
"Style_Constraint_Color": 15113930,
17+
"Style_Selected_Color": 8684263,
18+
"Style_Hovered_Color": 9488613,
19+
"Style_ContourFill_Color": 15842234,
20+
"Style_Normals_Color": 15641228,
21+
"Style_Analyze_Color": 14406041,
22+
"Style_DrawError_Color": 8684263,
23+
"Style_DimSolid_Color": 5850433,
24+
"Style_HiddenEdge_Color": 9730419,
25+
"Style_Outline_Color": 13544869
26+
}

themes/latte.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"BackgroundColor": 16118255,
3+
"ModelColor_0": 6901580,
4+
"ModelColor_1": 11575452,
5+
"ModelColor_2": 16118255,
6+
"ModelColor_3": 3739602,
7+
"ModelColor_4": 2859072,
8+
"ModelColor_5": 10064407,
9+
"ModelColor_6": 16082462,
10+
"ModelColor_7": 15677832,
11+
"Style_ActiveGrp_Color": 6901580,
12+
"Style_Construction_Color": 2859072,
13+
"Style_InactiveGrp_Color": 14340300,
14+
"Style_Datum_Color": 2859072,
15+
"Style_SolidEdge_Color": 8744812,
16+
"Style_Constraint_Color": 15677832,
17+
"Style_Selected_Color": 3739602,
18+
"Style_Hovered_Color": 1937119,
19+
"Style_ContourFill_Color": 16615282,
20+
"Style_Normals_Color": 16082462,
21+
"Style_Analyze_Color": 15049988,
22+
"Style_DrawError_Color": 3739602,
23+
"Style_DimSolid_Color": 14340300,
24+
"Style_HiddenEdge_Color": 11575452,
25+
"Style_Outline_Color": 8744812
26+
}

themes/macchiato.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"BackgroundColor": 3811108,
3+
"ModelColor_0": 16110538,
4+
"ModelColor_1": 9270126,
5+
"ModelColor_2": 3811108,
6+
"ModelColor_3": 9865197,
7+
"ModelColor_4": 9820838,
8+
"ModelColor_5": 13292939,
9+
"ModelColor_6": 16035210,
10+
"ModelColor_7": 16163014,
11+
"Style_ActiveGrp_Color": 16110538,
12+
"Style_Construction_Color": 9820838,
13+
"Style_InactiveGrp_Color": 5192246,
14+
"Style_Datum_Color": 9820838,
15+
"Style_SolidEdge_Color": 13348261,
16+
"Style_Constraint_Color": 16163014,
17+
"Style_Selected_Color": 9865197,
18+
"Style_Hovered_Color": 10474734,
19+
"Style_ContourFill_Color": 16301495,
20+
"Style_Normals_Color": 16035210,
21+
"Style_Analyze_Color": 14931857,
22+
"Style_DrawError_Color": 9865197,
23+
"Style_DimSolid_Color": 5192246,
24+
"Style_HiddenEdge_Color": 9270126,
25+
"Style_Outline_Color": 13348261
26+
}

themes/mocha.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"BackgroundColor": 3022366,
3+
"ModelColor_0": 16045773,
4+
"ModelColor_1": 8810604,
5+
"ModelColor_2": 3022366,
6+
"ModelColor_3": 11045875,
7+
"ModelColor_4": 10609574,
8+
"ModelColor_5": 14017172,
9+
"ModelColor_6": 16430217,
10+
"ModelColor_7": 16230091,
11+
"Style_ActiveGrp_Color": 16045773,
12+
"Style_Construction_Color": 10609574,
13+
"Style_InactiveGrp_Color": 4469297,
14+
"Style_Datum_Color": 10609574,
15+
"Style_SolidEdge_Color": 13151654,
16+
"Style_Constraint_Color": 16230091,
17+
"Style_Selected_Color": 11045875,
18+
"Style_Hovered_Color": 11526905,
19+
"Style_ContourFill_Color": 16694964,
20+
"Style_Normals_Color": 16430217,
21+
"Style_Analyze_Color": 15457417,
22+
"Style_DrawError_Color": 11045875,
23+
"Style_DimSolid_Color": 4469297,
24+
"Style_HiddenEdge_Color": 8810604,
25+
"Style_Outline_Color": 13151654
26+
}

0 commit comments

Comments
 (0)
0