-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.def.hpp
79 lines (70 loc) · 2.23 KB
/
config.def.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include <climits>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#define AnyMask UINT_MAX
#define EmptyMask 0
enum Action {
QUIT,
NEXT,
PREV,
FIRST,
LAST,
FIT_PAGE,
FIT_WIDTH,
DOWN,
UP,
BACK,
RELOAD,
GOTO_PAGE,
SEARCH,
PAGE,
MAGNIFY,
ROTATE_CW,
ROTATE_CCW
};
struct Shortcut {
unsigned mask;
KeySym ksym;
Action action;
};
/*
* Background color, X11 color name (see:
* https://en.wikipedia.org/wiki/X11_color_names).
*/
static const char *bg_color = "Gray50";
/*
* Parameters are: mask, keysym, action.
* Mask can be any mask from XKeyEvent.state (see: man XKeyEvent) or
* AnyMask (mask is ignored), or EmptyMask (empty mask, no key modifiers).
* Keysym can be any keysym from /usr/include/X11/keysymdef.h.
*/
static Shortcut shortcuts[] = {{AnyMask, XK_q, QUIT},
{EmptyMask, XK_Escape, QUIT},
{ControlMask, XK_Page_Down, NEXT},
{ControlMask, XK_Page_Up, PREV},
{ControlMask, XK_Home, FIRST},
{ControlMask, XK_End, LAST},
{EmptyMask, XK_z, FIT_PAGE},
{EmptyMask, XK_w, FIT_WIDTH},
{EmptyMask, XK_Down, DOWN},
{EmptyMask, XK_Up, UP},
{EmptyMask, XK_b, BACK},
{AnyMask, XK_r, RELOAD},
{AnyMask, XK_g, GOTO_PAGE},
{AnyMask, XK_s, SEARCH},
{EmptyMask, XK_slash, SEARCH},
{EmptyMask, XK_p, PAGE},
{EmptyMask, XK_m, MAGNIFY},
{EmptyMask, XK_bracketright, ROTATE_CW},
{EmptyMask, XK_bracketleft, ROTATE_CCW}};
/*
* Scrolling speed (in page fractions).
*/
static double arrow_scroll = 0.01;
static double page_scroll = 0.30;
static double mouse_scroll = 0.02;
/*
* Status line font, must be in X logical font description format
* (see: https://en.wikipedia.org/wiki/X_logical_font_description).
*/
static const char *font = "-misc-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*";