nsxiv8a9e3ea
Separate bar fields only by spaces
+8 −6
2 files changed
- M exec/image-info +1 −1
- M main.c +7 −5
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | # $2: image width | |
| 9 | 9 | # $3: image height | |
| 10 | 10 | ||
| 11 | − | s=" | " # field separator | |
| 11 | + | s=" " # field separator | |
| 12 | 12 | ||
| 13 | 13 | exec 2>/dev/null | |
| 14 | 14 | ||
| @@ -330,6 +330,8 @@ void bar_put(win_bar_t *bar, const char *fmt, ...) | |||
| 330 | 330 | va_end(ap); | |
| 331 | 331 | } | |
| 332 | 332 | ||
| 333 | + | #define BAR_SEP " " | |
| 334 | + | ||
| 333 | 335 | void update_info(void) | |
| 334 | 336 | { | |
| 335 | 337 | unsigned int i, fn, fw; | |
| @@ -364,16 +366,16 @@ void update_info(void) | |||
| 364 | 366 | bar_put(r, "%s", mark); | |
| 365 | 367 | if (img.ss.on) { | |
| 366 | 368 | 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); | |
| 368 | 370 | else | |
| 369 | − | bar_put(r, "%ds | ", img.ss.delay / 10); | |
| 371 | + | bar_put(r, "%ds" BAR_SEP, img.ss.delay / 10); | |
| 370 | 372 | } | |
| 371 | 373 | 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)); | |
| 374 | 376 | if (img.multi.cnt > 0) { | |
| 375 | 377 | 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); | |
| 377 | 379 | } | |
| 378 | 380 | bar_put(r, "%0*d/%d", fw, fileidx + 1, filecnt); | |
| 379 | 381 | if (info.f.err) | |