Use functions instead of enum for config
This commit is contained in:
parent
6f976e9ede
commit
825eb2b9de
2 changed files with 616 additions and 725 deletions
104
config.h
104
config.h
|
@ -53,57 +53,57 @@ static char last_d[PATH_MAX] = "~/.cache/ccc/.ccc_d";
|
|||
static char trash_dir[PATH_MAX] = "~/.cache/ccc/trash/";
|
||||
|
||||
static Key keybindings[] = {
|
||||
{'q', ACT_QUIT},
|
||||
{'z', ACT_RELOAD},
|
||||
{BACKSPACE, ACT_BACK},
|
||||
{ARROW_LEFT, ACT_BACK},
|
||||
{'h', ACT_BACK},
|
||||
{ENTER, ACT_ENTER},
|
||||
{ARROW_RIGHT, ACT_ENTER},
|
||||
{'l', ACT_ENTER},
|
||||
{CTRLU, ACT_JUMP_UP},
|
||||
{CTRLD, ACT_JUMP_DOWN},
|
||||
{ARROW_DOWN, ACT_DOWN},
|
||||
{ARROW_UP, ACT_UP},
|
||||
{'k', ACT_UP},
|
||||
{'j', ACT_DOWN},
|
||||
{'G', ACT_BOTTOM},
|
||||
{'g', ACT_TOP},
|
||||
{'~', ACT_HOME},
|
||||
{'t', ACT_TRASH_DIR},
|
||||
{'u', ACT_SORT},
|
||||
{'A', ACT_SHOW_DIR_SIZE},
|
||||
{'-', ACT_PREV_DIR},
|
||||
{'?', ACT_SHOW_HELP},
|
||||
{'.', ACT_HIDDEN_FILES},
|
||||
{'i', ACT_FILE_DETAILS},
|
||||
{'w', ACT_SHOW_ICONS},
|
||||
{'f', ACT_CREATE_FILE},
|
||||
{'n', ACT_CREATE_DIR},
|
||||
{'r', ACT_RENAME_FILE},
|
||||
{':', ACT_GOTO_DIR},
|
||||
{'X', ACT_TOGGLE_EXE},
|
||||
{'!', ACT_START_SHELL},
|
||||
{'y', ACT_COPY_FILENAME},
|
||||
{'o', ACT_OPEN_FILE},
|
||||
{'O', ACT_OPEN_FILE_DETACHED},
|
||||
{'x', ACT_VIEW_FILE_ATTR},
|
||||
{'e', ACT_SHOW_HIST},
|
||||
{'1', ACT_FAV1},
|
||||
{'2', ACT_FAV2},
|
||||
{'3', ACT_FAV3},
|
||||
{'4', ACT_FAV4},
|
||||
{'5', ACT_FAV5},
|
||||
{'6', ACT_FAV6},
|
||||
{'7', ACT_FAV7},
|
||||
{'8', ACT_FAV8},
|
||||
{'9', ACT_FAV9},
|
||||
{' ', ACT_MARK_FILE},
|
||||
{'a', ACT_MARK_ALL},
|
||||
{'d', ACT_DELETE},
|
||||
{'m', ACT_MOVE},
|
||||
{'c', ACT_COPY},
|
||||
{'s', ACT_SYM_LINK},
|
||||
{'b', ACT_BULK_RENAME},
|
||||
{'q', quit, {0}},
|
||||
{'z', reload, {0}},
|
||||
{BACKSPACE, nav_back, {0}},
|
||||
{ARROW_LEFT, nav_back, {0}},
|
||||
{'h', nav_back, {0}},
|
||||
{ENTER, nav_enter, {0}},
|
||||
{ARROW_RIGHT, nav_enter, {0}},
|
||||
{'l', nav_enter, {0}},
|
||||
{CTRLU, nav_jump_up, {0}},
|
||||
{CTRLD, nav_jump_down, {0}},
|
||||
{ARROW_UP, nav_up, {0}},
|
||||
{'k', nav_up, {0}},
|
||||
{ARROW_DOWN, nav_down, {0}},
|
||||
{'j', nav_down, {0}},
|
||||
{'G', nav_bottom, {0}},
|
||||
{'g', nav_top, {0}},
|
||||
{'~', goto_home_dir, {0}},
|
||||
{'t', goto_trash_dir, {0}},
|
||||
{'u', sort_files, {0}},
|
||||
{'A', show_dir_size, {0}},
|
||||
{'-', prev_dir, {0}},
|
||||
{'?', show_help, {0}},
|
||||
{'.', toggle_hidden_files, {0}},
|
||||
{'i', toggle_file_details, {0}},
|
||||
{'w', toggle_show_icons, {0}},
|
||||
{'f', create_file, {0}},
|
||||
{'n', create_dir, {0}},
|
||||
{'r', rename_file, {0}},
|
||||
{':', goto_dir, {0}},
|
||||
{'X', toggle_executable, {0}},
|
||||
{'!', start_shell, {0}},
|
||||
{'y', yank_clipboard, {0}},
|
||||
{'o', open_with, {0}},
|
||||
{'O', open_detached, {0}},
|
||||
{'x', view_file_attr, {0}},
|
||||
{'e', show_history, {0}},
|
||||
{'1', open_fav, {.i = 1}},
|
||||
{'2', open_fav, {.i = 2}},
|
||||
{'3', open_fav, {.i = 3}},
|
||||
{'4', open_fav, {.i = 4}},
|
||||
{'5', open_fav, {.i = 5}},
|
||||
{'6', open_fav, {.i = 6}},
|
||||
{'7', open_fav, {.i = 7}},
|
||||
{'8', open_fav, {.i = 8}},
|
||||
{'9', open_fav, {.i = 9}},
|
||||
{' ', mark_file, {0}},
|
||||
{'a', mark_all, {0}},
|
||||
{'d', delete_files, {0}},
|
||||
{'m', move_files, {0}},
|
||||
{'c', copy_files, {0}},
|
||||
{'s', symbolic_link, {0}},
|
||||
{'b', bulk_rename, {0}},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue