Xinqi Bao's Git
1 /* See LICENSE file for copyright and license details. */
4 static char font
[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false";
5 static int borderpx
= 2;
6 static char shell
[] = "/bin/sh";
8 /* double-click timeout (in milliseconds) between clicks for selection */
9 static unsigned int doubleclicktimeout
= 300;
10 static unsigned int tripleclicktimeout
= 600;
13 static char termname
[] = "st-256color";
15 static unsigned int tabspaces
= 8;
18 /* Terminal colors (16 first used in escape sequence) */
19 static const char *colorname
[] = {
42 /* more colors can be added after 255 to use with DefaultXX */
49 * Default colors (colorname index)
50 * foreground, background, cursor, unfocused cursor
52 static unsigned int defaultfg
= 7;
53 static unsigned int defaultbg
= 0;
54 static unsigned int defaultcs
= 256;
55 static unsigned int defaultucs
= 257;
58 * Special keys (change & recompile st.info accordingly)
59 * Keep in mind that kpress() in st.c hardcodes some keys.
62 * * Use XK_ANY_MOD to match the key no matter modifiers state
63 * * Use XK_NO_MOD to match the key alone (no modifiers)
66 /* key, mask, output */
68 { XK_BackSpace
, XK_NO_MOD
, "\177" },
69 { XK_Insert
, XK_NO_MOD
, "\033[2~" },
70 { XK_Delete
, XK_NO_MOD
, "\033[3~" },
71 { XK_Home
, XK_NO_MOD
, "\033[1~" },
72 { XK_End
, XK_NO_MOD
, "\033[4~" },
73 { XK_Prior
, XK_NO_MOD
, "\033[5~" },
74 { XK_Next
, XK_NO_MOD
, "\033[6~" },
75 { XK_F1
, XK_NO_MOD
, "\033OP" },
76 { XK_F2
, XK_NO_MOD
, "\033OQ" },
77 { XK_F3
, XK_NO_MOD
, "\033OR" },
78 { XK_F4
, XK_NO_MOD
, "\033OS" },
79 { XK_F5
, XK_NO_MOD
, "\033[15~" },
80 { XK_F6
, XK_NO_MOD
, "\033[17~" },
81 { XK_F7
, XK_NO_MOD
, "\033[18~" },
82 { XK_F8
, XK_NO_MOD
, "\033[19~" },
83 { XK_F9
, XK_NO_MOD
, "\033[20~" },
84 { XK_F10
, XK_NO_MOD
, "\033[21~" },
85 { XK_F11
, XK_NO_MOD
, "\033[23~" },
86 { XK_F12
, XK_NO_MOD
, "\033[24~" },
89 /* Internal shortcuts. */
90 #define MODKEY Mod1Mask
92 static Shortcut shortcuts
[] = {
93 /* modifier key function argument */
94 { MODKEY
|ShiftMask
, XK_Prior
, xzoom
, {.i
= +1} },
95 { MODKEY
|ShiftMask
, XK_Next
, xzoom
, {.i
= -1} },