diff --git a/.SRCINFO b/.SRCINFO index c524ed0..c34f7ce 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -11,15 +11,15 @@ pkgbase = st source = https://dl.suckless.org/st/st-0.8.3.tar.gz source = config.h source = https://st.suckless.org/patches/nordtheme/st-nordtheme-0.8.2.diff - source = https://st.suckless.org/patches/scrollback/st-scrollback-20190331-21367a0.diff - source = https://st.suckless.org/patches/scrollback/st-scrollback-mouse-0.8.diff + source = https://st.suckless.org/patches/scrollback/st-scrollback-20200419-72e3f6c.diff + source = https://st.suckless.org/patches/scrollback/st-scrollback-mouse-20191024-a2c479c.diff source = terminfo.patch source = README.terminfo.rst sha256sums = 939ae3da237e7c9489694853c205c7cbd5f2a2f0c17fe41a07477f1df8e28552 - sha256sums = 8fc9a87a5bac9e4eebd4f7683e009aa34d74e9e0cbd0f2cc5e60f3fd01d40f3f + sha256sums = e142793fc958f724e8e5867688d53f83c48cab7a5fe8a695568ccb2c79e23047 sha256sums = 01de8a6d0d855c31496c7963e78edb7565a81b60dcb9e9f00dd3eab1f43b526b - sha256sums = f974bc0e11bda909a6d6d529d28abde4c97e651107b6a6047f2fab8837010b43 - sha256sums = 3fb38940cc3bad3f9cd1e2a0796ebd0e48950a07860ecf8523a5afd0cd1b5a44 + sha256sums = 1e41fe17a5ef5a8194eea07422b49d815e2c2bb4d58d84771f793be423005310 + sha256sums = 319458d980195d18fa0f81a6898d58f8d046c5ff982ab872d741f54bb60e267d sha256sums = f9deea445a5c6203a0e8e699f3c3b55e27275f17fb408562c4dd5d649edeea23 sha256sums = 0ebcbba881832adf9c98ce9fe7667c851d3cc3345077cb8ebe32702698665be2 diff --git a/PKGBUILD b/PKGBUILD index 7712603..1d67232 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -14,15 +14,15 @@ url=https://st.suckless.org source=(https://dl.suckless.org/$pkgname/$pkgname-$pkgver.tar.gz config.h https://st.suckless.org/patches/nordtheme/st-nordtheme-0.8.2.diff - https://st.suckless.org/patches/scrollback/st-scrollback-20190331-21367a0.diff - https://st.suckless.org/patches/scrollback/st-scrollback-mouse-0.8.diff + https://st.suckless.org/patches/scrollback/st-scrollback-20200419-72e3f6c.diff + https://st.suckless.org/patches/scrollback/st-scrollback-mouse-20191024-a2c479c.diff terminfo.patch README.terminfo.rst) sha256sums=('939ae3da237e7c9489694853c205c7cbd5f2a2f0c17fe41a07477f1df8e28552' - '8fc9a87a5bac9e4eebd4f7683e009aa34d74e9e0cbd0f2cc5e60f3fd01d40f3f' + 'e142793fc958f724e8e5867688d53f83c48cab7a5fe8a695568ccb2c79e23047' '01de8a6d0d855c31496c7963e78edb7565a81b60dcb9e9f00dd3eab1f43b526b' - 'f974bc0e11bda909a6d6d529d28abde4c97e651107b6a6047f2fab8837010b43' - '3fb38940cc3bad3f9cd1e2a0796ebd0e48950a07860ecf8523a5afd0cd1b5a44' + '1e41fe17a5ef5a8194eea07422b49d815e2c2bb4d58d84771f793be423005310' + '319458d980195d18fa0f81a6898d58f8d046c5ff982ab872d741f54bb60e267d' 'f9deea445a5c6203a0e8e699f3c3b55e27275f17fb408562c4dd5d649edeea23' '0ebcbba881832adf9c98ce9fe7667c851d3cc3345077cb8ebe32702698665be2') _sourcedir=$pkgname-$pkgver @@ -65,8 +65,8 @@ prepare() { # apply patches cd $srcdir/$pkgname-$pkgver/ patch -p1 config.h < $srcdir/st-nordtheme-0.8.2.diff - patch -p1 -F3 < $srcdir/st-scrollback-20190331-21367a0.diff - patch -p1 -F3 < $srcdir/st-scrollback-mouse-0.8.diff + patch -p1 < $srcdir/st-scrollback-20200419-72e3f6c.diff + patch -p1 < $srcdir/st-scrollback-mouse-20191024-a2c479c.diff } build() { diff --git a/config.h b/config.h index 4fab6e8..920e310 100644 --- a/config.h +++ b/config.h @@ -11,13 +11,15 @@ static int borderpx = 2; /* * What program is execed by st depends of these precedence rules: * 1: program passed with -e - * 2: utmp option + * 2: scroll and/or utmp * 3: SHELL environment variable * 4: value of shell in /etc/passwd * 5: value of shell in config.h */ static char *shell = "/bin/sh"; char *utmp = NULL; +/* scroll program: to enable use a string like "scroll" */ +char *scroll = NULL; char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; /* identification sequence returned in DA and DECID */ @@ -30,9 +32,9 @@ static float chscale = 1.0; /* * word delimiter string * - * More advanced example: " `'\"()[]{}" + * More advanced example: L" `'\"()[]{}" */ -char *worddelimiters = " "; +wchar_t *worddelimiters = L" "; /* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; @@ -151,18 +153,24 @@ static unsigned int mousebg = 0; static unsigned int defaultattr = 11; /* + * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). + * Note that if you want to use ShiftMask with selmasks, set this to an other + * modifier, set to 0 to not use it. + */ +static uint forcemousemod = ShiftMask; + +/* + * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* button mask string */ - { Button4, XK_NO_MOD, "\031" }, - { Button5, XK_NO_MOD, "\005" }, -}; - -MouseKey mkeys[] = { - { Button4, ShiftMask, kscrollup, {.i = 1} }, - { Button5, ShiftMask, kscrolldown, {.i = 1} }, + /* mask button function argument release */ + { ShiftMask, Button4, kscrollup, {.i = 1} }, + { ShiftMask, Button5, kscrolldown, {.i = 1} }, + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, }; /* Internal keyboard shortcuts. */ @@ -183,8 +191,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} }, + { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} }, + { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} }, }; /* @@ -202,10 +210,6 @@ static Shortcut shortcuts[] = { * * 0: no value * * > 0: cursor application mode enabled * * < 0: cursor application mode disabled - * crlf value - * * 0: no value - * * > 0: crlf mode is enabled - * * < 0: crlf mode is disabled * * Be careful with the order of the definitions because st searches in * this table sequentially, so any XK_ANY_MOD must be in the last @@ -224,13 +228,6 @@ static KeySym mappedkeys[] = { -1 }; */ static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; -/* - * Override mouse-select while mask is active (when MODE_MOUSE is set). - * Note that if you want to use ShiftMask with selmasks, set this to an other - * modifier, set to 0 to not use it. - */ -static uint forceselmod = ShiftMask; - /* * This is the huge key array which defines all compatibility to the Linux * world. Please decide about changes wisely.