Add progress bar
This commit is contained in:
parent
d964adba95
commit
3b0e9ae607
7
Makefile
7
Makefile
@ -14,14 +14,11 @@ options:
|
|||||||
@echo "LDFLAGS = ${LDFLAGS}"
|
@echo "LDFLAGS = ${LDFLAGS}"
|
||||||
@echo "CC = ${CC}"
|
@echo "CC = ${CC}"
|
||||||
|
|
||||||
config.h:
|
|
||||||
cp config.def.h config.h
|
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@echo CC $<
|
@echo CC $<
|
||||||
@${CC} -c ${CFLAGS} $<
|
@${CC} -c ${CFLAGS} $<
|
||||||
|
|
||||||
${OBJ}: config.h config.mk
|
${OBJ}: config.mk
|
||||||
|
|
||||||
sent: ${OBJ}
|
sent: ${OBJ}
|
||||||
@echo CC -o $@
|
@echo CC -o $@
|
||||||
@ -38,7 +35,7 @@ clean:
|
|||||||
dist: clean
|
dist: clean
|
||||||
@echo creating dist tarball
|
@echo creating dist tarball
|
||||||
@mkdir -p sent-${VERSION}
|
@mkdir -p sent-${VERSION}
|
||||||
@cp -R LICENSE Makefile config.mk config.def.h ${SRC} sent-${VERSION}
|
@cp -R LICENSE Makefile config.mk config.h ${SRC} sent-${VERSION}
|
||||||
@tar -cf sent-${VERSION}.tar sent-${VERSION}
|
@tar -cf sent-${VERSION}.tar sent-${VERSION}
|
||||||
@gzip sent-${VERSION}.tar
|
@gzip sent-${VERSION}.tar
|
||||||
@rm -rf sent-${VERSION}
|
@rm -rf sent-${VERSION}
|
||||||
|
66
config.def.h
66
config.def.h
@ -1,16 +1,15 @@
|
|||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
static char *fontfallbacks[] = {
|
static char *fontfallbacks[] = {
|
||||||
"dejavu sans",
|
"mono",
|
||||||
"roboto",
|
"JoyPixels",
|
||||||
"ubuntu",
|
|
||||||
};
|
};
|
||||||
#define NUMFONTSCALES 42
|
#define NUMFONTSCALES 42
|
||||||
#define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */
|
#define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */
|
||||||
|
|
||||||
static const char *colors[] = {
|
static const char *colors[] = {
|
||||||
"#000000", /* foreground color */
|
"#000000", /* foreground color */
|
||||||
"#FFFFFF", /* background color */
|
"#FFFFFF", /* background color */
|
||||||
};
|
};
|
||||||
|
|
||||||
static const float linespacing = 1.4;
|
static const float linespacing = 1.4;
|
||||||
@ -19,38 +18,41 @@ static const float linespacing = 1.4;
|
|||||||
static const float usablewidth = 0.75;
|
static const float usablewidth = 0.75;
|
||||||
static const float usableheight = 0.75;
|
static const float usableheight = 0.75;
|
||||||
|
|
||||||
|
/* height of the presentation progress bar */
|
||||||
|
static const int progressheight = 5;
|
||||||
|
|
||||||
static Mousekey mshortcuts[] = {
|
static Mousekey mshortcuts[] = {
|
||||||
/* button function argument */
|
/* button function argument */
|
||||||
{ Button1, advance, {.i = +1} },
|
{ Button1, advance, {.i = +1} },
|
||||||
{ Button3, advance, {.i = -1} },
|
{ Button3, advance, {.i = -1} },
|
||||||
{ Button4, advance, {.i = -1} },
|
{ Button4, advance, {.i = -1} },
|
||||||
{ Button5, advance, {.i = +1} },
|
{ Button5, advance, {.i = +1} },
|
||||||
};
|
};
|
||||||
|
|
||||||
static Shortcut shortcuts[] = {
|
static Shortcut shortcuts[] = {
|
||||||
/* keysym function argument */
|
/* keysym function argument */
|
||||||
{ XK_Escape, quit, {0} },
|
{ XK_Escape, quit, {0} },
|
||||||
{ XK_q, quit, {0} },
|
{ XK_q, quit, {0} },
|
||||||
{ XK_Right, advance, {.i = +1} },
|
{ XK_Right, advance, {.i = +1} },
|
||||||
{ XK_Left, advance, {.i = -1} },
|
{ XK_Left, advance, {.i = -1} },
|
||||||
{ XK_Return, advance, {.i = +1} },
|
{ XK_Return, advance, {.i = +1} },
|
||||||
{ XK_space, advance, {.i = +1} },
|
{ XK_space, advance, {.i = +1} },
|
||||||
{ XK_BackSpace, advance, {.i = -1} },
|
{ XK_BackSpace, advance, {.i = -1} },
|
||||||
{ XK_l, advance, {.i = +1} },
|
{ XK_l, advance, {.i = +1} },
|
||||||
{ XK_h, advance, {.i = -1} },
|
{ XK_h, advance, {.i = -1} },
|
||||||
{ XK_j, advance, {.i = +1} },
|
{ XK_j, advance, {.i = +1} },
|
||||||
{ XK_k, advance, {.i = -1} },
|
{ XK_k, advance, {.i = -1} },
|
||||||
{ XK_Down, advance, {.i = +1} },
|
{ XK_Down, advance, {.i = +1} },
|
||||||
{ XK_Up, advance, {.i = -1} },
|
{ XK_Up, advance, {.i = -1} },
|
||||||
{ XK_Next, advance, {.i = +1} },
|
{ XK_Next, advance, {.i = +1} },
|
||||||
{ XK_Prior, advance, {.i = -1} },
|
{ XK_Prior, advance, {.i = -1} },
|
||||||
{ XK_n, advance, {.i = +1} },
|
{ XK_n, advance, {.i = +1} },
|
||||||
{ XK_p, advance, {.i = -1} },
|
{ XK_p, advance, {.i = -1} },
|
||||||
{ XK_r, reload, {0} },
|
{ XK_r, reload, {0} },
|
||||||
};
|
};
|
||||||
|
|
||||||
static Filter filters[] = {
|
static Filter filters[] = {
|
||||||
{ "\\.ff$", "cat" },
|
{ "\\.ff$", "cat" },
|
||||||
{ "\\.ff.bz2$", "bunzip2" },
|
{ "\\.ff.bz2$", "bunzip2" },
|
||||||
{ "\\.[a-z0-9]+$", "2ff" },
|
{ "\\.[a-z0-9]+$", "2ff" },
|
||||||
};
|
};
|
||||||
|
1
config.h
1
config.h
@ -1,3 +1,4 @@
|
|||||||
|
// -*- mode: c
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
static char *fontfallbacks[] = {
|
static char *fontfallbacks[] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user