ccc/README.md

127 lines
3 KiB
Markdown
Raw Normal View History

# ccc
2024-11-13 11:12:02 +01:00
Soft fork of [fff](https://github.com/bogdan-the-great/fff) in C aiming for size and speed with no dependency, hackable with patches and configurable via `config.h`
2024-03-09 21:52:24 +01:00
2024-11-13 11:11:11 +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.
2024-11-13 10:57:08 +01:00
2024-05-22 12:26:24 +02:00
# Features
2024-03-09 21:52:24 +01:00
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 | X | |
2024-03-19 19:40:32 +01:00
| Marking and marking operations | | |
| Image previews | X | |
2024-04-05 19:53:45 +02:00
| Help | X | |
2024-03-19 19:40:32 +01:00
| History | | |
| Bookmarks | | |
| Bulk rename | | |
2024-11-13 10:57:08 +01:00
## Features added that are not in fff:
- File preview
2024-03-19 19:40:32 +01:00
2024-05-22 12:26:24 +02:00
# Usage
2024-11-14 14:26:40 +01:00
```sh
ccc -p dir # File picker
ccc dir
```
2024-03-19 19:40:32 +01:00
```
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
2024-11-17 16:22:55 +01:00
g: 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
2024-03-19 19:40:32 +01:00
.: toggle hidden files
2024-11-17 19:13:57 +01:00
A: show directory disk usage/block size
2024-03-28 19:10:59 +01:00
i: toggle file details
2024-11-17 19:13:57 +01:00
u: sort files
2024-11-17 20:27:42 +01:00
x: view file/dir attributes
2024-11-17 19:13:57 +01:00
y: copy filename to clipboard
2024-11-17 16:22:55 +01:00
!: open shell in current dir
2024-03-28 19:10:59 +01:00
2024-04-05 19:53:45 +02:00
f: new file
n: new dir
r: rename
2024-11-17 19:13:57 +01:00
X: toggle executable
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
e: show history
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-05-22 12:26:24 +02:00
# Dependencies
- Any [Nerd Font](https://www.nerdfonts.com/) for file icons (optional, but turned on by default)
- libsixel (Optional)
2024-04-07 02:53:02 +02:00
2024-05-22 12:26:24 +02:00
# Building
You will need to run these with elevated privilages.
```
$ make
# make install
```
# Customizing
## CD on Exit for 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")"
}
```
## Using `ccc` in neovim as a file picker
2024-04-07 02:53:02 +02:00
See [ccc.nvim](https://github.com/night0721/ccc.nvim)
2024-05-22 12:26:24 +02:00
# Contributions
Contributions are welcomed, feel free to open a pull request.
2024-03-19 19:40:32 +01:00
2024-05-22 12:26:24 +02:00
# License
This project is licensed under the GNU Public License v3.0. See [LICENSE](https://github.com/night0721/ccc/blob/master/LICENSE) for more information.