mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-25 01:40:24 -05:00
feat: support -c option to specified config file
This commit is contained in:
parent
a2902a469b
commit
1ffdc1ef38
3 changed files with 22 additions and 4 deletions
|
|
@ -852,6 +852,7 @@ struct dvec2 *baked_points_focus;
|
|||
static struct wl_event_source *hide_source;
|
||||
static bool cursor_hidden = false;
|
||||
static bool tag_combo = false;
|
||||
static const char *cli_config_path = NULL;
|
||||
static KeyMode keymode = {
|
||||
.mode = {'d', 'e', 'f', 'a', 'u', 'l', 't', '\0'},
|
||||
.isdefault = true,
|
||||
|
|
@ -5908,13 +5909,15 @@ int main(int argc, char *argv[]) {
|
|||
char *startup_cmd = NULL;
|
||||
int c;
|
||||
|
||||
while ((c = getopt(argc, argv, "s:hdv")) != -1) {
|
||||
while ((c = getopt(argc, argv, "s:c:hdv")) != -1) {
|
||||
if (c == 's')
|
||||
startup_cmd = optarg;
|
||||
else if (c == 'd')
|
||||
log_level = WLR_DEBUG;
|
||||
else if (c == 'v')
|
||||
die("mango " VERSION);
|
||||
else if (c == 'c')
|
||||
cli_config_path = optarg;
|
||||
else
|
||||
goto usage;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue