Giter Club home page Giter Club logo

cfm's Introduction

Cactus File Manager

build

Cactus File Manager (cfm) is a TUI file manager with the goal of being simple, easy, and bloat-free, utilizing Vi-inspired keybinds. Whether or not you should use it depends on whether or not you like the name and/or the dev, like with all software.

Example Configuration

Note: the screenshot above has a non-default pointer and no alternative views enabled.

Demo showing off deletion, undo, marks, and basic navigation.

Configuration

To configure cfm before building, you should copy config.def.h to config.h and then modify it to suit your needs. Each option is explained within the file. If you build cfm without creating a config, it will create a default one for you.

There are some options which cfm will attempt to use environment variables for. These are $EDITOR, $SHELL, and $OPENER. If you want to specify a specific option just for cfm, it will first try to find these variables prefixed with $CFM_. For example, if your $EDITOR is set to vim but you want to tell cfm to use emacs, you could use export CFM_EDITOR='emacs'. If you installed cfm via a package manager, or if you are using the default configuration, you can specify these environment variables to configure cfm without rebuilding. cfm uses a temporary directory for its deleted files (to enable undo and cut/paste). If it's not set in config.h, then cfm will attempt to use the $CFM_TMP environment variable. If this is not set either, then /tmp/cfmtmp will be used. If a temporary directory is not specified in any way or it cannot create the directory it is attempting to use, cfm will disable undo and cut/paste. If CD_ON_CLOSE is not enabled at compile-time, cfm will look for the $CFM_CD_ON_CLOSE environment variable, which should contain the path to a file where cfm should write its current working directory when quit with Q.

Building

When building from source, you should get the source for the latest release and then run make inside the extracted source.

Installing

From Source

First, download the latest release's source. Then, use sudo make install. You can specify a PREFIX or DESTDIR like with many makefiles. By default, PREFIX is /usr/local/, but if you wish to install into /usr, you can do sudo make install PREFIX=/usr.

With a Package Manager

At the moment, cfm is available from the following sources (not all maintained by me):

Bugs

If you find a bug, please create an issue on GitHub.

Usage

The functions of some keys may be dependent on values set in config.h.

Key(s) Function
q, Esc Quit cfm
Q Quit cfm, saving its working directory to the file specified in CD_ON_CLOSE, if enabled. Disabled by default.
h Go up a directory1
j Move down1
k Move up1
l Enter directory, or open file in EDITOR1
dd Delete currently selected file or directory (there is no confirmation, be careful)
T Creates a new file, opening EDITOR to obtain a filename2
M Creates a new directory, opening EDITOR to obtain a directory name2
R Renames a file, opening EDITOR to edit the filename2
gg Move to top
G Move to bottom
m Mark for deletion
D Delete marked files (does not touch unmarked files)
u Undo the last deletion operation (if cfm was unable to access/create its trash directory ~/.cfmtrash, deletion is permanent and this will not work)
X Cut the current file or directory (to be pasted again with p)
yy Copy the current file or directory (to be pasted again with p)
p Paste the previously copied or cut file or directory
e Open file or directory in EDITOR
o Open file or directory in OPENER
S Spawns a SHELL in the current directory
r Reload directory
. Toggle visibility of hidden files (dotfiles)
Return Works like o if ENTER_OPENS was enabled at compile-time, else works like l
Tab Switches to the next view
` Switches to the previous view
1...0 Switches to view N, up to the number specified by VIEW_COUNT (default 2)

1 The arrow keys work the same as hjkl.

2 The available characters for filenames are A-Za-z ._- by default, which is POSIX "fully portable filenames" plus spaces. If you wish, you can disable spaces by setting ALLOW_SPACES to 0.

Scripting

If stdin or stdout are not attached to a TTY, cfm will read commands from stdin until either EOF is reached or it does not read any more data. This can be used to script operations. All errors will be printed to stderr and are fatal. In scripting mode, cfm will never draw to the screen.

Example:

$ cat script.txt
jjljjjkyyhp
$ cfm <script.txt

This example is equivalent to performing the following operations in a normal cfm instance:

  1. Go down twice with j
  2. Go into the currently selected directory with l
  3. Go down three times with j and up once with k
  4. Yank the current file with yy
  5. Go back to the parent directory with h
  6. Paste the yanked file with p

cfm's People

Contributors

hawkeye0021 avatar marcuscalhoun-lopez avatar ryandesign avatar willeccles avatar wooosh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.