X-Git-Url: https://git.danieliu.xyz/?p=smdp.git;a=blobdiff_plain;f=include%2Fconfig.h;fp=include%2Fconfig.h;h=28a43510268438cf2f69fd6bf4d5443c1c187516;hp=0000000000000000000000000000000000000000;hb=60f4f976c4f4743ff299dcc3a92c0b9f86d8bbc3;hpb=b95b17e8e8fe281c9c34175d03b6dbc125115a31 diff --git a/include/config.h b/include/config.h new file mode 100644 index 0000000..28a4351 --- /dev/null +++ b/include/config.h @@ -0,0 +1,101 @@ +#if !defined( CONFIG_H ) +#define CONFIG_H + +/* + * User configuration file + * Copyright (C) 2018 Michael Goehler + * + * This file is part of mdp. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +// unordered list characters +// +// you can also override via env vars: +// export MDP_LIST_OPEN1=" " MDP_LIST_OPEN2=" " MDP_LIST_OPEN3=" " +// export MDP_LIST_HEAD1=" ■ " MDP_LIST_HEAD2=" ● " MDP_LIST_HEAD3=" ▫ " +// or export MDP_LIST_OPEN to override all MDP_LIST_OPENx variables +// and similarly for MDP_LIST_HEAD +static const char *list_open1 = " | "; +static const char *list_open2 = " | "; +static const char *list_open3 = " | "; +static const char *list_head1 = " +- "; +static const char *list_head2 = " +- "; +static const char *list_head3 = " +- "; + +#define FADE_DELAY 15000 // micro seconds +#define GOTO_SLIDE_DELAY 5 // tenths of seconds + +// colors - you can only set in 8-bit color mode +// +/* Use the ncurses defined colors, here's a list of them: + * COLOR_BLACK + * COLOR_RED + * COLOR_GREEN + * COLOR_YELLOW + * COLOR_BLUE + * COLOR_MAGENTA + * COLOR_CYAN + * COLOR_WHITE + */ +#define FG_COLOR COLOR_WHITE +#define BG_COLOR COLOR_BLACK +#define TITLE_COLOR COLOR_YELLOW +#define HEADER_COLOR COLOR_BLUE +#define BOLD_COLOR COLOR_RED + +// keybindings +static const int prev_slide_binding[] = { + KEY_UP, + KEY_LEFT, + KEY_PPAGE, + 8, // BACKSPACE (ascii) + 127, // BACKSPACE (xterm) + 263, // BACKSPACE (getty) + 'h', + 'k', + 0 +}; +static const int next_slide_binding[] = { + KEY_DOWN, + KEY_RIGHT, + KEY_NPAGE, + '\n', // ENTER + ' ', // SPACE + 'j', + 'l', + 0 +}; +static const int first_slide_binding[] = { + 'g', + KEY_HOME, + 0 +}; +static const int last_slide_binding[] = { + 'G', + KEY_END, + 0 +}; +static const int reload_binding[] = { + 'r', + 0 +}; +static const int quit_binding[] = { + 'q', + 0 +}; + +#endif // !defined( CONFIG_H )