diff options
author | Bert Münnich <ber.t@posteo.de> | 2017-12-07 21:44:40 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2017-12-07 21:44:59 +0100 |
commit | 8a9e3ea43e6fe93f132d7d5a1b141416b96ad76f (patch) | |
tree | 331c9ad9a52ed9ba4fea9504da990c8baf35ee92 | |
parent | e63843d36910308338e442f848c763a02b825933 (diff) |
Separate bar fields only by spaces
-rw-r--r-- | exec/image-info | 2 | ||||
-rw-r--r-- | main.c | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/exec/image-info b/exec/image-info index 1a808f7..a0a0195 100644 --- a/exec/image-info +++ b/exec/image-info @@ -8,7 +8,7 @@ # $2: image width # $3: image height -s=" | " # field separator +s=" " # field separator exec 2>/dev/null @@ -330,6 +330,8 @@ void bar_put(win_bar_t *bar, const char *fmt, ...) va_end(ap); } +#define BAR_SEP " " + void update_info(void) { unsigned int i, fn, fw; @@ -364,16 +366,16 @@ void update_info(void) bar_put(r, "%s", mark); if (img.ss.on) { if (img.ss.delay % 10 != 0) - bar_put(r, "%2.1fs | ", (float)img.ss.delay / 10); + bar_put(r, "%2.1fs" BAR_SEP, (float)img.ss.delay / 10); else - bar_put(r, "%ds | ", img.ss.delay / 10); + bar_put(r, "%ds" BAR_SEP, img.ss.delay / 10); } if (img.gamma != 0) - bar_put(r, "G%+d | ", img.gamma); - bar_put(r, "%3d%% | ", (int) (img.zoom * 100.0)); + bar_put(r, "G%+d" BAR_SEP, img.gamma); + bar_put(r, "%3d%%" BAR_SEP, (int) (img.zoom * 100.0)); if (img.multi.cnt > 0) { for (fn = 0, i = img.multi.cnt; i > 0; fn++, i /= 10); - bar_put(r, "%0*d/%d | ", fn, img.multi.sel + 1, img.multi.cnt); + bar_put(r, "%0*d/%d" BAR_SEP, fn, img.multi.sel + 1, img.multi.cnt); } bar_put(r, "%0*d/%d", fw, fileidx + 1, filecnt); if (info.f.err) |