nnn/config.def.h

100 lines
3.9 KiB
C
Raw Normal View History

2015-11-20 14:36:40 +00:00
/* See LICENSE file for copyright and license details. */
#define CWD "cwd: "
#define CURSR " > "
#define EMPTY " "
2017-04-01 09:11:07 +00:00
static int mtimeorder = 0; /* Set to 1 to sort by time modified */
static int sizeorder = 0; /* Set to 1 to sort by file size */
static int bsizeorder = 0; /* Set to 1 to sort by blocks used including content */
2017-04-01 09:11:07 +00:00
static int idletimeout = 0; /* Screensaver timeout in seconds, 0 to disable */
static int showhidden = 0; /* Set to 1 to show hidden files by default */
static int showdetail = 0; /* Set to show additional file info */
static char *idlecmd = "rain"; /* The screensaver program */
2015-02-04 12:32:16 +00:00
static struct assoc assocs[] = {
{ "\\.(c|cpp|h|log|md|py|sh|txt)$", "text" },
{ "\\.(3g2|3gp|asf|avi|divx|flv|m2v|m4v|mkv|mov|mp4|mp4v|mpeg|mpg|ogv|qt|rm|rmvb|vob|webm|wmv)$", "video" },
{ "\\.(aac|ac3|amr|flac|m4a|m4b|m4p|mp3|mp4a|ogg|opus|ra|wav|wma)$", "audio" },
{ "\\.(bmp|gif|jpeg|jpg|pbm|pgm|png|svg|tiff|webp)$", "image" },
{ "\\.pdf$", "pdf" },
2014-10-21 10:15:27 +00:00
};
static struct key bindings[] = {
/* Quit */
2017-04-03 17:03:46 +00:00
{ 'q', SEL_QUIT, "", "" },
2017-04-19 12:52:30 +00:00
{ 'Q', SEL_CDQUIT, "", "" },
/* Back */
2017-04-03 17:03:46 +00:00
{ KEY_BACKSPACE, SEL_BACK, "", "" },
{ KEY_LEFT, SEL_BACK, "", "" },
{ 'h', SEL_BACK, "", "" },
{ CONTROL('H'), SEL_BACK, "", "" },
/* Inside */
2017-04-03 17:03:46 +00:00
{ KEY_ENTER, SEL_GOIN, "", "" },
{ '\r', SEL_GOIN, "", "" },
{ KEY_RIGHT, SEL_GOIN, "", "" },
{ 'l', SEL_GOIN, "", "" },
/* Filter */
2017-04-03 17:03:46 +00:00
{ '/', SEL_FLTR, "", "" },
/* Next */
2017-04-03 17:03:46 +00:00
{ 'j', SEL_NEXT, "", "" },
{ KEY_DOWN, SEL_NEXT, "", "" },
{ CONTROL('N'), SEL_NEXT, "", "" },
/* Previous */
2017-04-03 17:03:46 +00:00
{ 'k', SEL_PREV, "", "" },
{ KEY_UP, SEL_PREV, "", "" },
{ CONTROL('P'), SEL_PREV, "", "" },
/* Page down */
2017-04-03 17:03:46 +00:00
{ KEY_NPAGE, SEL_PGDN, "", "" },
{ CONTROL('D'), SEL_PGDN, "", "" },
/* Page up */
2017-04-03 17:03:46 +00:00
{ KEY_PPAGE, SEL_PGUP, "", "" },
{ CONTROL('U'), SEL_PGUP, "", "" },
/* First entry */
2017-04-03 17:03:46 +00:00
{ KEY_HOME, SEL_HOME, "", "" },
{ 'g', SEL_HOME, "", "" },
2017-04-03 17:03:46 +00:00
{ CONTROL('A'), SEL_HOME, "", "" },
{ '^', SEL_HOME, "", "" },
/* Last entry */
2017-04-03 17:03:46 +00:00
{ KEY_END, SEL_END, "", "" },
{ 'G', SEL_END, "", "" },
2017-04-03 17:03:46 +00:00
{ CONTROL('E'), SEL_END, "", "" },
{ '$', SEL_END, "", "" },
/* Change dir */
2017-04-03 17:03:46 +00:00
{ 'c', SEL_CD, "", "" },
/* HOME */
2017-04-03 17:03:46 +00:00
{ '~', SEL_CDHOME, "", "" },
/* Initial directory */
{ '&', SEL_CDBEGIN, "", "" },
/* Last visited dir */
{ '-', SEL_LAST, "", "" },
/* Toggle hide .dot files */
2017-04-03 17:03:46 +00:00
{ '.', SEL_TOGGLEDOT, "", "" },
/* Detailed listing */
2017-04-03 17:03:46 +00:00
{ 'd', SEL_DETAIL, "", "" },
/* File details */
2017-04-03 17:03:46 +00:00
{ 'D', SEL_STATS, "", "" },
2017-04-21 18:26:48 +00:00
/* Show mediainfo short */
{ 'm', SEL_MEDIA, "", "" },
/* Show mediainfo full */
{ 'M', SEL_FMEDIA, "", "" },
/* Open dir in desktop file manager */
{ 'o', SEL_DFB, "", "" },
/* Toggle sort by size */
2017-04-03 17:03:46 +00:00
{ 's', SEL_FSIZE, "", "" },
/* Sort by total block size including dir contents */
{ 'S', SEL_BSIZE, "", "" },
2015-02-05 15:53:50 +00:00
/* Toggle sort by time */
2017-04-03 17:03:46 +00:00
{ 't', SEL_MTIME, "", "" },
{ CONTROL('L'), SEL_REDRAW, "", "" },
/* Copy currently selected file path */
2017-04-03 17:03:46 +00:00
{ CONTROL('K'), SEL_COPY, "", "" },
/* Show help */
{ '?', SEL_HELP, "", "" },
/* Run command */
2017-04-03 17:03:46 +00:00
{ 'z', SEL_RUN, "top", "" },
2017-04-01 09:11:07 +00:00
{ '!', SEL_RUN, "sh", "SHELL" },
/* Run command with argument */
2017-04-01 09:11:07 +00:00
{ 'e', SEL_RUNARG, "vi", "EDITOR" },
{ 'p', SEL_RUNARG, "less", "PAGER" },
};