Krolyxon
Commit 8a9e3ea

Branches

Refs →

nsxiv8a9e3ea

Separate bar fields only by spaces

Author
Bert Münnich
Date
2017-12-07 21:44 +0100
Committer
Bert Münnich · 2017-12-07 21:44 +0100
Parent
e63843d
Commit
8a9e3ea43e6fe93f132d7d5a1b141416b96ad76f

+8 −6

2 files changed

  1. M exec/image-info +1 −1
  2. M main.c +7 −5
M exec/image-info View
@@ -8,7 +8,7 @@
88 # $2: image width
99 # $3: image height
1010
11−s=" | " # field separator
11+s=" " # field separator
1212
1313 exec 2>/dev/null
1414
M main.c View
@@ -330,6 +330,8 @@ void bar_put(win_bar_t *bar, const char *fmt, ...)
330330 va_end(ap);
331331 }
332332
333+#define BAR_SEP " "
334+
333335 void update_info(void)
334336 {
335337 unsigned int i, fn, fw;
@@ -364,16 +366,16 @@ void update_info(void)
364366 bar_put(r, "%s", mark);
365367 if (img.ss.on) {
366368 if (img.ss.delay % 10 != 0)
367− bar_put(r, "%2.1fs | ", (float)img.ss.delay / 10);
369+ bar_put(r, "%2.1fs" BAR_SEP, (float)img.ss.delay / 10);
368370 else
369− bar_put(r, "%ds | ", img.ss.delay / 10);
371+ bar_put(r, "%ds" BAR_SEP, img.ss.delay / 10);
370372 }
371373 if (img.gamma != 0)
372− bar_put(r, "G%+d | ", img.gamma);
373− bar_put(r, "%3d%% | ", (int) (img.zoom * 100.0));
374+ bar_put(r, "G%+d" BAR_SEP, img.gamma);
375+ bar_put(r, "%3d%%" BAR_SEP, (int) (img.zoom * 100.0));
374376 if (img.multi.cnt > 0) {
375377 for (fn = 0, i = img.multi.cnt; i > 0; fn++, i /= 10);
376− bar_put(r, "%0*d/%d | ", fn, img.multi.sel + 1, img.multi.cnt);
378+ bar_put(r, "%0*d/%d" BAR_SEP, fn, img.multi.sel + 1, img.multi.cnt);
377379 }
378380 bar_put(r, "%0*d/%d", fw, fileidx + 1, filecnt);
379381 if (info.f.err)