O_NOUG := 0 # disable user, group name in status bar
O_NOX11 := 0 # disable X11 integration
O_MATCHFLTR := 0 # allow filters without matches
+O_FILEINFO := 0 # show file informaiton in info line
# User patches
O_GITSTATUS := 0 # add git status to detail view
CPPFLAGS += -DMATCHFLTR
endif
+ifeq ($(strip $(O_FILEINFO)),1)
+ CPPFLAGS += -DFILEINFO
+endif
+
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
static char *load_input(int fd, const char *path);
static int set_sort_flags(int r);
static void statusbar(char *path);
+static bool get_output(char *file, char *arg1, char *arg2, int fdout, bool multi, bool page);
#ifndef NOFIFO
static void notify_fifo(bool force);
#endif
((fnstrstr == &strcasestr) ? "ic" : "noic"));
clearinfoln();
+#ifdef FILEINFO
+ if (ndents && get_output("file", "-b", pdents[cur].name, -1, FALSE, FALSE))
+ mvaddstr(xlines - 2, 2, g_buf);
+#endif
mvaddstr(xlines - 2, xcols - xstrlen(info), info);
}
} else
ptr = "\b";
- tolastln();
attron(COLOR_PAIR(cfg.curctx + 1));
+#ifdef FILEINFO
+ if (get_output("file", "-b", pdents[cur].name, -1, FALSE, FALSE))
+ mvaddstr(xlines - 2, 2, g_buf);
+#endif
+
+ tolastln();
+
printw("%d/%s ", cur + 1, xitoa(ndents));
if (g_state.selmode || nselected) {
}
#endif
if (S_ISLNK(pent->mode)) {
+#ifndef FILEINFO
i = readlink(pent->name, g_buf, PATH_MAX);
addstr(coolsize(i >= 0 ? i : pent->size)); /* Show symlink size */
if (i > 1) { /* Show symlink target */
g_buf[i] = '\0';
addstr(g_buf);
}
+#endif
} else {
addstr(coolsize(pent->size));
addch(' ');