From 728b635beb4f4bd4be99072863e23b456b49106f Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Sun, 13 Sep 2020 20:20:46 -0700 Subject: [PATCH] Updated icon instructions now that nerdfont is supported --- Advanced-use-cases.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Advanced-use-cases.md b/Advanced-use-cases.md index 5813c27..5f022cc 100644 --- a/Advanced-use-cases.md +++ b/Advanced-use-cases.md @@ -1,11 +1,25 @@ ## File icons -`nnn` supports [icons-in-terminal](https://github.com/sebastiencs/icons-in-terminal). Icons are not compiled-in by default to avoid shipping third-party resources. +`nnn` supports mutliple ways to show icons. They are turned off by default and are not provided in the default distribution to avoid shipping third party resources. Currently we support [icons-in-terminal](https://github.com/sebastiencs/icons-in-terminal) for those wishing to use icons alongside a normal code font. Alternatively, you can utilize Nerdfont's patched fonts to add icons to the font itself. The later is more common for Vim users who need fonts for various powerline plugins. Regardless of the method, each method will produce similar experiences within nnn. You will need to recompile nnn rather than use the default release in both cases. -To enable file icons follow the steps below: +### To enable icons-in-terminal icons - [Install](https://github.com/sebastiencs/icons-in-terminal#installation) icons-in-terminal -- Compile `nnn` with the make option `O_ICONS=1` +- Clone the nnn repo +- Edit `src/icons.h` and make sure to include the `icons-in-terminal.h` file at the top +- Compile `nnn` with `make O_ICONS=1` from the root + +### To enable Nerdfont icons + +- [Download and install](https://www.nerdfonts.com/) a patched Nerdfont. +- Apply that font as your terminal emulator's font. This will vary from emulator to emulator, but usually involves editing a config file or changing a setting within a GUI menu system. +- Edit `src/icons.h` and make sure to include the `icons-nerdfont.h` file at the top +- Compile `nnn` with `make O_ICONS=1` from the root + +### Move the newly compiled nnn to where your programs normally go + +Once compiled, you'll notice an `nnn` executable is now in your root. Copy this file to wherever such programs are normally stored. A good way to check is to do a `which nnn` on where the packaged release was installed. Simply replacing that file should be enough. + ## Custom keybinds