sites

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

commit 0cbd3b8dc12c3c3a0ec855c3533a22bcae43cdb0
parent 0df852efccf981bd95dfcf78117713cac7178484
Author: Dennis Lee <dennis@dennislee.xyz>
Date:   Tue, 30 Jun 2020 13:48:09 -0700

[st][PATCH] universcroll: add docs/page formatting

Diffstat:
Mst.suckless.org/patches/universcroll/index.md | 38++++++++++++++++++++++++++++++++------
1 file changed, 32 insertions(+), 6 deletions(-)

diff --git a/st.suckless.org/patches/universcroll/index.md b/st.suckless.org/patches/universcroll/index.md @@ -4,10 +4,10 @@ universcroll Description ----------- With *scroll*(1) and default binds (as of 0.8.4), how to scroll? -- Inside alt screen? Mouse[4,5] to scroll [Up,Down]. :) -- Outside alt screen? Shift+Mouse[4,5] to scroll [Up,Down]. :( +- Inside alt screen? Mouse{4,5} to scroll {Up,Down}. :) +- Outside alt screen? Shift+Mouse{4,5} to scroll {Up,Down}. :( -With universcroll patch, always use Mouse[4,5] to scroll [Up,Down]. +With universcroll patch, always use Mouse{4,5} to scroll {Up,Down}. Doesn't matter alt screen or not. No more `^Y^Y^Y^Y^Y^E^E^E^E^E`! `universcroll-example` on top of `universcroll` makes some extra @@ -23,10 +23,36 @@ Download Notes ----- -`universcroll` was made possible by -[scrollback-mouse-altscreen](https://st.suckless.org/patches/scrollback/). -All alt screen detection code is from that patch. +In the provided config, both Mouse{4,5} and Shift+{Page_Up,Page_Down} +emit {`\033[5;2~`,`\033[6;2~`}. In default *scroll*(1) config, those +sequences scroll {Up,Down} by full page each time (like TTY). This is +maybe not desired behavior. + +You can change *st*(1) config to use different sequences and define how +*scroll*(1) responds to sequences in *scroll(1)*'s config. + +In *st*(1) config, some keys are defined to send certain sequences in +`key[]`. Inside `mshortcuts[]` and `shortcuts[]`, use function `ttysend` +with argument `{.s = ""}` to send sequences. + +My settings: + //st + { XK_NO_MOD, Button4, ttysend, {.s = "\033[1;3A"}, 0, -1 }, + { XK_NO_MOD, Button5, ttysend, {.s = "\033[1;3B"}, 0, -1 }, + //scroll + {"\033[1;3A", SCROLL_UP, 3}, /* Mod1+Up */ + {"\033[1;3B", SCROLL_DOWN, 3}, /* Mod1+Down */ + +Bugs +---- +Non-readline shell (zsh, fish) can have prompt issues with *scroll*(1) +(Scrolling down by line after scrolling up, among other things). More +problems with non-PS1 prompt. Author ------ - [Dennis Lee](mailto:dennis@dennislee.xyz) + +`universcroll` was made possible by +[scrollback-mouse-altscreen](../scrollback). All alt screen detection +code is from that patch.