diff --git a/scripts/openbrowser/README.md b/scripts/openbrowser/README.md new file mode 100644 index 0000000..fc83983 --- /dev/null +++ b/scripts/openbrowser/README.md @@ -0,0 +1,5 @@ +# openbrowser + +This script checks for a running web browser instance, and starts it if found, falling back to a default browser if none is running. + +This is meant to make it easier to manage multiple browsers, as the default URL handler will now no longer open a totally different browser when one is already running. diff --git a/scripts/openbrowser/src/main.zig b/scripts/openbrowser/src/main.zig index bc45887..596f3bb 100644 --- a/scripts/openbrowser/src/main.zig +++ b/scripts/openbrowser/src/main.zig @@ -11,11 +11,6 @@ const browsers = &[_][]const u8{ }; pub fn main() !void { - if (std.os.argv.len < 2) { - std.log.err("need >=1 argument", .{}); - return error.WrongArgs; - } - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; defer _ = gpa.deinit(); const alloc = gpa.allocator();