Added mouse scroll

This commit is contained in:
Linux User
2022-08-16 22:29:24 +00:00
parent 024630e378
commit 9726db9903
8 changed files with 282 additions and 138 deletions

View File

@@ -6,12 +6,14 @@
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Ubuntu Mono:pixelsize=12:antialias=true:autohint=true";
#define FONTSIZE "14"
static char *font = "Ubuntu Mono:pixelsize="FONTSIZE":antialias=true:autohint=true";
static char *font2[] = {
"Ubuntu Mono:pixelsize=12:antialias=true:autohint=true",
"Font Awesome 6 Free Solid:pixelsize=12:antialias=true:autohint=true"
"Ubuntu Mono:pixelsize="FONTSIZE":antialias=true:autohint=true",
"Font Awesome 6 Free Solid:pixelsize="FONTSIZE":antialias=true:autohint=true"
};
static int borderpx = 2;
static int borderpx = 10;
/*
* What program is execed by st depends of these precedence rules:
@@ -181,6 +183,8 @@ static uint forcemousemod = ShiftMask;
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ XK_ANY_MOD, Button4, kscrollup, {.i = 1} },
{ XK_ANY_MOD, Button5, kscrolldown, {.i = 1} },
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
@@ -206,6 +210,8 @@ static Shortcut shortcuts[] = {
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
};
/*