Skip to content

Commit 4460d91

Browse files
committed
breaking-change: partitioned configs into multiple files
1 parent afb25d6 commit 4460d91

File tree

9 files changed

+1616
-23
lines changed

9 files changed

+1616
-23
lines changed

build.sh

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ error() (
88
"$@" 2> >(sed $'s,.*,\e[31m&\e[m,' >&2)
99
)
1010

11-
get_config_file() {
11+
get_config_path() {
1212
local key="${1}"
13-
local cfg_file="build.toml"
13+
local cfg_path="configs"
1414

1515
if [[ $key == *"Right"* ]]; then
16-
cfg_file="build.right.toml"
16+
cfg_path="${cfg_path}/right"
17+
else
18+
cfg_path="${cfg_path}/normal"
1719
fi
1820

19-
echo $cfg_file
21+
echo $cfg_path
2022
}
2123

2224
with_version() {
@@ -30,41 +32,40 @@ if ! type -p ctgen >/dev/null; then
3032
fi
3133

3234
declare -A names
33-
names["Bibata-Modern-Amber"]=$(with_version "Yellowish and rounded edge Bibata cursors")
34-
names["Bibata-Modern-Amber-Right"]=$(with_version "Yellowish and rounded edge right-hand Bibata cursors")
35-
names["Bibata-Modern-Classic"]=$(with_version "Black and rounded edge Bibata cursors")
36-
names["Bibata-Modern-Classic-Right"]=$(with_version "Black and rounded edge right-hand Bibata cursors")
37-
names["Bibata-Modern-Ice"]=$(with_version "White and rounded edge Bibata cursors")
38-
names["Bibata-Modern-Ice-Right"]=$(with_version "White and rounded edge right-hand Bibata cursors")
39-
names["Bibata-Original-Amber"]=$(with_version "Yellowish and sharp edge Bibata cursors")
40-
names["Bibata-Original-Amber-Right"]=$(with_version "Yellowish and sharp edge right-hand Bibata cursors")
41-
names["Bibata-Original-Classic"]=$(with_version "Black and sharp edge Bibata cursors")
42-
names["Bibata-Original-Classic-Right"]=$(with_version "Black and sharp edge right-hand Bibata cursors")
43-
names["Bibata-Original-Ice"]=$(with_version "White and sharp edge Bibata cursors")
44-
names["Bibata-Original-Ice-Right"]=$(with_version "White and sharp edge right-hand Bibata cursors")
35+
names["Bibata-Modern-Amber"]=$(with_version "Yellowish and rounded edge Bibata")
36+
names["Bibata-Modern-Amber-Right"]=$(with_version "Yellowish and rounded edge right-hand Bibata")
37+
names["Bibata-Modern-Classic"]=$(with_version "Black and rounded edge Bibata")
38+
names["Bibata-Modern-Classic-Right"]=$(with_version "Black and rounded edge right-hand Bibata")
39+
names["Bibata-Modern-Ice"]=$(with_version "White and rounded edge Bibata")
40+
names["Bibata-Modern-Ice-Right"]=$(with_version "White and rounded edge right-hand Bibata")
41+
names["Bibata-Original-Amber"]=$(with_version "Yellowish and sharp edge Bibata")
42+
names["Bibata-Original-Amber-Right"]=$(with_version "Yellowish and sharp edge right-hand Bibata")
43+
names["Bibata-Original-Classic"]=$(with_version "Black and sharp edge Bibata")
44+
names["Bibata-Original-Classic-Right"]=$(with_version "Black and sharp edge right-hand Bibata")
45+
names["Bibata-Original-Ice"]=$(with_version "White and sharp edge Bibata")
46+
names["Bibata-Original-Ice-Right"]=$(with_version "White and sharp edge right-hand Bibata")
4547

4648
# Cleanup old builds
4749
rm -rf themes bin
4850

4951
# Building Bibata XCursor binaries
5052
for key in "${!names[@]}"; do
5153
comment="${names[$key]}"
52-
cfg=$(get_config_file key)
54+
cfg_path=$(get_config_path "$key")
5355

54-
ctgen "$cfg" -p x11 -d "bitmaps/$key" -n "$key" -c "$comment" &
56+
ctgen "$cfg_path/x.build.toml" -p x11 -d "bitmaps/$key" -n "$key" -c "$comment XCursors" &
5557
PID=$!
5658
wait $PID
5759
done
5860

5961
# Building Bibata Windows binaries
6062
for key in "${!names[@]}"; do
6163
comment="${names[$key]}"
62-
cfg=$(get_config_file key)
64+
cfg_path=$(get_config_path "$key")
6365

64-
ctgen "$cfg" -p windows -s 16 -d "bitmaps/$key" -n "$key-Small" -c "$comment" &
65-
ctgen "$cfg" -p windows -s 24 -d "bitmaps/$key" -n "$key-Regular" -c "$comment" &
66-
ctgen "$cfg" -p windows -s 32 -d "bitmaps/$key" -n "$key-Large" -c "$comment" &
67-
ctgen "$cfg" -p windows -s 48 -d "bitmaps/$key" -n "$key-Extra-Large" -c "$comment" &
66+
ctgen "$cfg_path/win_rg.build.toml" -d "bitmaps/$key" -n "$key-Regular" -c "$comment Windows Cursors" &
67+
ctgen "$cfg_path/win_lg.build.toml" -d "bitmaps/$key" -n "$key-Large" -c "$comment Windows Cursors" &
68+
ctgen "$cfg_path/win_xl.build.toml" -d "bitmaps/$key" -n "$key-Extra-Large" -c "$comment Windows Cursors" &
6869
PID=$!
6970
wait $PID
7071
done

configs/normal/win_lg.build.toml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
[theme]
2+
name = 'Bibata Large Windows Cursor'
3+
comment = 'Bibata is open source, compact, and material designed cursor set.'
4+
website = 'https://www.bibata.live'
5+
6+
[config]
7+
bitmaps_dir = '' # This config will assigned with `ctgen -d <path>`
8+
out_dir = '../../themes'
9+
platforms = 'windows'
10+
11+
[cursors]
12+
[cursors.fallback_settings]
13+
win_sizes = ["26:32", "39:48", "52:64", "77:96", "103:128"]
14+
x_hotspot = 128
15+
y_hotspot = 128
16+
win_delay = 1
17+
18+
[cursors.bd_double_arrow]
19+
png = 'bd_double_arrow.png'
20+
win_name = 'Dgn1'
21+
22+
[cursors.circle]
23+
png = 'circle.png'
24+
x_hotspot = 55
25+
y_hotspot = 17
26+
win_name = 'Unavailable'
27+
28+
[cursors.crosshair]
29+
png = 'crosshair.png'
30+
win_name = 'Cross'
31+
32+
[cursors.fd_double_arrow]
33+
png = 'fd_double_arrow.png'
34+
win_name = 'Dgn2'
35+
36+
[cursors.grabbing]
37+
png = 'grabbing.png'
38+
x_hotspot = 128
39+
y_hotspot = 66
40+
win_name = 'Grabbing'
41+
42+
[cursors.hand1]
43+
png = 'hand1.png'
44+
x_hotspot = 144
45+
y_hotspot = 79
46+
win_name = 'Pan'
47+
48+
[cursors.hand2]
49+
png = 'hand2.png'
50+
x_hotspot = 114
51+
y_hotspot = 18
52+
win_name = 'Link'
53+
54+
[cursors.left_ptr]
55+
png = 'left_ptr.png'
56+
x_hotspot = 55
57+
y_hotspot = 17
58+
win_name = 'Pointer'
59+
60+
[cursors.left_ptr_watch]
61+
png = 'left_ptr_watch-*.png'
62+
win_sizes = "78:96"
63+
x_hotspot = 55
64+
y_hotspot = 17
65+
win_name = 'Work'
66+
67+
[cursors.move]
68+
png = 'move.png'
69+
win_name = 'Move'
70+
71+
[cursors.pencil]
72+
png = 'pencil.png'
73+
x_hotspot = 46
74+
y_hotspot = 211
75+
win_name = 'Handwriting'
76+
77+
[cursors.question_arrow]
78+
png = 'question_arrow.png'
79+
x_hotspot = 42
80+
y_hotspot = 86
81+
win_name = 'Help'
82+
83+
[cursors.right_ptr]
84+
png = 'right_ptr.png'
85+
x_hotspot = 204
86+
y_hotspot = 17
87+
win_name = 'Alternate'
88+
89+
[cursors.sb_h_double_arrow]
90+
png = 'sb_h_double_arrow.png'
91+
win_name = 'Horz'
92+
93+
[cursors.sb_v_double_arrow]
94+
png = 'sb_v_double_arrow.png'
95+
win_name = 'Vert'
96+
97+
[cursors.wait]
98+
png = 'wait-*.png'
99+
win_sizes = "78:96"
100+
win_name = 'Busy'
101+
102+
[cursors.xterm]
103+
png = 'xterm.png'
104+
win_name = 'Text'
105+
106+
[cursors.zoom_in]
107+
png = 'zoom-in.png'
108+
x_hotspot = 116
109+
y_hotspot = 116
110+
win_name = 'Zoom-in'
111+
112+
[cursors.zoom_out]
113+
png = 'zoom-out.png'
114+
x_hotspot = 116
115+
y_hotspot = 116
116+
win_name = 'Zoom-out'
117+
118+
[cursors.person]
119+
png = 'person.png'
120+
x_hotspot = 55
121+
y_hotspot = 17
122+
win_name = 'Person'
123+
124+
[cursors.pin]
125+
png = 'pin.png'
126+
x_hotspot = 55
127+
y_hotspot = 17
128+
win_name = 'Pin'

configs/normal/win_rg.build.toml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
[theme]
2+
name = 'Bibata Regular Windows Cursor'
3+
comment = 'Bibata is open source, compact, and material designed cursor set.'
4+
website = 'https://www.bibata.live'
5+
6+
[config]
7+
bitmaps_dir = '' # This config will assigned with `ctgen -d <path>`
8+
out_dir = '../../themes'
9+
platforms = 'windows'
10+
11+
[cursors]
12+
[cursors.fallback_settings]
13+
win_sizes = ["22:32", "32:48", "43:64", "64:96", "86:128"]
14+
x_hotspot = 128
15+
y_hotspot = 128
16+
win_delay = 1
17+
18+
[cursors.bd_double_arrow]
19+
png = 'bd_double_arrow.png'
20+
win_name = 'Dgn1'
21+
22+
[cursors.circle]
23+
png = 'circle.png'
24+
x_hotspot = 55
25+
y_hotspot = 17
26+
win_name = 'Unavailable'
27+
28+
[cursors.crosshair]
29+
png = 'crosshair.png'
30+
win_name = 'Cross'
31+
32+
[cursors.fd_double_arrow]
33+
png = 'fd_double_arrow.png'
34+
win_name = 'Dgn2'
35+
36+
[cursors.grabbing]
37+
png = 'grabbing.png'
38+
x_hotspot = 128
39+
y_hotspot = 66
40+
win_name = 'Grabbing'
41+
42+
[cursors.hand1]
43+
png = 'hand1.png'
44+
x_hotspot = 144
45+
y_hotspot = 79
46+
win_name = 'Pan'
47+
48+
[cursors.hand2]
49+
png = 'hand2.png'
50+
x_hotspot = 114
51+
y_hotspot = 18
52+
win_name = 'Link'
53+
54+
[cursors.left_ptr]
55+
png = 'left_ptr.png'
56+
x_hotspot = 55
57+
y_hotspot = 17
58+
win_name = 'Pointer'
59+
60+
[cursors.left_ptr_watch]
61+
png = 'left_ptr_watch-*.png'
62+
win_sizes = "64:96"
63+
x_hotspot = 55
64+
y_hotspot = 17
65+
win_name = 'Work'
66+
67+
[cursors.move]
68+
png = 'move.png'
69+
win_name = 'Move'
70+
71+
[cursors.pencil]
72+
png = 'pencil.png'
73+
x_hotspot = 46
74+
y_hotspot = 211
75+
win_name = 'Handwriting'
76+
77+
[cursors.question_arrow]
78+
png = 'question_arrow.png'
79+
x_hotspot = 42
80+
y_hotspot = 86
81+
win_name = 'Help'
82+
83+
[cursors.right_ptr]
84+
png = 'right_ptr.png'
85+
x_hotspot = 204
86+
y_hotspot = 17
87+
win_name = 'Alternate'
88+
89+
[cursors.sb_h_double_arrow]
90+
png = 'sb_h_double_arrow.png'
91+
win_name = 'Horz'
92+
93+
[cursors.sb_v_double_arrow]
94+
png = 'sb_v_double_arrow.png'
95+
win_name = 'Vert'
96+
97+
[cursors.wait]
98+
png = 'wait-*.png'
99+
win_sizes = "64:96"
100+
win_name = 'Busy'
101+
102+
[cursors.xterm]
103+
png = 'xterm.png'
104+
win_name = 'Text'
105+
106+
[cursors.zoom_in]
107+
png = 'zoom-in.png'
108+
x_hotspot = 116
109+
y_hotspot = 116
110+
win_name = 'Zoom-in'
111+
112+
[cursors.zoom_out]
113+
png = 'zoom-out.png'
114+
x_hotspot = 116
115+
y_hotspot = 116
116+
win_name = 'Zoom-out'
117+
118+
[cursors.person]
119+
png = 'person.png'
120+
x_hotspot = 55
121+
y_hotspot = 17
122+
win_name = 'Person'
123+
124+
[cursors.pin]
125+
png = 'pin.png'
126+
x_hotspot = 55
127+
y_hotspot = 17
128+
win_name = 'Pin'

0 commit comments

Comments
 (0)