<h5 id="set-default-text-editor">Set default text editor</h5>
<h6 id="edit-.bashrc-in-fedora">Edit .bashrc (in Fedora)</h6>
<pre><code># Export Default editor and while we&#39;re at it, the PATH to /opt
export EDITOR=vim
export PATH=/opt:$PATH</code></pre>
<h4 id="enable-icons-in-terminal-icons">Enable icons-in-terminal icons</h4>
<p><a href="https://github.com/jarun/nnn/wiki/Advanced-use-cases" class="uri">https://github.com/jarun/nnn/wiki/Advanced-use-cases</a></p>
<p><a href="https://github.com/sebastiencs/icons-in-terminal#installation" class="uri">https://github.com/sebastiencs/icons-in-terminal#installation</a></p>
<p>To enable icons-in-terminal icons</p>
<pre><code>Install icons-in-terminal
Clone the nnn repo
Compile nnn with make O_ICONS=1 from the root s</code></pre>
<p>To enable Nerdfont icons</p>
<pre><code>Download and install a patched Nerdfont.
Apply that font as your terminal emulator&#39;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.
Clone the nnn repo
Compile nnn with make O_NERD=1 from the root</code></pre>
<p>Note:</p>
<pre><code>Arch Linux users can check out the AUR packages nnn-icons and nnn-nerd.</code></pre>
<h4 id="set-default-applications-via-.configmineapps.list">Set default applications via .config/mineapps.list</h4>
<h5 id="xdg-mime-manpage">xdg-mime manpage</h5>
<ul>
<li><a href="https://linux.die.net/man/1/xdg-mime" class="uri">https://linux.die.net/man/1/xdg-mime</a></li>
</ul>
<h5 id="update-mime-database-manpage">update-mime-database manpage</h5>
<ul>
<li><a href="https://linux.die.net/man/1/update-mime-database" class="uri">https://linux.die.net/man/1/update-mime-database</a></li>
</ul>
<h5 id="add-entry-and-use-right-away">Add entry and use right away</h5>
<ul>
<li><p>xdg-mime default mpv.desktop video/mpeg</p></li>
<li><p>Query the entry</p></li>
</ul>
<pre><code>xdg-mime query default image/png
feh.desktop</code></pre>
<ul>
<li>Query the file in question</li>
</ul>
<pre><code>xdg-mime query filetype cory-doctorow-makers.epub
application/epub+zip</code></pre>
<h5 id="examples">Examples</h5>
<pre><code>image/jpeg=feh.desktop
audio/x-wav=mpv.desktop
audio/flac=mpv.desktop
application/epub+zip=calibre-ebook-viewer.desktop
video/mpg=mpv.desktop
video/mpeg=mpv.desktop
video/iso=vlc.desktop
audio/ogg=mpv.desktop
text/pdf=zathura.desktop
application/pdf=org.pwmt.zathura-pdf-mupdf.desktop
text/markdown=ebook-viewer.desktop

[Added Associations]
image/png=feh.desktop;
video/x-matroska=mpv.desktop;
image/jpeg=feh.desktop;
audio/x-wav=mpv.desktop;
audio/flac=mpv.desktop;
application/epub+zip=calibre-ebook-viewer.desktop;
application/x-cd-image=vlc.desktop;</code></pre>
<h4 id="how-i-use-nnn">How I use nnn</h4>
<ul>
<li>Watching movies and tv shows from samba Pi server
<ul>
<li>Moving video rips to another directory</li>
</ul></li>
</ul>
<p><em>Sample with folder icons</em><br />
<img src="https://hackerpublicradio.org/eps/hpr3618/photo_1.png" alt="Sample with folder icons" />  </p>
<ul>
<li><p>Reading pdf files</p>
<ul>
<li>Zathura</li>
</ul></li>
<li><p>Reading epub books</p>
<ul>
<li>Calibre e-book viewer</li>
</ul></li>
<li><p>Editing files in vim</p>
<ul>
<li>'e' to edit</li>
</ul></li>
<li><p>Creating new files</p></li>
<li><p>Creating new directories</p></li>
<li><p>Dropping to a command prompt temporarily, using '!'</p></li>
<li><p>Extracting tar.gz and zip files</p></li>
<li><p>Bulk file renaming</p></li>
<li><p>Organizing files</p>
<ul>
<li>use '/' to find like files and 'ESC'</li>
</ul></li>
<li><p>Send file as attachment in mutt</p>
<ul>
<li>'o' to open file, 'mutt -a' to attach files</li>
</ul></li>
<li><p>KDEconnect to send files and web links</p>
<pre><code>#!/bin/bash

kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share $1</code></pre></li>
<li><p>View all commands</p>
<ul>
<li>'?'</li>
</ul></li>
</ul>
<p><em>Help screen</em><br />
<a href="https://hackerpublicradio.org/eps/hpr3618/photo_2.png"><img src="https://hackerpublicradio.org/eps/hpr3618/photo_2_thumbnail.png" alt="Help screen" /></a> <br/><small><small><em>Click the thumbnail to see the full-sized image</em></small></small>  </p>
<h4 id="videos">Videos</h4>
<ul>
<li><a href="https://vid.puffyan.us/watch?v=-knZwdd1ScU" class="uri">https://vid.puffyan.us/watch?v=-knZwdd1ScU</a></li>
</ul>
<h4 id="more-info">More info</h4>
<ul>
<li><h5 id="github-page">Github page</h5>
<ul>
<li><a href="https://github.com/jarun/nnn" class="uri">https://github.com/jarun/nnn</a></li>
</ul></li>
<li><h5 id="arch-wiki">Arch wiki</h5>
<ul>
<li><a href="https://wiki.archlinux.org/title/Nnn" class="uri">https://wiki.archlinux.org/title/Nnn</a></li>
</ul></li>
<li><h5 id="plugins">Plugins</h5>
<ul>
<li><a href="https://github.com/jarun/nnn/blob/master/plugins/README.md" class="uri">https://github.com/jarun/nnn/blob/master/plugins/README.md</a></li>
</ul></li>
</ul>
<ul>
<li><a href="https://github.com/jarun/nnn/wiki/Advanced-use-cases" class="uri">https://github.com/jarun/nnn/wiki/Advanced-use-cases</a></li>
<li><a href="https://wiki.archlinux.org/title/XDG_MIME_Applications" class="uri">https://wiki.archlinux.org/title/XDG_MIME_Applications</a></li>
<li><a href="https://wiki.archlinux.org/title/Xdg-utils" class="uri">https://wiki.archlinux.org/title/Xdg-utils</a></li>
<li><a href="https://www.romanzolotarev.com/xdg-mime.html" class="uri">https://www.romanzolotarev.com/xdg-mime.html</a></li>
<li>Find all available mimetypes for one application
<ul>
<li>grep MimeType /usr/share/applications/gimp.desktop</li>
</ul></li>
</ul>
<h4 id="applications">Applications</h4>
<ul>
<li>Zathura for PDF
<ul>
<li><a href="https://wiki.archlinux.org/title/Zathura" class="uri">https://wiki.archlinux.org/title/Zathura</a></li>
</ul></li>
</ul>
