Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrollback mouse altscreen speed #83

Open
brxxlstxrs opened this issue Sep 12, 2022 · 4 comments
Open

Scrollback mouse altscreen speed #83

brxxlstxrs opened this issue Sep 12, 2022 · 4 comments

Comments

@brxxlstxrs
Copy link

brxxlstxrs commented Sep 12, 2022

How make scrolling with mouse wheel faster, what I need to change for it?
(I set its in my patches.h:

#define SCROLLBACK_PATCH 1
#define SCROLLBACK_MOUSE_ALTSCREEN_PATCH 1

)

@bakkeby
Copy link
Owner

bakkeby commented Sep 12, 2022

The mouse shortcuts / button bindings pass in an integer (.i) value of 1 to to the kscrollup and kscrolldown functions indicating that when using the mouse wheel the terminal should scroll one line up and one line down respectively.

st-flexipatch/config.def.h

Lines 358 to 360 in 34cd955

#if SCROLLBACK_MOUSE_ALTSCREEN_PATCH
{ XK_NO_MOD, Button4, kscrollup, {.i = 1}, 0, S_PRI },
{ XK_NO_MOD, Button5, kscrolldown, {.i = 1}, 0, S_PRI },

If you change these to, e.g. {.i = 5}, then it will scroll five lines for every trigger of the scroll wheel.

@brxxlstxrs
Copy link
Author

Oh huge thanks ❤️, also tell me, is it the right practice to delete the patches.h/config.h file before each build, changing only the def files?

@bakkeby
Copy link
Owner

bakkeby commented Sep 12, 2022

The default patches and config files are what comes with the program. When you run make the first time then those will be copied to (your personal) patches.h and config.h files that you can customise to your liking.

That is the intention anyway. If you for some reason finds deleting those files and only changing the default files works better for you then there is by no means anything stopping you from doing it.

Another way to look at it is that if the intention was to exit the default configuration files and always delete the files before compiling then the underlying code files would just source the default configuration directly and not copy them beforehand.

A lot of people, including youtube content creators, will recommend deleting the config.h before compiling and exit the default config instead. This has to do with a misunderstanding of the relation between the default and the personal configuration file, and becoming confused about why patches only change the default configuration and not your personal one.

@brxxlstxrs
Copy link
Author

brxxlstxrs commented Sep 13, 2022

Thank you again, such tips help newbies like me, flexipatch helped me consider the option of switching to dwm, using st and etc. (other suckless software), so on. YT content creators not always right with their ways of presenting information, but still they simplify a little sometimes
(btw use Arch, Gentoo will never be compiled)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants