added config.h
This commit is contained in:
7
config.h
Normal file
7
config.h
Normal file
@ -0,0 +1,7 @@
|
||||
#include "defines.h"
|
||||
|
||||
|
||||
static file_preview file_previews[] = {
|
||||
{ "c", "&a" },
|
||||
{ ".c", "&ueberzug" },
|
||||
};
|
17
defines.h
17
defines.h
@ -1,3 +1,8 @@
|
||||
#ifndef CONFIG_GUARD
|
||||
#define CONFIG_GUARD
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define STATUS_QUIT_PROGRAM 1
|
||||
#define STATUS_RUN_BACKEND 2
|
||||
#define STATUS_RELOAD_DIRECTORY 4
|
||||
@ -21,6 +26,7 @@
|
||||
#define FILE_STATUS_HOVER 1
|
||||
#define FILE_STATUS_SELECTED 2;
|
||||
#define FILE_STATUS_IS_REGULAR_FILE 4
|
||||
#define FILE_STATUS_FILE_OPEN 128 /* only used for file previews */
|
||||
|
||||
#define COLOR_UNKNOWN 0
|
||||
#define COLOR_DIR 1
|
||||
@ -44,9 +50,10 @@
|
||||
#define FILE_TYPE_SOCK COLOR_SOCK
|
||||
#define FILE_TYPE_FIFO COLOR_FIFO
|
||||
#define FILE_TYPE_ORPHAN COLOR_ORPHAN
|
||||
#define FILE_TYPE_OPEN_FILE 128 /* this is only used in rgt_content to print a file preview, not the dir */
|
||||
|
||||
#ifndef GUARD
|
||||
#define GUARD
|
||||
#ifndef STRUCT_GUARD
|
||||
#define STRUCT_GUARD
|
||||
|
||||
/* complex types are good actually */
|
||||
typedef struct File {
|
||||
@ -61,5 +68,11 @@ typedef struct Color {
|
||||
char *file_extension;
|
||||
short color_pair;
|
||||
} color;
|
||||
typedef struct File_preview {
|
||||
char *file_extension;
|
||||
char *command; /* this will blindly execute any inserted shell command */
|
||||
/* commands with an '&' prefix are inbuild */
|
||||
} file_preview;
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user