mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-15 05:33:58 -04:00
config: reuse HAVE_TERMINFO via DEFAULT_TERM
add detection in --help output also make it more easily accessible for other locations to change
This commit is contained in:
parent
792202bf29
commit
80b95eeb7e
3 changed files with 9 additions and 7 deletions
6
config.c
6
config.c
|
|
@ -2158,11 +2158,7 @@ config_load(struct config *conf, const char *conf_path,
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
*conf = (struct config) {
|
*conf = (struct config) {
|
||||||
#ifdef HAVE_TERMINFO
|
.term = xstrdup(DEFAULT_TERM),
|
||||||
.term = xstrdup("foot"),
|
|
||||||
#else
|
|
||||||
.term = xstrdup("xterm-256color"),
|
|
||||||
#endif
|
|
||||||
.shell = get_shell(),
|
.shell = get_shell(),
|
||||||
.title = xstrdup("foot"),
|
.title = xstrdup("foot"),
|
||||||
.app_id = xstrdup("foot"),
|
.app_id = xstrdup("foot"),
|
||||||
|
|
|
||||||
6
config.h
6
config.h
|
|
@ -9,6 +9,12 @@
|
||||||
#include "user-notification.h"
|
#include "user-notification.h"
|
||||||
#include "wayland.h"
|
#include "wayland.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_TERMINFO
|
||||||
|
#define DEFAULT_TERM "foot"
|
||||||
|
#else
|
||||||
|
#define DEFAULT_TERM "xterm-256color"
|
||||||
|
#endif
|
||||||
|
|
||||||
enum conf_size_type {CONF_SIZE_PX, CONF_SIZE_CELLS};
|
enum conf_size_type {CONF_SIZE_PX, CONF_SIZE_CELLS};
|
||||||
|
|
||||||
struct config_font {
|
struct config_font {
|
||||||
|
|
|
||||||
4
main.c
4
main.c
|
|
@ -61,7 +61,7 @@ print_usage(const char *prog_name)
|
||||||
" -c,--config=PATH load configuration from PATH ($XDG_CONFIG_HOME/foot/foot.ini)\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"
|
" -C,--check-config verify configuration, exit with 0 if ok, otherwise exit with 1\n"
|
||||||
" -f,--font=FONT comma separated list of fonts in fontconfig format (monospace)\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 (foot)\n"
|
" -t,--term=TERM value to set the environment variable TERM to (%s)\n"
|
||||||
" -T,--title=TITLE initial window title (foot)\n"
|
" -T,--title=TITLE initial window title (foot)\n"
|
||||||
" -a,--app-id=ID window application ID (foot)\n"
|
" -a,--app-id=ID window application ID (foot)\n"
|
||||||
" -m,--maximized start in maximized mode\n"
|
" -m,--maximized start in maximized mode\n"
|
||||||
|
|
@ -78,7 +78,7 @@ print_usage(const char *prog_name)
|
||||||
" -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\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"
|
" -s,--log-no-syslog disable syslog logging (only applicable in server mode)\n"
|
||||||
" -v,--version show the version number and quit\n",
|
" -v,--version show the version number and quit\n",
|
||||||
prog_name, prog_name);
|
prog_name, prog_name, DEFAULT_TERM);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue