I love WezTerm! In the author's spirit of obsessive tweaking, here's a completely inconsequential configuration change I made.
By default, WezTerm doesn't have a scrollbar, but you can easily enable it with:
config.enable_scroll_bar = true
But now you always have a scrollbar, just a big line on the side when there's no scrollback or you're in alternate screen mode. Horrible! So, here's an event handler that will automatically hide the scrollbar when not needed, giving it the same behavior as scrollbars in modern applications: -- Hide the scrollbar when there is no scrollback or alternate screen is active
wezterm.on("update-status", function(window, pane)
local overrides = window:get_config_overrides() or {}
local dimensions = pane:get_dimensions()
overrides.enable_scroll_bar = dimensions.scrollback_rows > dimensions.viewport_rows and not pane:is_alt_screen_active()
window:set_config_overrides(overrides)
end)
And that kinda sums up the development philosophy of WezTerm. It has basically all the building blocks you'd ever need with nice APIs. It's set up quite usably by default, but anything that's missing you can probably implement yourself.
That's pretty nice! Thanks for the tip, I applied it to my config as well.
Thanks, I've copied that into my config!
Now I want more scrollbars. One per pane please. Doesn't seem to be an option.