summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authoryusufaktepe <yusuf@yusufaktepe.com>2019-05-08 04:05:57 +0300
committeryusufaktepe <yusuf@yusufaktepe.com>2019-05-08 04:05:57 +0300
commit3cd91894ec91a0de7aa71d62949ba3381e600afd (patch)
treeb20ec7e05d5970bdfc7c35bfbf9c89b7541b011b /config.h
parent35506b44adf9176062f2cc51bcfd54ac79246744 (diff)
Updated st to 0.8.2
Updated to latest git (20190414.f1546cf) & updated patches. Changes: . Upstream fixes. . Alpha: Opacity value is now typed in float (0-1). Also "-A" cmd option added as alternative opacity changing method. . Clipboard: middle click pastes from clipboard. . Organized shortcuts.
Diffstat (limited to 'config.h')
-rw-r--r--config.h53
1 files changed, 28 insertions, 25 deletions
diff --git a/config.h b/config.h
index 12f0316..be9a952 100644
--- a/config.h
+++ b/config.h
@@ -30,9 +30,9 @@ static float chscale = 1.0;
/*
* word delimiter string
*
- * More advanced example: " `'\"()[]{}"
+ * More advanced example: L" `'\"()[]{}"
*/
-char *worddelimiters = " ";
+wchar_t *worddelimiters = L" ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
@@ -83,8 +83,9 @@ char *termname = "st-256color";
unsigned int tabspaces = 8;
/* bg opacity */
-unsigned int alpha = 0xed;
+float alpha = 0.92;
+/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
"#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
"#cc241d",
@@ -170,6 +171,7 @@ ResourcePref resources[] = {
{ "color15", STRING, &colorname[15] },
{ "background", STRING, &colorname[256] },
{ "foreground", STRING, &colorname[257] },
+ { "cursorColor", STRING, &colorname[258] },
{ "termname", STRING, &termname },
{ "shell", STRING, &shell },
{ "xfps", INTEGER, &xfps },
@@ -177,10 +179,10 @@ ResourcePref resources[] = {
{ "blinktimeout", INTEGER, &blinktimeout },
{ "bellvolume", INTEGER, &bellvolume },
{ "tabspaces", INTEGER, &tabspaces },
+ { "borderpx", INTEGER, &borderpx },
{ "cwscale", FLOAT, &cwscale },
{ "chscale", FLOAT, &chscale },
- { "alpha", INTEGER, &alpha },
- { "border", INTEGER, &borderpx },
+ { "alpha", FLOAT, &alpha },
};
/*
@@ -195,6 +197,7 @@ static MouseShortcut mshortcuts[] = {
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
+#define TERMMOD (Mod1Mask|ShiftMask)
MouseKey mkeys[] = {
/* button mask function argument */
@@ -202,8 +205,8 @@ MouseKey mkeys[] = {
{ Button5, ShiftMask, kscrolldown, {.i = 1} },
{ Button4, MODKEY, kscrollup, {.i = 1} },
{ Button5, MODKEY, kscrolldown, {.i = 1} },
- { Button4, MODKEY|ShiftMask, zoom, {.f = +1} },
- { Button5, MODKEY|ShiftMask, zoom, {.f = -1} },
+ { Button4, TERMMOD, zoom, {.f = +1} },
+ { Button5, TERMMOD, zoom, {.f = -1} },
};
static char *openurlcmd[] = { "/bin/sh", "-c",
@@ -220,33 +223,33 @@ static Shortcut shortcuts[] = {
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
- { MODKEY|ShiftMask, XK_Prior, zoom, {.f = +1} },
- { MODKEY|ShiftMask, XK_Next, zoom, {.f = -1} },
- { MODKEY, XK_Home, zoomreset, {.f = 0} },
+ { TERMMOD, XK_Prior, zoom, {.f = +1} },
+ { TERMMOD, XK_Next, zoom, {.f = -1} },
+ { MODKEY, XK_Home, zoomreset, {.f = 0} },
{ ShiftMask, XK_Insert, clippaste, {.i = 0} },
{ MODKEY, XK_c, clipcopy, {.i = 0} },
{ MODKEY, XK_v, clippaste, {.i = 0} },
{ MODKEY, XK_p, selpaste, {.i = 0} },
- { MODKEY, XK_Num_Lock, numlock, {.i = 0} },
+ { MODKEY, XK_Num_Lock, numlock, {.i = 0} },
{ MODKEY, XK_Control_L, iso14755, {.i = 0} },
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
{ MODKEY, XK_Page_Up, kscrollup, {.i = -1} },
{ MODKEY, XK_Page_Down, kscrolldown, {.i = -1} },
- { MODKEY, XK_k, kscrollup, {.i = 1} },
- { MODKEY, XK_j, kscrolldown, {.i = 1} },
- { MODKEY, XK_Up, kscrollup, {.i = 1} },
- { MODKEY, XK_Down, kscrolldown, {.i = 1} },
- { MODKEY, XK_u, kscrollup, {.i = -1} },
- { MODKEY, XK_d, kscrolldown, {.i = -1} },
- { MODKEY|ShiftMask, XK_Up, zoom, {.f = +1} },
- { MODKEY|ShiftMask, XK_Down, zoom, {.f = -1} },
- { MODKEY|ShiftMask, XK_K, zoom, {.f = +1} },
- { MODKEY|ShiftMask, XK_J, zoom, {.f = -1} },
- { MODKEY|ShiftMask, XK_U, zoom, {.f = +2} },
- { MODKEY|ShiftMask, XK_D, zoom, {.f = -2} },
- { MODKEY, XK_l, externalpipe, { .v = openurlcmd } },
- { MODKEY, XK_y, externalpipe, { .v = copyurlcmd } },
+ { MODKEY, XK_k, kscrollup, {.i = 1} },
+ { MODKEY, XK_j, kscrolldown, {.i = 1} },
+ { MODKEY, XK_Up, kscrollup, {.i = 1} },
+ { MODKEY, XK_Down, kscrolldown, {.i = 1} },
+ { MODKEY, XK_u, kscrollup, {.i = -1} },
+ { MODKEY, XK_d, kscrolldown, {.i = -1} },
+ { TERMMOD, XK_Up, zoom, {.f = +1} },
+ { TERMMOD, XK_Down, zoom, {.f = -1} },
+ { TERMMOD, XK_K, zoom, {.f = +1} },
+ { TERMMOD, XK_J, zoom, {.f = -1} },
+ { TERMMOD, XK_U, zoom, {.f = +2} },
+ { TERMMOD, XK_D, zoom, {.f = -2} },
+ { MODKEY, XK_l, externalpipe, {.v = openurlcmd } },
+ { MODKEY, XK_y, externalpipe, {.v = copyurlcmd } },
};
/*