From 1c9fbd0059d93b6dd57837020f3ef951a729acbb Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 28 Apr 2026 17:51:33 +0200 Subject: scrollbar + scroll on mousescroll --- config.def.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index d7e1fe5..3daa8fc 100644 --- a/config.def.h +++ b/config.def.h @@ -8,6 +8,16 @@ static char *font = "Liberation Mono:pixelsize=14:antialias=true:autohint=true"; // slightly bigger font static int borderpx = 2; +/* + * scrollbar options + * scrollbarwidth: width of the scrollbar in pixels (0 to disable) + * scrollbarcolor: color of the scrollbar thumb + * scrollbarbg: color of the scrollbar background (use -1 for none) + */ +static int scrollbarwidth = 3; +static unsigned int scrollbarcolor = 8; +static int scrollbarbg = 257; + /* * What program is execed by st depends of these precedence rules: * 1: program passed with -e @@ -203,10 +213,8 @@ static uint forcemousemod = ShiftMask; static MouseShortcut mshortcuts[] = { /* mask button function argument release */ { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, - { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, - { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, - { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, - { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, + { XK_ANY_MOD, Button4, kscrollup, {.i = 1} }, + { XK_ANY_MOD, Button5, kscrolldown, {.i = 1} }, }; /* Internal keyboard shortcuts. */ -- cgit v1.2.3