2024-03-09 18:37:04 +01:00
# 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 | |
2024-03-29 23:34:26 +01:00
| File icons! | X | |
2024-03-19 19:40:32 +01:00
| Searching for files | | |
2024-11-05 21:02:20 +01:00
| Sorting | X | |
2024-03-19 19:40:32 +01:00
| Marking and marking operations | | |
2024-11-05 21:02:20 +01:00
| 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:
2024-11-05 21:02:20 +01:00
- 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
```
2024-11-21 16:45:13 +01:00
h/left/backspace: go to parent dir
j/down: scroll down
k/up: scroll up
l/right/enter: go to child dir
2024-03-19 19:40:32 +01:00
2024-11-18 01:25:35 +01:00
o: open file with
O: open file with a GUI program detached from file manager
2024-11-17 16:22:55 +01:00
g: go to top
2024-03-19 19:40:32 +01:00
G: go to bottom
2024-03-20 17:03:54 +01:00
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
2024-04-10 14:51:39 +02:00
:: go to a directory by typing
2024-03-19 19:40:32 +01:00
2024-04-10 14:51:39 +02: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 23:53:06 +01:00
e: show history
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
2024-04-10 14:51:39 +02:00
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
2024-11-18 00:51:19 +01:00
[1-9]: favourites/bookmarks (see customizing)
2024-03-20 17:03:54 +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:
/: search
c: copy
m: move
s: symbolic link
b: bulk rename
p: execute paste/move/delete/bulk_rename
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)
2024-11-13 10:20:51 +01:00
- 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")"
}
```
2024-11-18 00:51:19 +01:00
## Environment variables
```sh
export CCC_LAST_D=~/.cache/ccc/.ccc_d
export CCC_FAV1=~/projects
export CCC_FAV2=~/.bashrc
export CCC_FAV3=~/Pictures/Wallpapers/
export CCC_FAV4=/usr/share
export CCC_FAV5=/
export CCC_FAV6=
export CCC_FAV7=
export CCC_FAV8=
export CCC_FAV9=
```
2024-05-22 12:26:24 +02:00
## 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.