mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Reorder configuration stuff
This commit is contained in:
parent
88fd8fcf8b
commit
10d2d18cb2
39
noice.c
39
noice.c
|
@ -26,6 +26,27 @@
|
|||
#define MIN(x, y) ((x) < (y) ? (x) : (y))
|
||||
#define ISODD(x) ((x) & 1)
|
||||
|
||||
struct assoc {
|
||||
char *ext; /* Extension */
|
||||
char *bin; /* Program */
|
||||
};
|
||||
|
||||
/* Configuration */
|
||||
struct assoc assocs[] = {
|
||||
{ ".avi", "mplayer" },
|
||||
{ ".mp4", "mplayer" },
|
||||
{ ".mkv", "mplayer" },
|
||||
{ ".mp3", "mplayer" },
|
||||
{ ".ogg", "mplayer" },
|
||||
{ ".srt", "less" },
|
||||
{ ".txt", "less" },
|
||||
{ "README", "less" },
|
||||
};
|
||||
|
||||
#define CWD "cwd: "
|
||||
#define CURSR " > "
|
||||
#define EMPTY " "
|
||||
|
||||
/*
|
||||
* Layout:
|
||||
* .---------
|
||||
|
@ -49,20 +70,6 @@ struct entry {
|
|||
char name[MAXNAMLEN + 1];
|
||||
};
|
||||
|
||||
struct assoc {
|
||||
char *ext; /* Extension */
|
||||
char *bin; /* Program */
|
||||
} assocs[] = {
|
||||
{ ".avi", "mplayer" },
|
||||
{ ".mp4", "mplayer" },
|
||||
{ ".mkv", "mplayer" },
|
||||
{ ".mp3", "mplayer" },
|
||||
{ ".ogg", "mplayer" },
|
||||
{ ".srt", "less" },
|
||||
{ ".txt", "less" },
|
||||
{ "README", "less" },
|
||||
};
|
||||
|
||||
char *
|
||||
openwith(char *file)
|
||||
{
|
||||
|
@ -266,10 +273,6 @@ redraw:
|
|||
DPRINTF_D(cur);
|
||||
DPRINTF_S(path);
|
||||
|
||||
#define CWD "cwd: "
|
||||
#define CURSR " > "
|
||||
#define EMPTY " "
|
||||
|
||||
/* No text wrapping in cwd line */
|
||||
cwd = malloc(COLS * sizeof(char));
|
||||
strncpy(cwd, path, COLS);
|
||||
|
|
Loading…
Reference in a new issue