src/icons-nerdfont.h | 5 +++++ src/nnn.c | 16 ++++++++++++++++ diff --git a/src/icons-nerdfont.h b/src/icons-nerdfont.h index 6d399325847b432a616f6b38528d2ec34995eccc..42b3ca09055a6ba57d68ae14bcbc588e84f63e36 100644 --- a/src/icons-nerdfont.h +++ b/src/icons-nerdfont.h @@ -4,6 +4,11 @@ // You can find hex codes for nerd fonts here // https://www.nerdfonts.com/cheat-sheet +// Arrows +#define MD_ARROW_UPWARD "\uf55c" +#define MD_ARROW_FORWARD "\uf553" +#define MD_ARROW_DOWNWARD "\uf544" + // Generics #define ICON_DIRECTORY "\ue5ff" #define ICON_FILE "\uf713" diff --git a/src/nnn.c b/src/nnn.c index e7852d116a8b07b0867f966e4cd8ce9297232fd0..562622fa162ed972f528ce96474e0e7b6fc7a469 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5781,7 +5781,11 @@ addstr(coolsize(i >= 0 ? i : pent->size)); /* Show symlink size */ if (i > 1) { /* Show symlink target */ g_buf[i] = '\0'; +#ifdef ICONS_ENABLED + addstr(" "MD_ARROW_FORWARD); +#else addstr(" ->"); +#endif addstr(g_buf); } } else { @@ -5814,7 +5818,11 @@ static inline void markhovered(void) { if (cfg.showdetail && ndents) { /* Reversed block for hovered entry */ tocursor(); +#ifdef ICONS_ENABLED + addstr(MD_ARROW_FORWARD); +#else addch(' ' | A_REVERSE); +#endif } } @@ -5967,7 +5975,11 @@ /* Go to first entry */ if (curscroll > 0) { move(1, 0); +#ifdef ICONS_ENABLED + addstr(MD_ARROW_UPWARD); +#else addch('^'); +#endif } if (g_state.oldcolor) { @@ -5992,7 +6004,11 @@ /* Go to last entry */ if (onscreen < ndents) { move(xlines - 2, 0); +#ifdef ICONS_ENABLED + addstr(MD_ARROW_DOWNWARD); +#else addch('v'); +#endif } markhovered();