diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-10-01 18:50:32 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-10-01 18:50:32 +0000 |
| commit | a082fec786d44bfbe8d2172c6317121027735a6b (patch) | |
| tree | cf2a9fc4a822f4701a0a90db41b1c3ac03dd333a /main.c | |
| parent | meson/pkgbuild: bump version to 1.9.0 (diff) | |
| parent | Merge branch 'hacktober-theme' (diff) | |
Merge branch 'master' into releases/1.9
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 27 |
1 files changed, 18 insertions, 9 deletions
@@ -56,16 +56,13 @@ version_and_features(void) static void print_usage(const char *prog_name) { - printf( - "Usage: %s [OPTIONS...]\n" - "Usage: %s [OPTIONS...] command [ARGS...]\n" - "\n" - "Options:\n" + static const char options[] = + "\nOptions:\n" " -c,--config=PATH load configuration from PATH ($XDG_CONFIG_HOME/foot/foot.ini)\n" " -C,--check-config verify configuration, exit with 0 if ok, otherwise exit with 1\n" " -o,--override=[section.]key=value override configuration option\n" " -f,--font=FONT comma separated list of fonts in fontconfig format (monospace)\n" - " -t,--term=TERM value to set the environment variable TERM to (%s)\n" + " -t,--term=TERM value to set the environment variable TERM to (" FOOT_DEFAULT_TERM ")\n" " -T,--title=TITLE initial window title (foot)\n" " -a,--app-id=ID window application ID (foot)\n" " -m,--maximized start in maximized mode\n" @@ -81,8 +78,12 @@ print_usage(const char *prog_name) " -d,--log-level={info|warning|error|none} log level (info)\n" " -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\n" " -s,--log-no-syslog disable syslog logging (only applicable in server mode)\n" - " -v,--version show the version number and quit\n", - prog_name, prog_name, FOOT_DEFAULT_TERM); + " -v,--version show the version number and quit\n" + " -e ignored (for compatibility with xterm -e)\n"; + + printf("Usage: %s [OPTIONS...]\n", prog_name); + printf("Usage: %s [OPTIONS...] command [ARGS...]\n", prog_name); + puts(options); } bool @@ -216,7 +217,7 @@ main(int argc, char *const *argv) config_override_t overrides = tll_init(); while (true) { - int c = getopt_long(argc, argv, "+c:Co:t:T:a:LD:f:w:W:s::HmFPp:d:l::Svh", longopts, NULL); + int c = getopt_long(argc, argv, "+c:Co:t:T:a:LD:f:w:W:s::HmFPp:d:l::Sveh", longopts, NULL); if (c == -1) break; @@ -375,6 +376,9 @@ main(int argc, char *const *argv) print_usage(prog_name); return EXIT_SUCCESS; + case 'e': + break; + case '?': return ret; } @@ -480,6 +484,11 @@ main(int argc, char *const *argv) conf.presentation_timings = presentation_timings; conf.hold_at_exit = hold; + if (conf.tweak.font_monospace_warn && conf.fonts[0].count > 0) { + check_if_font_is_monospaced( + conf.fonts[0].arr[0].pattern, &conf.notifications); + } + struct fdm *fdm = NULL; struct reaper *reaper = NULL; struct wayland *wayl = NULL; |
