aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-09-15 05:35:45 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-09-15 05:35:58 +0530
commit9afe09b4b5df036d16738e506246d6ae0512bdd3 (patch)
treedf8aac23040fa029b0830ed65efdc5b96b6955b9 /src/nnn.c
parent5936d3f1108e2835cff8a7b3b298f5b80f41d730 (diff)
downloadnnn-9afe09b4b5df036d16738e506246d6ae0512bdd3.tar.gz
Uniform status bar for light and detail modes
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 5c086e3..1b5041e 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3352,29 +3352,23 @@ static void redraw(char *path)
ptr = "\b";
/* We need to show filename as it may be truncated in directory listing */
- if (!cfg.showdetail && !cfg.blkorder) { /* light mode */
- /* Timestamp */
- strftime(buf, 18, "%F %R", localtime(&pent->t));
-
- mvprintw(lastln, 0, "%d/%d (%d) %s%s%s %s %s\n",
- cur + 1, ndents, nselected, selmode, sort, buf,
- get_lsperms(pent->mode), ptr);
- } else if (!cfg.blkorder) { /* detail mode */
- /* Get the unescaped file name */
- base = unescape(pent->name, NAME_MAX, NULL);
-
- mvprintw(lastln, 0, "%d/%d (%d) %s%s%s [%s]\n",
- cur + 1, ndents, nselected, selmode, sort, ptr, base);
- } else { /* du mode */
- /* Get the unescaped file name */
- base = unescape(pent->name, NAME_MAX, NULL);
+ /* Get the unescaped file name */
+ base = unescape(pent->name, NAME_MAX, NULL);
+ if (cfg.blkorder) { /* du mode */
xstrlcpy(buf, coolsize(dir_blocks << BLK_SHIFT), 12);
c = cfg.apparentsz ? 'a' : 'd';
mvprintw(lastln, 0, "%d/%d (%d) %s%cu: %s (%lu files) free: %s %s [%s]\n",
cur + 1, ndents, nselected, selmode, c, buf, num_files,
coolsize(get_fs_info(path, FREE)), ptr, base);
+ } else { /* light or detail mode */
+ /* Timestamp */
+ strftime(buf, 18, "%d/%b/%Y %R", localtime(&pent->t));
+
+ mvprintw(lastln, 0, "%d/%d (%d) %s%s%s %s %s [%s]\n",
+ cur + 1, ndents, nselected, selmode, sort, buf,
+ get_lsperms(pent->mode), ptr, base);
}
} else
printmsg("0/0");