diff options
author | zachir <zachir@librem.one> | 2025-07-19 00:17:13 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2025-07-19 00:17:13 -0500 |
commit | 605f503d9b7334570a8c01a0ab1cb21baf2f3472 (patch) | |
tree | 67cde5f3f5ca4ac619fc636808e633ec236c83ce | |
parent | 131608c34f93a6c2b05777338a02bd4e89948bf6 (diff) |
Don't make dmenu compat new config file options
-rw-r--r-- | src/config.c | 6 | ||||
-rw-r--r-- | src/main.c | 13 |
2 files changed, 5 insertions, 14 deletions
diff --git a/src/config.c b/src/config.c index 98015ce..52e14d8 100644 --- a/src/config.c +++ b/src/config.c @@ -319,12 +319,6 @@ bool parse_option(struct tofi *tofi, const char *filename, size_t lineno, const free(config); free(tmp); } - } else if (strcasecmp(option, "bottom") == 0) { - tofi->anchor = ANCHOR_BOTTOM; - } else if (strcasecmp(option, "password") == 0) { - tofi->window.entry.hide_input = true; - } else if (strcasecmp(option, "require") == 0) { - tofi->require_match = true; } else if (strcasecmp(option, "anchor") == 0) { uint32_t val = parse_anchor(filename, lineno, value, &err); if (!err) { @@ -845,9 +845,6 @@ static void usage(bool err) /* Option parsing with getopt. */ const struct option long_options[] = { {"help", no_argument, NULL, 'h'}, - {"bottom", no_argument, NULL, 'b'}, - {"password", no_argument, NULL, 'P'}, - {"require", no_argument, NULL, 'r'}, {"config", required_argument, NULL, 'c'}, {"include", required_argument, NULL, 0}, {"anchor", required_argument, NULL, 0}, @@ -984,15 +981,15 @@ static void parse_args(struct tofi *tofi, int argc, char *argv[]) exit(EXIT_FAILURE); } } else if (opt == 'b') { - if (!config_apply(tofi, "bottom", optarg)) { + if (!config_apply(tofi, "anchor", "bottom")) { exit(EXIT_FAILURE); } - } else if (opt == 'P') { - if (!config_apply(tofi, "password", optarg)) { + } else if (opt == 'r') { + if (!config_apply(tofi, "require-match", "true")) { exit(EXIT_FAILURE); } - } else if (opt == 'r') { - if (!config_apply(tofi, "require", optarg)) { + } else if (opt == 'P') { + if (!config_apply(tofi, "hide-input", "true")) { exit(EXIT_FAILURE); } } else if (opt == 'p') { |