• This repository has been archived on 01/Mar/2024
  • Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    C
  • License
    Mozilla Public Li...
  • Created almost 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🌡 Simple and fast TUI file manager with no dependencies.

Cactus File Manager

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, dev, or screenshot, just like with all software.

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):

Packaging status

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
PgDn, J Move down by one full screen
k Move up1
PgUp, K Mode down by one full screen
~ Navigate to user home directory
/ Navigate to the system root directory
l Enter directory, or open file in EDITOR1
dd Delete currently selected file or directory (there is no confirmation, be careful), backing it up to the CFM_TMP directory if one exists, such that it can be undone with u
Alt+dd Works the same as dd, but is always permanent, even if a CFM_TMP directory exists. This is useful for huge files/directories that would take a while to copy. 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, Space 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. Note: in non-interactive mode, cfm will NOT backup files on deletion. This means that you cannot use dd followed by u! All deletions made in non-interactive mode will be final.

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

More Repositories

1

cpm

🌡 A wrapper for package managers to make them consistent for those of us who are lazy.
Shell
69
star
2

embedded-linux-handbook

How to work with embedded Linux, since nobody else wants to tell you.
16
star
3

promptus

🌡 Very quick shell prompt that supports multiple shells.
C
15
star
4

startpage

My very powerful browser start page.
JavaScript
14
star
5

MinePanel

A simple GUI for running your Minecraft server. Easy management and custom commands!
Java
8
star
6

calcpi-cpp

"Calculates" (read: guesstimates) Pi over a certain number of iterations (in parallel, if specified) using the Nilakantha series.
C++
7
star
7

dotfiles

🏑 Home is where the dots are
Shell
7
star
8

bunny

πŸ‡ Light and fast Linux init primarily targeted at embedded systems (WIP - contributions welcome!)
C
6
star
9

f

🌡 Cactus fetch program
C
5
star
10

cactus-dos-vga-437

Modified version of Perfect DOS VGA 437 Win bitmap font.
4
star
11

wavegame

A simple 2D game in plain Java, done as a class group project. Has both single and multiplayer modes.
Java
4
star
12

gauge

C++
3
star
13

clr

🌡 C program to show off your palette.
C
3
star
14

archey-windows

It's like Archey for linux, except it's for Windows.
C++
2
star
15

desk

succulent cafe
HTML
2
star
16

libamio

Simple, efficient IO library for Linux ARM-based SoCs, including SPI, I2C, GPIO, and serial.
C
2
star
17

cortana-extender

An app that will allow custom Cortana commands for opening apps/URLs, among other things.
C++
1
star
18

cte

🌡 Text editor for the enlightened.
Shell
1
star
19

weathermaster

weathermaster app
Java
1
star
20

hangman

C++ hangman I wrote for no reason (WIP mostly functional)
C++
1
star
21

oodle-bot

JavaScript
1
star
22

dividesettings

Settings for my first Pebble Time watch face, Divide.
JavaScript
1
star
23

AoC2015-CPP

Advent of Code 2015 in C++, some of it I did in Java so some of the early days are not here.
C++
1
star
24

old

1
star
25

the-goons

A game made by Will Eccles and Jordan Duckstein for no reason at all.
C++
1
star
26

cop

🌡 Cactus option picker (program and library).
C
1
star
27

void-wsl

Void Linux installation for WSL.
C++
1
star