ccc/README.md

136 lines
3 KiB
Markdown
Raw Normal View History

# ccc
2024-03-09 12:52:45 +01:00
`ccc` is a rewrite of [fff](https://github.com/piotr-marendowski/fff) in C aiming for usefulness and speed.
2024-03-09 21:52:24 +01:00
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`.
## Features
Consider this project incomplete and WIP!
2024-03-19 19:40:32 +01:00
| Feature of fff | Ported | Dropped |
|--------------------------------|:------:|:-------:|
| Standard movement | X | |
| Advanced movement (jumps) | X | |
| File details | X | |
| File icons! | X | |
2024-03-19 19:40:32 +01:00
| Searching for files | | |
| Sorting | | |
| Marking and marking operations | | |
| Other operations on files | | |
| Image previews | | |
2024-04-05 19:53:45 +02:00
| Help | X | |
2024-03-19 19:40:32 +01:00
| History | | |
| Bookmarks | | |
| Bulk rename | | |
#### Features added that are not in [fff](https://github.com/piotr-marendowski/fff):
- File preview (without highlighting)
## Installation
2024-03-09 19:29:23 +01:00
### Dependencies
2024-03-09 12:52:45 +01:00
- gcc
- ncursesw
2024-03-09 21:52:24 +01:00
- make
- pkg-config
- Any [Nerd Font](https://www.nerdfonts.com/) for file icons (optional, but turned on by default)
2024-03-09 19:29:23 +01:00
2024-04-07 02:53:02 +02:00
## Building and Installing
2024-03-09 21:52:24 +01:00
2024-03-12 21:54:25 +01:00
You will need to run these with elevated privilages.
2024-03-09 12:52:45 +01:00
2024-03-19 19:40:32 +01:00
```
2024-03-12 21:54:25 +01:00
$ git clone https://github.com/piotr-marendowski/ccc
$ make
2024-04-07 02:53:02 +02:00
# make install
```
### CD on Exit
#### POSIX Shell
```sh
# Add this to your .bashrc, .zshrc or equivalent.
# Run 'ccc' with 'c' or whatever you decide to name the function.
c() {
ccc "$@"
cd "$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/ccc/.ccc_d")"
}
2024-03-09 12:52:45 +01:00
```
2024-03-19 19:40:32 +01:00
## Usage
```
h: go to parent dir
2024-03-19 19:40:32 +01:00
j: scroll down
k: scroll up
l: go to child dir
left: go to parent dir
down: scroll down
up: scroll up
2024-03-19 19:40:32 +01:00
right: go to child dir
enter: go to child dir/open file
backspace: go to parent dir
gg: go to top
2024-03-19 19:40:32 +01:00
G: go to bottom
ctrl+u: jump up
ctrl+d: jump down
t: go to trash dir
~: go to home dir
-: go to previous dir
2024-03-19 19:40:32 +01:00
z: refresh current dir
:: go to a directory by typing
u: sort files
2024-03-19 19:40:32 +01:00
.: toggle hidden files
2024-03-28 19:10:59 +01:00
i: toggle file details
2024-03-29 15:13:24 +01:00
X: toggle executable
2024-03-28 19:10:59 +01:00
A: show directory disk usage/block size
2024-04-05 19:53:45 +02:00
f: new file
n: new dir
r: rename
2024-04-05 19:53:45 +02:00
2024-03-19 19:40:32 +01:00
space: mark file
a: mark all files in directory
2024-04-05 19:53:45 +02:00
d: trash
2024-03-19 19:40:32 +01:00
?: show help
2024-03-20 21:30:06 +01:00
q: exit with last dir written to file
ctrl+c exit without writing last dir
2024-04-07 02:53:02 +02:00
TO BE DONE:
o: open file with
O: open file with a GUI program detached from file manager
/: search
!: open shell in current dir
x: view file/dir attributes
e: show history
y: copy filename to clipboard
c: copy
m: move
s: symbolic link
b: bulk rename
p: execute paste/move/delete/bulk_rename
[1-9]: favourites/bookmarks (see customization)
2024-03-19 19:40:32 +01:00
```
2024-04-07 02:53:02 +02:00
### Using `ccc` in neovim as a file picker
See [ccc.nvim](https://github.com/night0721/ccc.nvim)
### License
2024-03-19 19:40:32 +01:00
This project has GNU GPL v.3 license.