2024-11-13 01:15:56 +01:00
|
|
|
#define PATH_MAX 4096 /* Max length of path */
|
2024-03-16 21:37:56 +01:00
|
|
|
/* Settings */
|
2024-11-13 01:15:56 +01:00
|
|
|
static int panel_height = 1; /* panel height */
|
|
|
|
static int jump_num = 14; /* Length of ctrl + u/d jump */
|
|
|
|
static int decimal_place = 1; /* Number of decimal places size can be shown */
|
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-13 01:15:56 +01:00
|
|
|
static int window_offset = -30;
|
2024-03-17 13:28:27 +01:00
|
|
|
|
2024-03-30 22:00:57 +01:00
|
|
|
/* Options */
|
2024-11-13 01:15:56 +01:00
|
|
|
static int show_hidden = 1; /* Show hidden files/dotfiles at startup */
|
|
|
|
static int show_details = 0; /* Show file details at startup */
|
|
|
|
static int show_icons = 1; /* Show file icons at startup */
|
2024-03-30 22:00:57 +01:00
|
|
|
|
|
|
|
/* 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-11-13 01:15:56 +01:00
|
|
|
static int dirs_size = 0;
|
2024-03-30 22:00:57 +01:00
|
|
|
|
2024-03-16 21:37:56 +01:00
|
|
|
/* Default text editor */
|
2024-11-13 01:15:56 +01:00
|
|
|
static const char *editor = "nvim";
|
2024-03-16 21:37:56 +01:00
|
|
|
|
2024-03-19 23:07:05 +01:00
|
|
|
/* File location to write last directory */
|
2024-11-13 01:15:56 +01:00
|
|
|
static char last_d[PATH_MAX] = "~/.cache/ccc/.ccc_d";
|
2024-03-19 23:07:05 +01:00
|
|
|
|
2024-03-30 22:00:57 +01:00
|
|
|
/* Will create this directory if doesn't exist! */
|
2024-11-13 01:15:56 +01:00
|
|
|
static char trash_dir[PATH_MAX] = "~/.cache/ccc/trash/";
|
2024-03-29 23:34:26 +01:00
|
|
|
|
2024-03-16 21:37:56 +01:00
|
|
|
/* Keybindings */
|
2024-03-14 20:47:46 +01:00
|
|
|
#define CTRLD 0x04
|
2024-11-05 21:00:50 +01:00
|
|
|
#define ENTER 0xD
|
2024-03-14 20:47:46 +01:00
|
|
|
#define CTRLU 0x15
|
|
|
|
#define SPACE 0x20
|
|
|
|
#define TILDE 0x7E
|
2024-11-01 00:19:58 +01:00
|
|
|
|
|
|
|
enum keys {
|
|
|
|
BACKSPACE = 127,
|
|
|
|
ARROW_LEFT = 1000,
|
|
|
|
ARROW_RIGHT,
|
|
|
|
ARROW_UP,
|
|
|
|
ARROW_DOWN,
|
|
|
|
DEL_KEY,
|
|
|
|
HOME_KEY,
|
|
|
|
END_KEY,
|
|
|
|
PAGE_UP,
|
|
|
|
PAGE_DOWN
|
|
|
|
};
|