Permalink
Browse files

Nicer window title

  • Loading branch information...
1 parent ef0ed32 commit 8fc7cb73b37cb00f164425bcced0afbc949a3429 @muennich committed Feb 11, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 main.c
View
10 main.c
@@ -223,24 +223,24 @@ void update_title(void) {
const char *size_unit;
if (mode == MODE_THUMB) {
- n = snprintf(win_title, TITLE_LEN, "sxiv: [%d/%d] %s",
+ n = snprintf(win_title, TITLE_LEN, "sxiv: %d/%d %s",
tns.cnt ? tns.sel + 1 : 0, tns.cnt,
tns.cnt ? files[tns.sel].name : "");
} else {
size = filesize;
size_readable(&size, &size_unit);
if (img.multi.cnt > 0)
- snprintf(frame_info, sizeof(frame_info), "{%d/%d} ",
+ snprintf(frame_info, sizeof(frame_info), " (%d/%d)",
img.multi.sel + 1, img.multi.cnt);
else
frame_info[0] = '\0';
n = snprintf(win_title, TITLE_LEN,
- "sxiv: [%d/%d] <%dx%d:%d%%> (%.2f%s) %s%s",
- fileidx + 1, filecnt, img.w, img.h,
+ "sxiv: %d/%d%s %dx%d %d%% %.2f%s %s",
+ fileidx + 1, filecnt, frame_info, img.w, img.h,
(int) (img.zoom * 100.0), size, size_unit,
- frame_info, files[fileidx].name);
+ files[fileidx].name);
}
if (n >= TITLE_LEN) {

0 comments on commit 8fc7cb7

Please sign in to comment.