aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2017-10-17 15:21:04 -0500
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:53:24 -0600
commit65976c1a29f2945c3cfb6af74cd6440cf193021d (patch)
tree670d2b3063767c1363322d6db5e73447e682081a /config.def.h
parent32d3b1d00f66eda4f5446f3b32cabed2c9a77a40 (diff)
downloadst-patched-65976c1a29f2945c3cfb6af74cd6440cf193021d.tar.bz2
st-patched-65976c1a29f2945c3cfb6af74cd6440cf193021d.tar.xz
st-patched-65976c1a29f2945c3cfb6af74cd6440cf193021d.zip
Move config.h include from st.c to x.c
config.h includes references to KeySyms and other X stuff. Until we come up with a cleaner way to separate configuration, it is simpler (leads to more code removal) to have this here. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h73
1 files changed, 36 insertions, 37 deletions
diff --git a/config.def.h b/config.def.h
index 18cb31c..1c181ab 100644
--- a/config.def.h
+++ b/config.def.h
@@ -5,8 +5,8 @@
5 * 5 *
6 * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html 6 * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
7 */ 7 */
8char font[] = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; 8static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
9int borderpx = 2; 9static int borderpx = 2;
10 10
11/* 11/*
12 * What program is execed by st depends of these precedence rules: 12 * What program is execed by st depends of these precedence rules:
@@ -16,54 +16,54 @@ int borderpx = 2;
16 * 4: value of shell in /etc/passwd 16 * 4: value of shell in /etc/passwd
17 * 5: value of shell in config.h 17 * 5: value of shell in config.h
18 */ 18 */
19static char shell[] = "/bin/sh"; 19char *shell = "/bin/sh";
20static char *utmp = NULL; 20char *utmp = NULL;
21static char stty_args[] = "stty raw pass8 nl -echo -iexten -cstopb 38400"; 21char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
22 22
23/* identification sequence returned in DA and DECID */ 23/* identification sequence returned in DA and DECID */
24static char vtiden[] = "\033[?6c"; 24char *vtiden = "\033[?6c";
25 25
26/* Kerning / character bounding-box multipliers */ 26/* Kerning / character bounding-box multipliers */
27float cwscale = 1.0; 27static float cwscale = 1.0;
28float chscale = 1.0; 28static float chscale = 1.0;
29 29
30/* 30/*
31 * word delimiter string 31 * word delimiter string
32 * 32 *
33 * More advanced example: " `'\"()[]{}" 33 * More advanced example: " `'\"()[]{}"
34 */ 34 */
35static char worddelimiters[] = " "; 35char *worddelimiters = " ";
36 36
37/* selection timeouts (in milliseconds) */ 37/* selection timeouts (in milliseconds) */
38unsigned int doubleclicktimeout = 300; 38static unsigned int doubleclicktimeout = 300;
39unsigned int tripleclicktimeout = 600; 39static unsigned int tripleclicktimeout = 600;
40 40
41/* alt screens */ 41/* alt screens */
42int allowaltscreen = 1; 42int allowaltscreen = 1;
43 43
44/* frames per second st should at maximum draw to the screen */ 44/* frames per second st should at maximum draw to the screen */
45unsigned int xfps = 120; 45static unsigned int xfps = 120;
46unsigned int actionfps = 30; 46static unsigned int actionfps = 30;
47 47
48/* 48/*
49 * blinking timeout (set to 0 to disable blinking) for the terminal blinking 49 * blinking timeout (set to 0 to disable blinking) for the terminal blinking
50 * attribute. 50 * attribute.
51 */ 51 */
52unsigned int blinktimeout = 800; 52static unsigned int blinktimeout = 800;
53 53
54/* 54/*
55 * thickness of underline and bar cursors 55 * thickness of underline and bar cursors
56 */ 56 */
57unsigned int cursorthickness = 2; 57static unsigned int cursorthickness = 2;
58 58
59/* 59/*
60 * bell volume. It must be a value between -100 and 100. Use 0 for disabling 60 * bell volume. It must be a value between -100 and 100. Use 0 for disabling
61 * it 61 * it
62 */ 62 */
63int bellvolume = 0; 63static int bellvolume = 0;
64 64
65/* default TERM value */ 65/* default TERM value */
66char termname[] = "st-256color"; 66char *termname = "st-256color";
67 67
68/* 68/*
69 * spaces per tab 69 * spaces per tab
@@ -80,10 +80,10 @@ char termname[] = "st-256color";
80 * 80 *
81 * stty tabs 81 * stty tabs
82 */ 82 */
83static unsigned int tabspaces = 8; 83unsigned int tabspaces = 8;
84 84
85/* Terminal colors (16 first used in escape sequence) */ 85/* Terminal colors (16 first used in escape sequence) */
86const char *colorname[] = { 86static const char *colorname[] = {
87 /* 8 normal colors */ 87 /* 8 normal colors */
88 "black", 88 "black",
89 "red3", 89 "red3",
@@ -118,8 +118,8 @@ const char *colorname[] = {
118 */ 118 */
119unsigned int defaultfg = 7; 119unsigned int defaultfg = 7;
120unsigned int defaultbg = 0; 120unsigned int defaultbg = 0;
121unsigned int defaultcs = 256; 121static unsigned int defaultcs = 256;
122unsigned int defaultrcs = 257; 122static unsigned int defaultrcs = 257;
123 123
124/* 124/*
125 * Default shape of cursor 125 * Default shape of cursor
@@ -128,33 +128,33 @@ unsigned int defaultrcs = 257;
128 * 6: Bar ("|") 128 * 6: Bar ("|")
129 * 7: Snowman ("☃") 129 * 7: Snowman ("☃")
130 */ 130 */
131unsigned int cursorshape = 2; 131static unsigned int cursorshape = 2;
132 132
133/* 133/*
134 * Default columns and rows numbers 134 * Default columns and rows numbers
135 */ 135 */
136 136
137unsigned int cols = 80; 137static unsigned int cols = 80;
138unsigned int rows = 24; 138static unsigned int rows = 24;
139 139
140/* 140/*
141 * Default colour and shape of the mouse cursor 141 * Default colour and shape of the mouse cursor
142 */ 142 */
143unsigned int mouseshape = XC_xterm; 143static unsigned int mouseshape = XC_xterm;
144unsigned int mousefg = 7; 144static unsigned int mousefg = 7;
145unsigned int mousebg = 0; 145static unsigned int mousebg = 0;
146 146
147/* 147/*
148 * Color used to display font attributes when fontconfig selected a font which 148 * Color used to display font attributes when fontconfig selected a font which
149 * doesn't match the ones requested. 149 * doesn't match the ones requested.
150 */ 150 */
151unsigned int defaultattr = 11; 151static unsigned int defaultattr = 11;
152 152
153/* 153/*
154 * Internal mouse shortcuts. 154 * Internal mouse shortcuts.
155 * Beware that overloading Button1 will disable the selection. 155 * Beware that overloading Button1 will disable the selection.
156 */ 156 */
157MouseShortcut mshortcuts[] = { 157static MouseShortcut mshortcuts[] = {
158 /* button mask string */ 158 /* button mask string */
159 { Button4, XK_ANY_MOD, "\031" }, 159 { Button4, XK_ANY_MOD, "\031" },
160 { Button5, XK_ANY_MOD, "\005" }, 160 { Button5, XK_ANY_MOD, "\005" },
@@ -164,7 +164,7 @@ MouseShortcut mshortcuts[] = {
164#define MODKEY Mod1Mask 164#define MODKEY Mod1Mask
165#define TERMMOD (ControlMask|ShiftMask) 165#define TERMMOD (ControlMask|ShiftMask)
166 166
167Shortcut shortcuts[] = { 167static Shortcut shortcuts[] = {
168 /* mask keysym function argument */ 168 /* mask keysym function argument */
169 { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, 169 { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
170 { ControlMask, XK_Print, toggleprinter, {.i = 0} }, 170 { ControlMask, XK_Print, toggleprinter, {.i = 0} },
@@ -209,26 +209,26 @@ Shortcut shortcuts[] = {
209 * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) 209 * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
210 * to be mapped below, add them to this array. 210 * to be mapped below, add them to this array.
211 */ 211 */
212KeySym mappedkeys[] = { -1 }; 212static KeySym mappedkeys[] = { -1 };
213 213
214/* 214/*
215 * State bits to ignore when matching key or button events. By default, 215 * State bits to ignore when matching key or button events. By default,
216 * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. 216 * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
217 */ 217 */
218uint ignoremod = Mod2Mask|XK_SWITCH_MOD; 218static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
219 219
220/* 220/*
221 * Override mouse-select while mask is active (when MODE_MOUSE is set). 221 * Override mouse-select while mask is active (when MODE_MOUSE is set).
222 * Note that if you want to use ShiftMask with selmasks, set this to an other 222 * Note that if you want to use ShiftMask with selmasks, set this to an other
223 * modifier, set to 0 to not use it. 223 * modifier, set to 0 to not use it.
224 */ 224 */
225uint forceselmod = ShiftMask; 225static uint forceselmod = ShiftMask;
226 226
227/* 227/*
228 * This is the huge key array which defines all compatibility to the Linux 228 * This is the huge key array which defines all compatibility to the Linux
229 * world. Please decide about changes wisely. 229 * world. Please decide about changes wisely.
230 */ 230 */
231Key key[] = { 231static Key key[] = {
232 /* keysym mask string appkey appcursor crlf */ 232 /* keysym mask string appkey appcursor crlf */
233 { XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0}, 233 { XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0},
234 { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, 234 { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0},
@@ -451,7 +451,7 @@ Key key[] = {
451 * ButtonRelease and MotionNotify. 451 * ButtonRelease and MotionNotify.
452 * If no match is found, regular selection is used. 452 * If no match is found, regular selection is used.
453 */ 453 */
454uint selmasks[] = { 454static uint selmasks[] = {
455 [SEL_RECTANGULAR] = Mod1Mask, 455 [SEL_RECTANGULAR] = Mod1Mask,
456}; 456};
457 457
@@ -459,8 +459,7 @@ uint selmasks[] = {
459 * Printable characters in ASCII, used to estimate the advance width 459 * Printable characters in ASCII, used to estimate the advance width
460 * of single wide characters. 460 * of single wide characters.
461 */ 461 */
462char ascii_printable[] = 462static char ascii_printable[] =
463 " !\"#$%&'()*+,-./0123456789:;<=>?" 463 " !\"#$%&'()*+,-./0123456789:;<=>?"
464 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" 464 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
465 "`abcdefghijklmnopqrstuvwxyz{|}~"; 465 "`abcdefghijklmnopqrstuvwxyz{|}~";
466