aboutsummaryrefslogtreecommitdiffstats
path: root/src/print.c
diff options
context:
space:
mode:
authorAntoine Fontaine <antoine.fontaine@epfl.ch>2020-03-21 12:09:28 +0100
committerTimo Teräs <timo.teras@iki.fi>2020-03-21 17:41:49 +0200
commite8522411c1b410c87049e9b77b391caf2f158be7 (patch)
tree52cb0c8d4693f1b2274aea55cfc0c1f4937b34d9 /src/print.c
parenta9916c2d4a14a509daf7e3bc73faee3a8134071f (diff)
downloadaports-e8522411c1b410c87049e9b77b391caf2f158be7.tar.bz2
aports-e8522411c1b410c87049e9b77b391caf2f158be7.tar.xz
lower min-width to 25 columns
Some screen size are quite small. For example, the default phosh terminal is less than 50 character wide on Pinephone. This lowers the minimum loading bar size to 25 characters. For comparison, 25 character wide is just as wide as "apk add firefox linux-lts" without the quotes. Here's a bad picture to illustrate the result gitlab.alpine.org/uploads/48c20f746fbf685b62b6bd73585ecbf2/pinephone-phosh.png
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c
index 21b8db78f0..6b8c2ed796 100644
--- a/src/print.c
+++ b/src/print.c
@@ -42,7 +42,7 @@ int apk_get_screen_width(void)
if (apk_screen_width == 0) {
apk_screen_width = 50;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) == 0 &&
- w.ws_col > 50)
+ w.ws_col > 25)
apk_screen_width = w.ws_col;
}