mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-14 06:33:47 +01:00
improve openbrowser script
This commit is contained in:
parent
2b893e53c1
commit
b398de2978
2 changed files with 5 additions and 5 deletions
5
scripts/openbrowser/README.md
Normal file
5
scripts/openbrowser/README.md
Normal 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.
|
|
@ -11,11 +11,6 @@ const browsers = &[_][]const u8{
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
if (std.os.argv.len < 2) {
|
|
||||||
std.log.err("need >=1 argument", .{});
|
|
||||||
return error.WrongArgs;
|
|
||||||
}
|
|
||||||
|
|
||||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
defer _ = gpa.deinit();
|
defer _ = gpa.deinit();
|
||||||
const alloc = gpa.allocator();
|
const alloc = gpa.allocator();
|
||||||
|
|
Loading…
Reference in a new issue