diff options
author | kraxel <kraxel> | 2004-06-08 08:36:57 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2004-06-08 08:36:57 +0000 |
commit | 3c6816cd0d4eb03edd3b2ee1474ce2fbcbf79c63 (patch) | |
tree | 049c97b8bc4c8cdbb77f0e0ed14860fe831a6b6d /fbiconfig.c | |
parent | 41ca47fd936acb3524c69e417c03a979b2c0adb3 (diff) | |
download | fbida-3c6816cd0d4eb03edd3b2ee1474ce2fbcbf79c63.tar.gz |
- fbi: add config file support to fbi
- fbi: misc fixes
Diffstat (limited to 'fbiconfig.c')
-rw-r--r-- | fbiconfig.c | 152 |
1 files changed, 151 insertions, 1 deletions
diff --git a/fbiconfig.c b/fbiconfig.c index 0d86860..249a5ab 100644 --- a/fbiconfig.c +++ b/fbiconfig.c @@ -4,9 +4,159 @@ #include <string.h> #include <sys/stat.h> -#include "parseconfig.h" #include "fbiconfig.h" +/* ------------------------------------------------------------------------ */ + +struct cfg_cmdline fbi_cmd[] = { + { + .letter = 'h', + .cmdline = "help", + .option = { O_HELP }, + .value = "1", + .desc = "print this help text", + },{ + .letter = 'V', + .cmdline = "version", + .option = { O_VERSION }, + .value = "1", + .desc = "print fbi version number", + },{ + .cmdline = "store", + .option = { O_WRITECONF }, + .value = "1", + .desc = "write cmd line args to config file", + },{ + .letter = 'l', + .cmdline = "list", + .option = { O_FILE_LIST }, + .needsarg = 1, + .desc = "read image filelist from file <arg>", + },{ + .letter = 'P', + .cmdline = "text", + .option = { O_TEXT_MODE }, + .needsarg = 1, + .desc = "switch into text reading mode", + },{ + .letter = 'a', + .cmdline = "autozoom", + .option = { O_AUTO_ZOOM }, + .value = "1", + .desc = "automagically pick useful zoom factor", + },{ + /* end of list */ + } +}; + +struct cfg_cmdline fbi_cfg[] = { + { + .cmdline = "autoup", + .option = { O_AUTO_UP }, + .yesno = 1, + .desc = " like the above, but upscale only", + },{ + .cmdline = "autodown", + .option = { O_AUTO_DOWN }, + .yesno = 1, + .desc = " like the above, but downscale only", + + },{ + .letter = 'v', + .cmdline = "verbose", + .option = { O_VERBOSE }, + .yesno = 1, + .desc = "show filenames all the time", + },{ + .letter = 'u', + .cmdline = "random", + .option = { O_RANDOM }, + .yesno = 1, + .desc = "show files in a random order", + },{ + .letter = '1', + .cmdline = "once", + .option = { O_ONCE }, + .yesno = 1, + .desc = "don't loop (for use with -t)", + },{ + .cmdline = "comments", + .option = { O_COMMENTS }, + .yesno = 1, + .desc = "display image comments", + },{ + .letter = 'e', + .cmdline = "edit", + .option = { O_EDIT }, + .yesno = 1, + .desc = "enable editing commands (see man page)", + },{ + .cmdline = "backup", + .option = { O_BACKUP }, + .yesno = 1, + .desc = " create backup files when editing", + },{ + .cmdline = "preserve", + .option = { O_PRESERVE }, + .yesno = 1, + .desc = " preserve timestamps when editing", + + },{ + .letter = 'T', + .cmdline = "vt", + .option = { O_VT }, + .needsarg = 1, + .desc = "start on virtual console <arg>", + },{ + .letter = 's', + .cmdline = "scroll", + .option = { O_SCROLL }, + .needsarg = 1, + .desc = "scroll image by <arg> pixels", + },{ + .letter = 't', + .cmdline = "timeout", + .option = { O_TIMEOUT }, + .needsarg = 1, + .desc = "load next image after <arg> sec without user input", + },{ + .letter = 'r', + .cmdline = "resolution", + .option = { O_PCD_RES }, + .needsarg = 1, + .desc = "pick PhotoCD resolution (1..5)", + },{ + .letter = 'g', + .cmdline = "gamma", + .option = { O_GAMMA }, + .needsarg = 1, + .desc = "set display gamma (doesn't work on all hardware)", + },{ + .letter = 'f', + .cmdline = "font", + .option = { O_FONT }, + .needsarg = 1, + .desc = "use font <arg> (anything fontconfig accepts)", + },{ + .letter = 'd', + .cmdline = "device", + .option = { O_DEVICE }, + .needsarg = 1, + .desc = "use framebuffer device <arg>", + },{ + .letter = 'm', + .cmdline = "mode", + .option = { O_VIDEO_MODE }, + .needsarg = 1, + .desc = "use video mode <arg> (from /etc/fb.modes)", + + },{ + /* end of list */ + } +}; + +/* ------------------------------------------------------------------------ */ + static char *fbi_config = NULL; static void init_config(void) |