st-universcroll-example-0.8.4.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       st-universcroll-example-0.8.4.diff (2011B)
       ---
            1 From 59d2c9b65f90f78507b88d773323aab31194b7b4 Mon Sep 17 00:00:00 2001
            2 From: Dennis Lee <dennis@dennislee.xyz>
            3 Date: Mon, 29 Jun 2020 21:33:08 -0700
            4 Subject: [PATCH] universcroll: sane default configuration
            5 
            6 - Set scroll program = "scroll"
            7 - Mouse wheel scroll only with NO_MOD.
            8 - Mouse wheel zoom with ShiftMask/ANY_MOD.
            9 ---
           10  config.def.h | 14 +++++++++-----
           11  1 file changed, 9 insertions(+), 5 deletions(-)
           12 
           13 diff --git a/config.def.h b/config.def.h
           14 index a52c0a2..74fd64c 100644
           15 --- a/config.def.h
           16 +++ b/config.def.h
           17 @@ -19,7 +19,7 @@ static int borderpx = 2;
           18  static char *shell = "/bin/sh";
           19  char *utmp = NULL;
           20  /* scroll program: to enable use a string like "scroll" */
           21 -char *scroll = NULL;
           22 +char *scroll = "scroll";
           23  char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
           24  
           25  /* identification sequence returned in DA and DECID */
           26 @@ -175,10 +175,14 @@ static uint forcemousemod = ShiftMask;
           27  static MouseShortcut mshortcuts[] = {
           28          /* mask                 button   function        argument      release alt */
           29          { XK_ANY_MOD,           Button2, selpaste,       {.i = 0},           1 },
           30 -        { XK_ANY_MOD,           Button4, ttysend,        {.s = "\033[5;2~"}, 0, -1 },
           31 -        { XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },
           32 -        { XK_ANY_MOD,           Button5, ttysend,        {.s = "\033[6;2~"}, 0, -1 },
           33 -        { XK_ANY_MOD,           Button5, ttysend,        {.s = "\005"} },
           34 +        { ShiftMask,            Button4, zoom,           {.f =  +1} },
           35 +        { ShiftMask,            Button5, zoom,           {.f =  -1} },
           36 +        { XK_NO_MOD,            Button4, ttysend,        {.s = "\033[5;2~"}, 0, -1 },
           37 +        { XK_NO_MOD,            Button4, ttysend,        {.s = "\031"} },
           38 +        { XK_NO_MOD,            Button5, ttysend,        {.s = "\033[6;2~"}, 0, -1 },
           39 +        { XK_NO_MOD,            Button5, ttysend,        {.s = "\005"} },
           40 +        { XK_ANY_MOD,           Button4, zoom,           {.f =  +1} },
           41 +        { XK_ANY_MOD,           Button5, zoom,           {.f =  -1} },
           42  };
           43  
           44  /* Internal keyboard shortcuts. */
           45 -- 
           46 2.27.0
           47