2014-10-21 10:35:08 +00:00
|
|
|
#define CWD "cwd: "
|
|
|
|
#define CURSR " > "
|
|
|
|
#define EMPTY " "
|
|
|
|
|
2014-10-21 10:15:27 +00:00
|
|
|
struct assoc assocs[] = {
|
2014-10-21 11:07:20 +00:00
|
|
|
{ "\\.(avi|mp4|mkv|mp3|ogg|flac)$", "mplayer" },
|
2014-10-21 10:15:27 +00:00
|
|
|
{ "\\.(png|jpg|gif)$", "feh" },
|
|
|
|
{ "\\.(html|svg)$", "firefox" },
|
|
|
|
{ "\\.pdf$", "mupdf" },
|
|
|
|
{ "\\.sh$", "sh" },
|
2014-11-25 15:20:06 +00:00
|
|
|
{ ".", "less" },
|
2014-10-21 10:15:27 +00:00
|
|
|
};
|
2014-11-06 11:46:37 +00:00
|
|
|
|
|
|
|
struct key bindings[] = {
|
|
|
|
/* Quit */
|
|
|
|
{ 'q', SEL_QUIT },
|
|
|
|
/* Back */
|
|
|
|
{ KEY_BACKSPACE, SEL_BACK },
|
|
|
|
{ KEY_LEFT, SEL_BACK },
|
|
|
|
{ 'h', SEL_BACK },
|
|
|
|
/* Inside */
|
|
|
|
{ KEY_ENTER, SEL_GOIN },
|
|
|
|
{ '\r', SEL_GOIN },
|
|
|
|
{ KEY_RIGHT, SEL_GOIN },
|
|
|
|
{ 'l', SEL_GOIN },
|
|
|
|
/* Filter */
|
|
|
|
{ '/', SEL_FLTR },
|
|
|
|
{ '&', SEL_FLTR },
|
2015-01-27 08:47:57 +00:00
|
|
|
/* Type */
|
|
|
|
{ '?', SEL_TYPE },
|
2014-11-06 11:46:37 +00:00
|
|
|
/* Next */
|
|
|
|
{ 'j', SEL_NEXT },
|
|
|
|
{ KEY_DOWN, SEL_NEXT },
|
|
|
|
{ CONTROL('N'), SEL_NEXT },
|
|
|
|
/* Previous */
|
|
|
|
{ 'k', SEL_PREV },
|
|
|
|
{ KEY_UP, SEL_PREV },
|
|
|
|
{ CONTROL('P'), SEL_PREV },
|
|
|
|
/* Page down */
|
|
|
|
{ KEY_NPAGE, SEL_PGDN },
|
|
|
|
{ CONTROL('D'), SEL_PGDN },
|
|
|
|
/* Page up */
|
|
|
|
{ KEY_PPAGE, SEL_PGUP },
|
|
|
|
{ CONTROL('U'), SEL_PGUP },
|
|
|
|
/* Shell */
|
|
|
|
{ '!', SEL_SH },
|
|
|
|
/* Change dir */
|
|
|
|
{ 'c', SEL_CD },
|
|
|
|
};
|