#ifndef CONFIG_H
#define CONFIG_H
+#include "stdlib.h"
+
#define START_PAGE "http://sourceforge.net/apps/trac/vimprobable"
#define STATUS_BG_COLOR "#000000" /* background color for status bar */
static const char *inputbox_fg[] = { "#000000", "#000000" };
static const char *inputbox_bg[] = { "#ffffff", "#ff0000" };
-
#define SETTING_DEFAUL_FONT_SIZE 12
#define SETTING_USER_AGENT PROJECT "/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)"
#define SETTING_MAX_CONNS 25
#define SCROLLSTEP (40) /* cursor difference in pixel for scrolling */
+const struct {
+ char *command;
+} default_config[] = {
+ {"nmap o inputopen"},
+ {"nmap O inputopencurrent"},
+ {"nmap : input"},
+ {"nmap d quit"},
+ {NULL}
+};
+
#endif /* end of include guard: CONFIG_H */
FILE* fp;
gchar line[255];
+ /* load default config */
+ for (guint i = 0; default_config[i].command != NULL; i++) {
+ vp_process_input(default_config[i].command);
+ }
+
+ /* read config from config files */
if (access(vp.files[FILES_CONFIG], F_OK) != 0) {
fprintf(stderr, "Could not find config file");
return;