summaryrefslogtreecommitdiff
path: root/st/unpatched/st-universcroll-example-0.8.4.diff
blob: 76ff70d33144efac01a51a29f0dcfa917188734b (plain)
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
From 59d2c9b65f90f78507b88d773323aab31194b7b4 Mon Sep 17 00:00:00 2001
From: Dennis Lee <dennis@dennislee.xyz>
Date: Mon, 29 Jun 2020 21:33:08 -0700
Subject: [PATCH] universcroll: sane default configuration

- Set scroll program = "scroll"
- Mouse wheel scroll only with NO_MOD.
- Mouse wheel zoom with ShiftMask/ANY_MOD.
---
 config.def.h | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/config.def.h b/config.def.h
index a52c0a2..74fd64c 100644
--- a/config.def.h
+++ b/config.def.h
@@ -19,7 +19,7 @@ static int borderpx = 2;
 static char *shell = "/bin/sh";
 char *utmp = NULL;
 /* scroll program: to enable use a string like "scroll" */
-char *scroll = NULL;
+char *scroll = "scroll";
 char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
 
 /* identification sequence returned in DA and DECID */
@@ -175,10 +175,14 @@ static uint forcemousemod = ShiftMask;
 static MouseShortcut mshortcuts[] = {
 	/* mask                 button   function        argument      release alt */
 	{ XK_ANY_MOD,           Button2, selpaste,       {.i = 0},           1 },
-	{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\033[5;2~"}, 0, -1 },
-	{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },
-	{ XK_ANY_MOD,           Button5, ttysend,        {.s = "\033[6;2~"}, 0, -1 },
-	{ XK_ANY_MOD,           Button5, ttysend,        {.s = "\005"} },
+	{ ShiftMask,            Button4, zoom,           {.f =  +1} },
+	{ ShiftMask,            Button5, zoom,           {.f =  -1} },
+	{ XK_NO_MOD,            Button4, ttysend,        {.s = "\033[5;2~"}, 0, -1 },
+	{ XK_NO_MOD,            Button4, ttysend,        {.s = "\031"} },
+	{ XK_NO_MOD,            Button5, ttysend,        {.s = "\033[6;2~"}, 0, -1 },
+	{ XK_NO_MOD,            Button5, ttysend,        {.s = "\005"} },
+	{ XK_ANY_MOD,           Button4, zoom,           {.f =  +1} },
+	{ XK_ANY_MOD,           Button5, zoom,           {.f =  -1} },
 };
 
 /* Internal keyboard shortcuts. */
-- 
2.27.0