mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 02:02:14 +02:00
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/2cdc7e8f-5b64-4c97-bd65-dec508155313 Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
30 lines
735 B
C
30 lines
735 B
C
/*
|
|
* launcher.h
|
|
* Copyright (C) 2024 Kovid Goyal <kovid at kovidgoyal.net>
|
|
*
|
|
* Distributed under terms of the GPL3 license.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
|
|
typedef struct CLIOptions {
|
|
const char *session, *instance_group;
|
|
bool wait_for_single_instance_window_close;
|
|
int open_url_count; char **open_urls;
|
|
} CLIOptions;
|
|
|
|
|
|
typedef struct argv_array {
|
|
char **argv, *buf; size_t capacity, count, pos;
|
|
bool needs_free;
|
|
} argv_array;
|
|
|
|
|
|
void single_instance_main(int argc, char *argv[], const CLIOptions *opts);
|
|
bool get_argv_from(const char *filename, const char* argv0, argv_array *ans);
|
|
bool append_arg_to_argv_array(argv_array *a, const char *arg);
|
|
void free_argv_array(argv_array *a);
|