From ac32bcda07015dbf00f3b804f5e4595cd7994245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 25 Feb 2020 19:05:48 +0100 Subject: [PATCH] main: geometry defaults to 800x600 pixels --- completions/zsh/_foot | 2 +- config.c | 4 ++-- doc/foot.1.scd | 2 +- footrc | 2 +- terminal.c | 7 ------- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/completions/zsh/_foot b/completions/zsh/_foot index ad04a467..0132604a 100644 --- a/completions/zsh/_foot +++ b/completions/zsh/_foot @@ -6,7 +6,7 @@ _arguments \ '(-f --font)'{-f,--font}'[font name and style in fontconfig format (monospace)]:font:->fonts' \ '(-t --term)'{-t,--term}'[value to set the environment variable TERM to (foot)]:term:->terms' \ '--login-shell[start shell as a login shell]' \ - '(-g --geometry)'{-g,--geometry}'[window WIDTHxHEIGHT, in pixels (80x24 cells)]:geometry:()' \ + '(-g --geometry)'{-g,--geometry}'[window WIDTHxHEIGHT, in pixels (800x600)]:geometry:()' \ '(-s --server)'{-s,--server}'[run as server; open terminals by running footclient]:server:_files' \ '--hold[remain open after child process exits]' \ '(-p --print-pid)'{-p,--print-pid}'[print PID to this file or FD when up and running (server mode only)]:pidfile:_files' \ diff --git a/config.c b/config.c index 39a72648..7f23d7fe 100644 --- a/config.c +++ b/config.c @@ -491,8 +491,8 @@ config_load(struct config *conf, const char *conf_path) *conf = (struct config) { .term = strdup("foot"), .shell = get_shell(), - .width = -1, - .height = -1, + .width = 800, + .height = 600, .pad_x = 2, .pad_y = 2, .fonts = tll_init(), diff --git a/doc/foot.1.scd b/doc/foot.1.scd index 8b5268b7..97815066 100644 --- a/doc/foot.1.scd +++ b/doc/foot.1.scd @@ -31,7 +31,7 @@ execute (instead of the shell). Default: _monospace_. *-g*,*--geometry*=_WIDTHxHEIGHT_ - Set initial window width and height. + Set initial window width and height. Default: *800x600*. *-t*,*--term*=_TERM_ Value to set the environment variable *TERM* to. Default: *foot*. diff --git a/footrc b/footrc index 337be31b..e6010eb2 100644 --- a/footrc +++ b/footrc @@ -2,7 +2,7 @@ # font=monospace # scrollback=1000 -# geometry=500x300 +# geometry=800x600 # pad=2x2 # shell= (you may need to override if you need a login shell) # term=foot diff --git a/terminal.c b/terminal.c index d97354cd..000d95b3 100644 --- a/terminal.c +++ b/terminal.c @@ -791,13 +791,6 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl, unsigned width = conf->width; unsigned height = conf->height; - if (width == -1) { - /* No user-configuration - use 80x24 cells */ - assert(height == -1); - width = 80 * term->cell_width; - height = 24 * term->cell_height; - } - /* Don't go below a single cell */ width = max(width, term->cell_width); height = max(height, term->cell_height);