All Projects → mananapr → Cfiles

mananapr / Cfiles

Licence: mit
A ncurses file manager written in C with vim like keybindings

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Cfiles

Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+4018.5%)
Mutual labels:  file-manager, terminal, console, ncurses
xplr
A hackable, minimal, fast TUI file explorer
Stars: ✭ 2,271 (+611.91%)
Mutual labels:  console, file-explorer, file-manager
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (-45.77%)
Mutual labels:  terminal, console, ncurses
Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (-69.28%)
Mutual labels:  terminal, console, ncurses
Sc Im
sc-im - Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal
Stars: ✭ 3,081 (+865.83%)
Mutual labels:  terminal, console, ncurses
ServerTools
ServerTools is Pocketmine-MP plugin containing a set of tools that allows you to manage your server directly from the game!
Stars: ✭ 23 (-92.79%)
Mutual labels:  file-explorer, file-manager
vue-fs
A Vue file management client, complete with a node/express/FS backend.
Stars: ✭ 40 (-87.46%)
Mutual labels:  file-explorer, file-manager
Fff
📁 A simple file manager written in bash.
Stars: ✭ 3,445 (+979.94%)
Mutual labels:  file-manager, terminal
Terminal Icons
A PowerShell module to show file and folder icons in the terminal
Stars: ✭ 303 (-5.02%)
Mutual labels:  terminal, console
Joshuto
ranger-like terminal file manager written in Rust
Stars: ✭ 224 (-29.78%)
Mutual labels:  file-manager, ncurses
nchat
Terminal-based Telegram client for Linux and macOS
Stars: ✭ 68 (-78.68%)
Mutual labels:  console, ncurses
Tty Markdown
Convert a markdown document or text into a terminal friendly output.
Stars: ✭ 275 (-13.79%)
Mutual labels:  terminal, console
telescope-file-browser.nvim
File Browser extension for telescope.nvim
Stars: ✭ 674 (+111.29%)
Mutual labels:  file-explorer, file-manager
croatoan
Common Lisp bindings for the ncurses terminal library.
Stars: ✭ 111 (-65.2%)
Mutual labels:  console, ncurses
js-fileexplorer
A zero dependencies, customizable, pure Javascript widget for navigating, managing, uploading, and downloading files and folders or other hierarchical object structures on any modern web browser.
Stars: ✭ 124 (-61.13%)
Mutual labels:  file-explorer, file-manager
Electerm
📻Terminal/ssh/sftp client(linux, mac, win)
Stars: ✭ 4,763 (+1393.1%)
Mutual labels:  file-manager, terminal
Nestjs Console
A nestjs module that provide a cli to your application.
Stars: ✭ 284 (-10.97%)
Mutual labels:  terminal, console
Chalk
🖍 Terminal string styling done right
Stars: ✭ 17,566 (+5406.58%)
Mutual labels:  terminal, console
Consola
Elegant Console Logger for Node.js and Browser 🐨
Stars: ✭ 3,461 (+984.95%)
Mutual labels:  terminal, console
Termox
C++17 Terminal User Interface(TUI) Library.
Stars: ✭ 306 (-4.08%)
Mutual labels:  terminal, ncurses

cfiles

Latest release Arch Linux Homebrew

License

cfiles is a terminal file manager with vim like keybindings, written in C using the ncurses library. It aims to provide an interface like ranger while being lightweight, fast and minimal.

screenshot

Dependencies

  • ncursesw
  • cpand mv for copying and moving
  • fzf for searching
  • w3mimgdisplay or Überzug for image previews
  • mediainfo for viewing media info and file sizes
  • atool for archive previews
  • poppler(specifically pdftoppm) for pdf previews

Compiling and Installation

Arch Linux

Arch Linux users can use the AUR package.

macOS

macOS users can use brew or macports

Others

To compile, run

make

and then run,

sudo make install

to install.

Keybindings

Key Function
h j k l Navigation keys
G Go to end
g Go to top
H Go to top of current view
M Go to middle of current view
L Go to bottom of current view
pgup Scroll Up One Page
pgdn Scroll Down One Page
f Search using fzf
F Search using fzf in the present directory
S Open Shell in present directory
space Add/Remove to/from selection list
tab View selection list
e Edit selection list
u Empty selection list
y Copy files from selection list
v Move files from selection list
a Rename Files in selection list
dd Move files from selection list to trash
dD Remove selected files
i View mediainfo and general info
I View preview
. Toggle hidden files
b Toggle borders
' View/Goto bookmarks
m Add bookmark
E Edit bookmarks
p Run external script
r Reload
q Quit

Directories Used

cfiles uses $XDG_CONFIG_HOME/cfiles directory to store the clipboard file. This is used so that the clipboard can be shared between multiple instances of cfiles. That's why I won't be adding tabs in cfiles because multiple instances can be openend and managed by any terminal multiplexer or your window manager. Note that this also means the selection list will persist even if all instances are closed.

cfiles also uses $HOME/.local/share/Trash/files as the Trash Directory, so make sure this directory exists before you try to delete a file.

For storing bookmarks, cfiles uses $XDG_CONFIG_HOME/cfiles/bookmarks file. Bookmarks are stored in the form <key>:<path>. You can either edit this file directly or press m in cfiles to add new bookmarks.

cfiles looks for external scripts in the $XDG_CONFIG_HOME/cfiles/scripts directory. Make sure the scripts are executable before moving them to the scripts directory.

If $XDG_CONFIG_HOME is not set, then $HOME/.config is used.

Opening Files

You can set FILE_OPENER in config.h to specify your file opening program. It is set to use xdg-open by default but you can change it to anything like thunar. macOS users need to set it to open.

Image Previews

You can either go with w3mimgdisplay or Überzug (link) for image previews. Each method has it's own pros and cons.

  1. Überzug

To use Überzug for image previews, set DISPLAYIMG and CLEARIMG in config.h to the paths of displayimg_uberzug and clearimg_uberzug scripts respectively.

  • Pros
    1. Better previews when compared to w3mimgdisplay
  • Cons
    1. Can't generate previews for mp3 album arts
    2. Non functional scrolling with arrow keys

I recommend Überzug because the previews scale well with change in terminal size and don't disappear on changing workspaces.

  1. w3mimgdisplay

To use w3mimgdisplay for image previews, set DISPLAYIMG and CLEARIMG in config.h to the paths of displayimg and clearimg scripts respectively.

  • Pros
    1. Faster scrolling
    2. Can generate previews of album arts for mp3 files
  • Cons
    1. Previews are very inconsistent and may disappear on resizing the terminal or changing workspaces
    2. You may have to redraw the UI while scrolling by pressing KEY_RELOAD (defaults to R)

You may have to modify the scripts a little, about which you can read here.

Why C?

I wanted to improve my C and learn ncurses so I decided this would be an ideal project.

Apart from this, I have always wanted an alternative to ranger that is faster while still having a similar UI.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].