b516f468fa
Sent now uses farbfeld[0] as an intermediate format. A series of filters is specified in config.h that matches file extensions to filter programs. The programs will convert between formats such as png to farbfeld. Internally in sent we do not need to worry on how to parse png or any other format. This also works with jpg and gif and others. The 2ff wrapper will use imagemagick conversion tools. This is temporary as jpg2ff and gif2ff will also be implemented. To make this work, you will have to clone[0] and put png2ff and 2ff in your PATH. [0] http://git.2f30.org/farbfeld/
53 lines
1.7 KiB
C
53 lines
1.7 KiB
C
/* See LICENSE file for copyright and license details. */
|
|
|
|
static char *fontfallbacks[] = {
|
|
"dejavu sans",
|
|
"roboto",
|
|
"ubuntu",
|
|
};
|
|
#define NUMFONTSCALES 42
|
|
#define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */
|
|
|
|
static const char *fgcol = "#000000";
|
|
static const char *bgcol = "#FFFFFF";
|
|
|
|
static const float linespacing = 1.4;
|
|
|
|
/* how much screen estate is to be used at max for the content */
|
|
static const float usablewidth = 0.75;
|
|
static const float usableheight = 0.75;
|
|
|
|
static Mousekey mshortcuts[] = {
|
|
/* button function argument */
|
|
{ Button1, advance, {.i = +1} },
|
|
{ Button3, advance, {.i = -1} },
|
|
{ Button4, advance, {.i = -1} },
|
|
{ Button5, advance, {.i = +1} },
|
|
};
|
|
|
|
static Shortcut shortcuts[] = {
|
|
/* keysym function argument */
|
|
{ XK_Escape, quit, {0} },
|
|
{ XK_q, quit, {0} },
|
|
{ XK_Right, advance, {.i = +1} },
|
|
{ XK_Left, advance, {.i = -1} },
|
|
{ XK_Return, advance, {.i = +1} },
|
|
{ XK_space, advance, {.i = +1} },
|
|
{ XK_BackSpace, advance, {.i = -1} },
|
|
{ XK_l, advance, {.i = +1} },
|
|
{ XK_h, advance, {.i = -1} },
|
|
{ XK_j, advance, {.i = +1} },
|
|
{ XK_k, advance, {.i = -1} },
|
|
{ XK_Down, advance, {.i = +1} },
|
|
{ XK_Up, advance, {.i = -1} },
|
|
{ XK_Next, advance, {.i = +1} },
|
|
{ XK_Prior, advance, {.i = -1} },
|
|
{ XK_n, advance, {.i = +1} },
|
|
{ XK_p, advance, {.i = -1} },
|
|
};
|
|
|
|
static Filter filters[] = {
|
|
{ "\\.png$", "png2ff" },
|
|
{ "\\.(jpg|gif)$", "2ff" },
|
|
};
|