DEV Community

Cover image for Navigator, a fine-tuned tool to quick directory access and navigation
Lawrence Lagerlof
Lawrence Lagerlof

Posted on • Updated on

Navigator, a fine-tuned tool to quick directory access and navigation

This tiny tool that relies on the shoulder of giants has one single goal: to allow the user to navigate between directories faster than other tools, even cd in most cases.

I focused on UX to make it easy and useful. Look these nice features:

  • The last created directories are near the focused cursor for quick access.
  • Always focus on directory ".." when changing directory to allow quick exit to the parent directory.
  • Files are listed separated from directories.
  • Files can be opened with the associated application.
  • The path of last directory or file accessed is copied to the clipboard.
  • Fuzzy search.

shell screenshot inside the script navigator showing a list of files and directories

How to install

1) Install the following dependencies using your distro's package manager:

  • fzf
  • xclip
  • xgd-open (from package xdg-utils)

2) Download the script navigator from https://github.com/llagerlof/navigator

3) Copy the script to /usr/local/bin/

4) Make it executable with chmod +x /usr/local/bin/navigator

5) Create an alias in your ~/.bashrc. Add the following line to the end of file:

alias n="source /usr/local/bin/navigator"
Enter fullscreen mode Exit fullscreen mode

6) Reopen the shell to reload the aliases.

How to use

  • Run the script typing n in bash.
  • Navigate with arrow keys.
  • Press ENTER key to access a directory.
  • Press ENTER key to open a file with the associated application.
  • Press ESC key to exit the script. Your new current directory is the last directory visited while using Navigator.
  • Start typing to fuzzy search the current list of directories and files.

Top comments (0)