Add man page and update README

This commit is contained in:
Piotr Marendowski 2024-03-19 19:40:32 +01:00
parent 255e09c18d
commit 124df59933
4 changed files with 104 additions and 20 deletions

View file

@ -12,7 +12,7 @@ MANDIR = $(PREFIX)/share/man/man1
# Flags
LDFLAGS = $(shell pkg-config --libs ncurses)
CFLAGS = -march=native -mtune=native -O3 -pipe -s -std=c99 -pedantic $(shell pkg-config --cflags ncurses) -Wall # -Wextra -Werror
CFLAGS = -O3 -pipe -s -std=c99 -pedantic -Wall $(shell pkg-config --cflags ncurses)
SRC = ccc.c util.c file.c $(CONF)

View file

@ -8,36 +8,73 @@ The fact that it is written in C makes it more versatile and rapid, enabling us
Consider this project incomplete and WIP!
| Feature | Ported | Dropped | Added |
|--------------------------------|:------:|:-------:|:-----:|
| Standard movement | X | | |
| Advanced movement (jumps) | X | | |
| Searching | | | |
| File preview | | | X |
| Sorting | | | |
| Marking and marking operations | | | |
| Other operations on files | | | |
| File details | X | | |
| Image previews | | | |
| Help | | | |
| History | | | |
| Bookmarks | | | |
| Bulk rename | | | |
| Workspaces | | | |
| Feature of fff | Ported | Dropped |
|--------------------------------|:------:|:-------:|
| Standard movement | X | |
| Advanced movement (jumps) | X | |
| File details | X | |
| Searching for files | | |
| Sorting | | |
| Marking and marking operations | | |
| Other operations on files | | |
| Image previews | | |
| Help | | |
| History | | |
| Bookmarks | | |
| Bulk rename | | |
#### Features added that are not in [fff](https://github.com/piotr-marendowski/fff):
- File preview (without highlighting)
## Installation
### Dependencies
- gcc
- ncurses
- make
- pkg-config
- ncurses
### Building
You will need to run these with elevated privilages.
```sh
```
$ git clone https://github.com/piotr-marendowski/ccc
$ make
$ sudo make install
```
## Usage
```
j: scroll down
k: scroll up
h: go to parent dir
l: go to child dir
down: scroll down
up: scroll up
left: go to parent dir
right: go to child dir
enter: go to child dir/open file
backspace: go to parent dir
g: go to top
G: go to bottom
t: go to trash
~: go to home
z: refresh current dir
space: mark file
a: mark all files in directory
q: exit
```
## License
This project has GNU GPL v.3 license.

47
ccc.1
View file

@ -0,0 +1,47 @@
.
.TH CCC "1" "March 2024" "ccc" "User Commands"
.SH NAME
ccc \- Fast TUI file manager written in C, using ncurses.
.SH SYNOPSIS
.B ccc
.SH DESCRIPTION
ccc is a rewrite of fff file manager in C aiming for usefulness and speed. The fact that it is written in C makes it more versatile and rapid, enabling us to add features that were previously ruled out due to time complexity. You may call it a soft fork.
.PP
.SH "Usage"
.
.nf
j: scroll down
k: scroll up
h: go to parent dir
l: go to child dir
down: scroll down
up: scroll up
left: go to parent dir
right: go to child dir
enter: go to child dir/open file
backspace: go to parent dir
g: go to top
G: go to bottom
t: go to trash
~: go to home
z: refresh current dir
space: mark file
a: mark all files in directory
q: exit
.
.fi
.
.SH "Customization"
.
.nf
Various settings can be changed in config.h file located in the program's directory.
.
.fi

2
file.h
View file

@ -16,7 +16,7 @@ void clear_files();
void clear_marked();
long add_file(char *filepath, char *stats, char *type, int color);
void remove_marked(file *marked_file);
long add_marked(char *filepath, char *type);
long add_marked(char *filepath, char *type, bool force);
file *get_marked(long index);
bool in_marked(char *path);
file *get_file(long index);