sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

st-scrollback-mouse-increment-0.8.2.diff (1303B)


      1 From 63e717e51dcd2f59c7a3aa75b659926aa92e08f3 Mon Sep 17 00:00:00 2001
      2 From: Jacob Louis Prosser <geriatricjacob@cumallover.me>
      3 Date: Mon, 5 Aug 2019 18:20:25 +1000
      4 Subject: [st] [patch] Exposed variable to easily change mouse scroll increment.
      5 
      6 ---
      7  config.def.h | 5 +++--
      8  1 file changed, 3 insertions(+), 2 deletions(-)
      9 
     10 diff --git a/config.def.h b/config.def.h
     11 index ad20c4c..47e4b66 100644
     12 --- a/config.def.h
     13 +++ b/config.def.h
     14 @@ -154,6 +154,7 @@ static unsigned int defaultattr = 11;
     15   * Internal mouse shortcuts.
     16   * Beware that overloading Button1 will disable the selection.
     17   */
     18 +const unsigned int mousescrollincrement = 1;
     19  static MouseShortcut mshortcuts[] = {
     20  	/* button               mask            string */
     21  	{ Button4,              XK_NO_MOD,      "\031" },
     22 @@ -162,8 +163,8 @@ static MouseShortcut mshortcuts[] = {
     23 
     24  MouseKey mkeys[] = {
     25  	/* button               mask            function        argument */
     26 -	{ Button4,              ShiftMask,      kscrollup,      {.i =  1} },
     27 -	{ Button5,              ShiftMask,      kscrolldown,    {.i =  1} },
     28 +	{ Button4,              ShiftMask,      kscrollup,      {.i =  mousescrollincrement} },
     29 +	{ Button5,              ShiftMask,      kscrolldown,    {.i =  mousescrollincrement} },
     30  };
     31 
     32  /* Internal keyboard shortcuts. */
     33 --
     34 2.22.0