mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-06-01 08:43:03 +02:00
update wezterm config and port some script to new zig
This commit is contained in:
parent
4c46507804
commit
93baba1e7c
|
@ -62,6 +62,13 @@ local keys = {
|
|||
mods = "ALT",
|
||||
action = wt.action.ScrollByPage(1),
|
||||
},
|
||||
|
||||
-- copying
|
||||
{
|
||||
key = "C",
|
||||
mods = "CTRL|SHIFT",
|
||||
action = wt.action.CopyTo "ClipboardAndPrimarySelection",
|
||||
}
|
||||
}
|
||||
|
||||
local directions = {
|
||||
|
|
3
scripts/mzteinit/.gitignore
vendored
3
scripts/mzteinit/.gitignore
vendored
|
@ -1,5 +1,2 @@
|
|||
zig-cache/
|
||||
zig-out/
|
||||
deps.zig
|
||||
gyro.lock
|
||||
.gyro
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
const std = @import("std");
|
||||
const pkgs = @import("deps.zig").pkgs;
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
// for restricting supported target set are available.
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const mode = b.standardOptimizeOption(.{});
|
||||
|
||||
// Standard release options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
const mode = b.standardReleaseOptions();
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "mzteinit",
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.target = target,
|
||||
.optimize = mode,
|
||||
});
|
||||
|
||||
const exe = b.addExecutable("mzteinit", "src/main.zig");
|
||||
exe.setTarget(target);
|
||||
exe.strip = mode != .Debug;
|
||||
|
||||
pkgs.addAllTo(exe);
|
||||
exe.addModule("ansi-term", b.dependency("ansi_term", .{}).module("ansi-term"));
|
||||
|
||||
exe.setBuildMode(mode);
|
||||
exe.install();
|
||||
|
||||
const run_cmd = exe.run();
|
||||
|
@ -29,11 +25,4 @@ pub fn build(b: *std.build.Builder) void {
|
|||
|
||||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
const exe_tests = b.addTest("src/main.zig");
|
||||
exe_tests.setTarget(target);
|
||||
exe_tests.setBuildMode(mode);
|
||||
|
||||
const test_step = b.step("test", "Run unit tests");
|
||||
test_step.dependOn(&exe_tests.step);
|
||||
}
|
||||
|
|
11
scripts/mzteinit/build.zig.zon
Normal file
11
scripts/mzteinit/build.zig.zon
Normal file
|
@ -0,0 +1,11 @@
|
|||
.{
|
||||
.name = "mzteinit",
|
||||
.version = "0.0.0",
|
||||
|
||||
.dependencies = .{
|
||||
.ansi_term = .{
|
||||
.url = "https://github.com/LordMZTE/ansi-term/archive/feb152d594486e7dce09e0ee8dd168155de7ce7c.tar.gz",
|
||||
.hash = "122054a0aadb65c0b51e0d2b6083272c8ccd59abe83469425c3ea03030e450df4625",
|
||||
},
|
||||
},
|
||||
},
|
|
@ -1,19 +1,15 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
// for restricting supported target set are available.
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const mode = b.standardOptimizeOption(.{});
|
||||
|
||||
// Standard release options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
const mode = b.standardReleaseOptions();
|
||||
|
||||
const exe = b.addExecutable("openbrowser", "src/main.zig");
|
||||
exe.setTarget(target);
|
||||
exe.setBuildMode(mode);
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "openbrowser",
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.target = target,
|
||||
.optimize = mode,
|
||||
});
|
||||
exe.install();
|
||||
|
||||
const desktop_install_step = b.addInstallFile(
|
||||
|
@ -30,11 +26,4 @@ pub fn build(b: *std.build.Builder) void {
|
|||
|
||||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
const exe_tests = b.addTest("src/main.zig");
|
||||
exe_tests.setTarget(target);
|
||||
exe_tests.setBuildMode(mode);
|
||||
|
||||
const test_step = b.step("test", "Run unit tests");
|
||||
test_step.dependOn(&exe_tests.step);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue