2024-03-16 21:37:56 +01:00
|
|
|
/* Settings */
|
2024-03-30 22:00:57 +01:00
|
|
|
#define PH 1 /* panel height */
|
|
|
|
#define JUMP_NUM 14 /* how long ctrl + u/d jump are */
|
|
|
|
#define PATH_MAX 4096 /* max length of the path */
|
|
|
|
#define DECIMAL_PLACES 1 /* how many decimal places show size with */
|
2024-03-16 21:37:56 +01:00
|
|
|
|
2024-03-30 22:00:57 +01:00
|
|
|
/* Size units */
|
2024-03-31 22:44:05 +02:00
|
|
|
static const char* units[] = {"B", "K", "M", "G", "T", "P"};
|
2024-03-29 22:43:28 +01:00
|
|
|
|
2024-03-30 22:00:57 +01:00
|
|
|
/* Set width offset for windows:
|
2024-03-17 13:28:27 +01:00
|
|
|
+-------------%-------------+
|
|
|
|
| % |
|
|
|
|
| files % preview |
|
|
|
|
| % |
|
|
|
|
+=============%=============+
|
|
|
|
set where the % line between them resides
|
|
|
|
|
|
|
|
In COLS:
|
|
|
|
0 will make them equal (at the center),
|
|
|
|
15 will make files bigger
|
|
|
|
-15 will make preview bigger */
|
2024-11-01 23:49:09 +01:00
|
|
|
#define WINDOW_OFFSET -30
|
2024-03-17 13:28:27 +01:00
|
|
|
|
2024-03-30 22:00:57 +01:00
|
|
|
/* Options */
|
|
|
|
#define SHOW_HIDDEN true /* show hidden files/dotfiles at startup */
|
2024-11-01 00:19:58 +01:00
|
|
|
#define SHOW_DETAILS false /* show file details at startup */
|
2024-03-30 22:00:57 +01:00
|
|
|
#define SHOW_ICONS true /* show file icons at startup */
|
|
|
|
|
|
|
|
/* Calculate directories' sizes RECURSIVELY upon entering
|
2024-03-31 00:13:14 +01:00
|
|
|
`A` keybind at the startup
|
|
|
|
**VERY EXPENSIVE**, **CAN TAKE UP TO A MINUTE IN ROOT** */
|
2024-03-30 22:00:57 +01:00
|
|
|
#define DIRS_SIZE false
|
|
|
|
|
2024-03-16 21:37:56 +01:00
|
|
|
/* Default text editor */
|
|
|
|
#define EDITOR "nvim"
|
|
|
|
|
2024-03-19 23:07:05 +01:00
|
|
|
/* File location to write last directory */
|
|
|
|
#define LAST_D "~/.cache/ccc/.ccc_d"
|
|
|
|
|
2024-03-30 22:00:57 +01:00
|
|
|
/* Will create this directory if doesn't exist! */
|
2024-03-29 23:34:26 +01:00
|
|
|
#define TRASH_DIR "~/.cache/ccc/trash/"
|
|
|
|
|
2024-03-16 21:37:56 +01:00
|
|
|
/* Keybindings */
|
2024-03-14 20:47:46 +01:00
|
|
|
#define CTRLD 0x04
|
2024-03-15 12:51:58 +01:00
|
|
|
#define ENTER 0xA
|
2024-03-14 20:47:46 +01:00
|
|
|
#define CTRLU 0x15
|
2024-03-15 12:51:58 +01:00
|
|
|
#define ESC 0x1B
|
2024-03-14 20:47:46 +01:00
|
|
|
#define SPACE 0x20
|
|
|
|
#define TILDE 0x7E
|
|
|
|
#define DOWN 0x102
|
|
|
|
#define UP 0x103
|
|
|
|
#define LEFT 0x104
|
|
|
|
#define RIGHT 0x105
|
2024-11-01 00:19:58 +01:00
|
|
|
#define RESIZE 278
|
|
|
|
|
|
|
|
/* Colros */
|
|
|
|
#define GREEN "166;227;161"
|
|
|
|
#define BLUE "137;180;250"
|
|
|
|
#define PINK "245;194;231"
|
|
|
|
#define RED "243;139;168"
|
|
|
|
#define YELLOW "249;226;175"
|
|
|
|
#define LAVENDER "180;190;254"
|
|
|
|
#define WHITE "205;214;244"
|
|
|
|
|
|
|
|
enum keys {
|
|
|
|
BACKSPACE = 127,
|
|
|
|
ARROW_LEFT = 1000,
|
|
|
|
ARROW_RIGHT,
|
|
|
|
ARROW_UP,
|
|
|
|
ARROW_DOWN,
|
|
|
|
DEL_KEY,
|
|
|
|
HOME_KEY,
|
|
|
|
END_KEY,
|
|
|
|
PAGE_UP,
|
|
|
|
PAGE_DOWN
|
|
|
|
};
|