[wiki] [sites] [st] [patch] Exposed variable to easily change mouse scroll increment. || Jacob Louis Prosser
commit 2a489e0f81a2d342bf7d5d4d8815fa0ad2cdc304
Author: Jacob Louis Prosser <geriatricjacob_AT_cumallover.me>
Date: Sun Nov 10 15:21:54 2019 +1000
[st] [patch] Exposed variable to easily change mouse scroll increment.
diff --git a/st.suckless.org/patches/scrollback/index.md b/st.suckless.org/patches/scrollback/index.md
index 242d79ec..d8053f3b 100644
--- a/st.suckless.org/patches/scrollback/index.md
+++ b/st.suckless.org/patches/scrollback/index.md
_AT_@ -32,6 +32,10 @@ modifier for scrolling is not needed anymore. **Note: patches before
* [st-scrollback-mouse-altscreen-20190131-e23acb9.diff](st-scrollback-mouse-altscreen-20190131-e23acb9.diff)
* [st-scrollback-mouse-altscreen-20191024-a2c479c.diff](st-scrollback-mouse-altscreen-20191024-a2c479c.diff)
+Apply the following patch on top of the first two to allow changing how fast the mouse scrolls.
+
+* [st-scrollback-mouse-increment-0.8.2.diff](st-scrollback-mouse-increment-0.8.2.diff)
+
Notes
-----
* Patches modify config.def.h, you need to add mkeys to your own config.h
_AT_@ -57,3 +61,4 @@ Authors
variable for config)
* Kamil Kleban - <funmaker95_AT_gmail.com> (fix altscreen detection)
* Avi Halachmi - <avihpit_AT_yahoo.com> (mouse + altscreen rewrite after `a2c479c`)
+* Jacob Prosser - <geriatricjacob_AT_cumallover.me>
diff --git a/st.suckless.org/patches/scrollback/st-scrollback-mouse-increment-0.8.2.diff b/st.suckless.org/patches/scrollback/st-scrollback-mouse-increment-0.8.2.diff
new file mode 100644
index 00000000..9556a9d0
--- /dev/null
+++ b/st.suckless.org/patches/scrollback/st-scrollback-mouse-increment-0.8.2.diff
_AT_@ -0,0 +1,34 @@
+From 63e717e51dcd2f59c7a3aa75b659926aa92e08f3 Mon Sep 17 00:00:00 2001
+From: Jacob Louis Prosser <geriatricjacob_AT_cumallover.me>
+Date: Mon, 5 Aug 2019 18:20:25 +1000
+Subject: [st] [patch] Exposed variable to easily change mouse scroll increment.
+
+---
+ config.def.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/config.def.h b/config.def.h
+index ad20c4c..47e4b66 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -154,6 +154,7 @@ static unsigned int defaultattr = 11;
+ * Internal mouse shortcuts.
+ * Beware that overloading Button1 will disable the selection.
+ */
++const unsigned int mousescrollincrement = 1;
+ static MouseShortcut mshortcuts[] = {
+ /* button mask string */
+ { Button4, XK_NO_MOD, "" },
+_AT_@ -162,8 +163,8 @@ static MouseShortcut mshortcuts[] = {
+
+ MouseKey mkeys[] = {
+ /* button mask function argument */
+- { Button4, ShiftMask, kscrollup, {.i = 1} },
+- { Button5, ShiftMask, kscrolldown, {.i = 1} },
++ { Button4, ShiftMask, kscrollup, {.i = mousescrollincrement} },
++ { Button5, ShiftMask, kscrolldown, {.i = mousescrollincrement} },
+ };
+
+ /* Internal keyboard shortcuts. */
+--
+2.22.0
Received on Sun Nov 10 2019 - 06:22:19 CET
This archive was generated by hypermail 2.3.0
: Sun Nov 10 2019 - 06:24:30 CET