From 00e6cd2bd1a7bfc0b9fcbf958cefee07ef41cb71 Mon Sep 17 00:00:00 2001 From: Bert Date: Sun, 22 May 2011 19:42:33 +0200 Subject: [PATCH] Show image dimension in window title --- Makefile | 2 +- main.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bb66592..c1c3169 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ all: sxiv -VERSION=git-20110516 +VERSION=git-20110522 CC?=gcc DESTDIR?= diff --git a/main.c b/main.c index 292c3bb..421d14f 100644 --- a/main.c +++ b/main.c @@ -135,9 +135,10 @@ void update_title() { } else { size = filesize; size_readable(&size, &unit); - n = snprintf(win_title, TITLE_LEN, "sxiv: [%d/%d] <%d%%> (%.2f%s) %s", - fileidx + 1, filecnt, (int) (img.zoom * 100.0), size, unit, - filenames[fileidx]); + n = snprintf(win_title, TITLE_LEN, + "sxiv: [%d/%d] <%d%%> <%dx%d> (%.2f%s) %s", + fileidx + 1, filecnt, (int) (img.zoom * 100.0), img.w, img.h, + size, unit, filenames[fileidx]); } if (n >= TITLE_LEN) {