summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorrjl6789 <rob.livesey@gmail.com>2019-05-09 07:37:21 +0100
committerrjl6789 <rob.livesey@gmail.com>2019-05-09 07:37:21 +0100
commit9aa7f38187cf6ff15ec1a11fc83e8d43e1b1a6d5 (patch)
tree79889ddefc19e3ea2fc1c2374d9a54727e156435 /config.h
parente99aa29eefb43c1ea9f63c13d35bf45f7a90171b (diff)
parentda13ef12463d1870caed94584db464d68c6b3182 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'config.h')
-rw-r--r--config.h60
1 files changed, 36 insertions, 24 deletions
diff --git a/config.h b/config.h
index b622536..d691716 100644
--- a/config.h
+++ b/config.h
@@ -31,9 +31,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;
@@ -84,8 +84,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",
@@ -171,6 +172,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 },
@@ -178,9 +180,10 @@ ResourcePref resources[] = {
{ "blinktimeout", INTEGER, &blinktimeout },
{ "bellvolume", INTEGER, &bellvolume },
{ "tabspaces", INTEGER, &tabspaces },
+ { "borderpx", INTEGER, &borderpx },
{ "cwscale", FLOAT, &cwscale },
{ "chscale", FLOAT, &chscale },
- { "alpha", INTEGER, &alpha },
+ { "alpha", FLOAT, &alpha },
};
/*
@@ -195,6 +198,7 @@ static MouseShortcut mshortcuts[] = {
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
+#define TERMMOD (Mod1Mask|ShiftMask)
MouseKey mkeys[] = {
/* button mask function argument */
@@ -202,46 +206,54 @@ 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",
- "grep -aEo '(http|https)://[a-zA-Z0-9./?=_-]*' | uniq | dmenu -l 10 | xargs -r xdg-open",
+ "sed 's/.*│//g' | tr -d '\n' | grep -aEo '((http|https)://|www\\.)[a-zA-Z0-9./&?=_-]*' | uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -p 'Follow which url?' -l 10 | xargs -r xdg-open",
"externalpipe", NULL };
+static char *copyurlcmd[] = { "/bin/sh", "-c",
+ "sed 's/.*│//g' | tr -d '\n' | grep -aEo '((http|https)://|www\\.)[a-zA-Z0-9./&?=_-]*' | uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard",
+ "externalpipe", NULL };
+
+static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
+
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ 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_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 } },
+ { MODKEY, XK_o, externalpipe, {.v = copyoutput } },
};
/*