improve openbrowser script

This commit is contained in:
LordMZTE 2022-11-16 23:03:53 +01:00
parent 2b893e53c1
commit b398de2978
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
2 changed files with 5 additions and 5 deletions

View file

@ -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.

View file

@ -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();