feat: update zenbones to latest release and add all themes from the collection
This commit is contained in:
parent
82b64b6a7f
commit
618a7801d3
4 changed files with 128 additions and 25 deletions
57
build.zig
57
build.zig
|
|
@ -84,5 +84,62 @@ fn add_themes(b: *std.Build, exe: anytype) void {
|
||||||
theme_file(b, exe, "catppuccin", "themes/macchiato.json");
|
theme_file(b, exe, "catppuccin", "themes/macchiato.json");
|
||||||
theme_file(b, exe, "catppuccin", "themes/mocha.json");
|
theme_file(b, exe, "catppuccin", "themes/mocha.json");
|
||||||
theme_file(b, exe, "mellow", "themes/mellow.json");
|
theme_file(b, exe, "mellow", "themes/mellow.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/duckbones_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/duckbones_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/duckbones_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/forestbones_dark_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/forestbones_dark_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/forestbones_dark_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/forestbones_light_bright.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/forestbones_light_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/forestbones_light_dim.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/kanagawabones_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/kanagawabones_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/kanagawabones_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/neobones_dark_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/neobones_dark_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/neobones_dark_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/neobones_light_bright.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/neobones_light_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/neobones_light_dim.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/nordbones_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/nordbones_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/nordbones_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/rosebones_dark_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/rosebones_dark_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/rosebones_dark_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/rosebones_light_bright.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/rosebones_light_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/rosebones_light_dim.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/seoulbones_dark_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/seoulbones_dark_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/seoulbones_dark_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/seoulbones_light_bright.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/seoulbones_light_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/seoulbones_light_dim.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/tokyobones_dark_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/tokyobones_dark_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/tokyobones_dark_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/tokyobones_light_bright.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/tokyobones_light_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/tokyobones_light_dim.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/vimbones_bright.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/vimbones_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/vimbones_dim.json");
|
||||||
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenbones_dark_default.json");
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenbones_dark_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenbones_dark_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenbones_dark_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenbones_dark_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenbones_light_bright.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenbones_light_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenbones_light_dim.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenburned_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenburned_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenburned_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenwritten_dark_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenwritten_dark_stark.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenwritten_dark_warm.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenwritten_light_bright.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenwritten_light_default.json");
|
||||||
|
theme_file(b, exe, "zenbones", "extras/vscode/themes/zenwritten_light_dim.json");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@
|
||||||
.hash = "122062276c850b37d78f4f981c25c1b14f05d1124429b6e496fe059107c9115d00da",
|
.hash = "122062276c850b37d78f4f981c25c1b14f05d1124429b6e496fe059107c9115d00da",
|
||||||
},
|
},
|
||||||
.theme_zenbones = .{
|
.theme_zenbones = .{
|
||||||
.url = "https://github.com/rpbritton/zenbones.vscode/archive/97c071875576078395a9dc026ec71a5ff8db68ab.tar.gz",
|
.url = "https://github.com/rpbritton/zenbones.vscode/archive/c587792a912ac8f81e244d951ad95564ef5b8c0e.tar.gz",
|
||||||
.hash = "12205871af8254b098b844d684e13eebe038aca0671f18e051ffeadf350c761d6e18"
|
.hash = "122053dbc0b7c047e80db931873f4127ce8301eb4b2e779aede2616fc79f3b23abda",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
|
|
||||||
|
|
@ -316,27 +316,11 @@ fn find_in_colors(name: []const u8, iter: *[]const u8) ?Color {
|
||||||
var len = cbor.decodeMapHeader(iter) catch return null;
|
var len = cbor.decodeMapHeader(iter) catch return null;
|
||||||
while (len > 0) : (len -= 1) {
|
while (len > 0) : (len -= 1) {
|
||||||
var field_name: []const u8 = undefined;
|
var field_name: []const u8 = undefined;
|
||||||
// Try to match field name, skip if not a string
|
var value: []const u8 = undefined;
|
||||||
if (cbor.matchString(iter, &field_name) catch false) {
|
if (!(cbor.matchString(iter, &field_name) catch unreachable)) unreachable;
|
||||||
// If we find the field we're looking for
|
if (!(cbor.matchString(iter, &value) catch unreachable)) unreachable;
|
||||||
if (eql(u8, field_name, name)) {
|
if (eql(u8, field_name, name))
|
||||||
var value: []const u8 = undefined;
|
return parse_color_value(value);
|
||||||
// Try to match the value as string
|
|
||||||
if (cbor.matchString(iter, &value) catch false) {
|
|
||||||
return parse_color_value(value);
|
|
||||||
} else {
|
|
||||||
// Skip non-string value
|
|
||||||
cbor.skipValue(iter) catch return null;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Skip value for non-matching field
|
|
||||||
cbor.skipValue(iter) catch return null;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Skip both non-string field name and its value
|
|
||||||
cbor.skipValue(iter) catch return null;
|
|
||||||
cbor.skipValue(iter) catch return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,42 @@ pub const theme_files = [_]theme_file{
|
||||||
THEME("themes/macchiato.json"),
|
THEME("themes/macchiato.json"),
|
||||||
THEME("themes/mocha.json"),
|
THEME("themes/mocha.json"),
|
||||||
THEME("themes/mellow.json"),
|
THEME("themes/mellow.json"),
|
||||||
|
|
||||||
|
// zenbones collection dark
|
||||||
|
|
||||||
THEME("extras/vscode/themes/zenbones_dark_default.json"),
|
THEME("extras/vscode/themes/zenbones_dark_default.json"),
|
||||||
|
THEME("extras/vscode/themes/zenbones_dark_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/zenbones_dark_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/duckbones_default.json"),
|
||||||
|
THEME("extras/vscode/themes/duckbones_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/duckbones_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/forestbones_dark_default.json"),
|
||||||
|
THEME("extras/vscode/themes/forestbones_dark_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/forestbones_dark_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/kanagawabones_default.json"),
|
||||||
|
THEME("extras/vscode/themes/kanagawabones_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/kanagawabones_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/neobones_dark_default.json"),
|
||||||
|
THEME("extras/vscode/themes/neobones_dark_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/neobones_dark_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/nordbones_default.json"),
|
||||||
|
THEME("extras/vscode/themes/nordbones_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/nordbones_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/rosebones_dark_default.json"),
|
||||||
|
THEME("extras/vscode/themes/rosebones_dark_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/rosebones_dark_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/seoulbones_dark_default.json"),
|
||||||
|
THEME("extras/vscode/themes/seoulbones_dark_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/seoulbones_dark_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/tokyobones_dark_default.json"),
|
||||||
|
THEME("extras/vscode/themes/tokyobones_dark_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/tokyobones_dark_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/zenburned_default.json"),
|
||||||
|
THEME("extras/vscode/themes/zenburned_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/zenburned_warm.json"),
|
||||||
|
THEME("extras/vscode/themes/zenwritten_dark_default.json"),
|
||||||
|
THEME("extras/vscode/themes/zenwritten_dark_stark.json"),
|
||||||
|
THEME("extras/vscode/themes/zenwritten_dark_warm.json"),
|
||||||
|
|
||||||
// light themes
|
// light themes
|
||||||
|
|
||||||
|
|
@ -67,9 +102,36 @@ pub const theme_files = [_]theme_file{
|
||||||
THEME("themes/adwaita-light.json"),
|
THEME("themes/adwaita-light.json"),
|
||||||
THEME("themes/everforest-light.json"),
|
THEME("themes/everforest-light.json"),
|
||||||
THEME("themes/latte.json"),
|
THEME("themes/latte.json"),
|
||||||
|
|
||||||
|
// zenbones collection light
|
||||||
|
|
||||||
|
THEME("extras/vscode/themes/zenbones_light_bright.json"),
|
||||||
|
THEME("extras/vscode/themes/zenbones_light_default.json"),
|
||||||
|
THEME("extras/vscode/themes/zenbones_light_dim.json"),
|
||||||
|
THEME("extras/vscode/themes/forestbones_light_bright.json"),
|
||||||
|
THEME("extras/vscode/themes/forestbones_light_default.json"),
|
||||||
|
THEME("extras/vscode/themes/forestbones_light_dim.json"),
|
||||||
|
THEME("extras/vscode/themes/neobones_light_bright.json"),
|
||||||
|
THEME("extras/vscode/themes/neobones_light_default.json"),
|
||||||
|
THEME("extras/vscode/themes/neobones_light_dim.json"),
|
||||||
|
THEME("extras/vscode/themes/rosebones_light_bright.json"),
|
||||||
|
THEME("extras/vscode/themes/rosebones_light_default.json"),
|
||||||
|
THEME("extras/vscode/themes/rosebones_light_dim.json"),
|
||||||
|
THEME("extras/vscode/themes/seoulbones_light_bright.json"),
|
||||||
|
THEME("extras/vscode/themes/seoulbones_light_default.json"),
|
||||||
|
THEME("extras/vscode/themes/seoulbones_light_dim.json"),
|
||||||
|
THEME("extras/vscode/themes/tokyobones_light_bright.json"),
|
||||||
|
THEME("extras/vscode/themes/tokyobones_light_default.json"),
|
||||||
|
THEME("extras/vscode/themes/tokyobones_light_dim.json"),
|
||||||
|
THEME("extras/vscode/themes/vimbones_bright.json"),
|
||||||
|
THEME("extras/vscode/themes/vimbones_default.json"),
|
||||||
|
THEME("extras/vscode/themes/vimbones_dim.json"),
|
||||||
|
THEME("extras/vscode/themes/zenwritten_light_bright.json"),
|
||||||
|
THEME("extras/vscode/themes/zenwritten_light_default.json"),
|
||||||
|
THEME("extras/vscode/themes/zenwritten_light_dim.json"),
|
||||||
};
|
};
|
||||||
|
|
||||||
fn THEME(comptime file_path: []const u8) theme_file {
|
fn THEME(comptime file_path: []const u8) theme_file {
|
||||||
@setEvalBranchQuota(2000);
|
@setEvalBranchQuota(10000);
|
||||||
return .{ .file_name = std.fs.path.basename(file_path), .json = @embedFile(file_path) };
|
return .{ .file_name = std.fs.path.basename(file_path), .json = @embedFile(file_path) };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue