Enable classic scrollbars (add steppers and disable overlay)

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Post Reply
Message
Author
User avatar
rich
Posts: 180
Joined: Sat Mar 31, 2018 6:39 pm

Enable classic scrollbars (add steppers and disable overlay)

#1 Post by rich »

edit - Woops, should have searched before posting! A similar guide has already been posted here: viewtopic.php?f=95&t=44128

edit -June 7, 2018 - Upon further inspection the QT theme seems to have steppers (invisible or not) regardless of gtk theme options

Do you prefer classic scrollbars with buttons to click at the top and bottom? The kind that doesn't hide when you're not looking? I do, especially because the trackpad on my laptop makes it hard to click and drag. Here we'll see how to add the buttons at the top and bottom of the scrollbar and how to make the scrollbars stop disappearing when you move your mouse.

1.) Add scrollbar steppers
MX, for the most part, uses three different toolkits - gtk2, gtk3, and qt5. qt5, by default, will mimic gtk2, so we only need to talk to gtk2 and gtk3 here to get our scrollbar "steppers" (buttons). For gtk2, we can add this file:

~/.gtkrc-2.0

Code: Select all

style "scrollbar-steppers"
{
    GtkRange::stepper-size      = 13
    GtkScrollbar::stepper-size  = 13
    GtkScrollbar::has-backward-stepper      = 1  
    GtkScrollbar::has-forward-stepper       = 1
}
class "GtkScrollbar" style "scrollbar-steppers"
This will make it so whatever our theme is, gtk2 and qt5 will try to show scrollbar steppers. For gtk3, we can add this file:

~/.config/gtk-3.0/gtk.css

Code: Select all

.scrollbar,
scrollbar {
    -GtkScrollbar-has-backward-stepper: 1;
    -GtkScrollbar-has-forward-stepper: 1;
}
This will make it so whatever our theme is, gtk3 will try to show scrollbar steppers. But in gtk3 applications like Catfish or Transmission, why does the scrollbar keep trying to hide when you move the mouse away? This is because of the "gtk overlay scrolling" setting.

2.) Disable scrollbar overlay
To disable this behavior we need to set an environmental variable. This can be done in a number of ways, for consistency here I've decided to do so with a little config file in Xsession.d. As root, add the following file:

/etc/X11/Xsession.d/97scrollbars

Code: Select all

export GTK_OVERLAY_SCROLLING=0
Log out and back in and you're golden!

You may notice qt applications like Featherpad won't actually show the steppers under certain themes such as the default Greybird-mx17, whereas in others like Numix they will. They work either way by clicking where the button is or should be.

Default -
default.png
Default theme with steppers and disabled scrollbar overlay -
mod1.png
Numix theme with steppers and disabled scrollbar overlay -
mod2.png
You do not have the required permissions to view the files attached to this post.

User avatar
thomasl
Posts: 414
Joined: Sun Feb 04, 2018 10:26 am

Re: Enable classic scrollbars (add steppers and disable overlay)

#2 Post by thomasl »

@rich: Thanks for that from a Windows exilé. I could not find a theme that I liked and that had classic scrollbars... this helped!
Frugal installs on Lenovo ThinkPad L14 Ryzen 5 4650U/24GB * HP Pavilion Ryzen 3 3300U/16GB * Toshiba R950 i5-3340M/12GB
I have a reservation... What do you mean it's not in the COMPUTER!

Post Reply

Return to “Tips & Tricks by users”