#!/bin/bash # Script to fix crappy GTK+3 (and GTK+2) scrollbars mkdir -p ~/.config/gtk-2.0 mkdir -p ~/.config/gtk-3.0 mkdir -p ~/.config/openbox cat > ~/.gtkrc-2.0 << "EOF" # Boring GTK2 theme settings include "/home/user/.gtkrc-2.0.mine" gtk-theme-name="Raleigh" gtk-icon-theme-name="Adwaita" gtk-font-name="Sans 10" gtk-cursor-theme-name="Adwaita" gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 gtk-enable-event-sounds=1 gtk-enable-input-feedback-sounds=1 gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle="hintfull" EOF cat > ~/.config/gtk-2.0/gtkrc << "EOF" style "scroll" { GtkScrollbar::has-backward-stepper = 1 GtkScrollbar::has-forward-stepper = 1 GtkScrollbar::stepper-size = 18 GtkScrollbar::slider-width = 18 GtkScrollbar::trough-border = 1 GtkScrollbar::activate-slider = 1 GtkScrollbar::min-slider-length = 24 } EOF cat > ~/.config/gtk-3.0/gtk.css << "EOF" .scrollbar, scrollbar { -GtkScrollbar-has-backward-stepper: true; -GtkScrollbar-has-forward-stepper: true; } scrollbar slider { min-width: 10px; min-height: 10px; border: 1px solid transparent; border-radius: 0px; background-color: lightgrey; } scrollbar slider:hover { background-color: #086a87; } scrollbar trough { min-width: 10px; border: 1px solid dimgrey; background-color: dimgrey; } EOF cat > ~/.config/gtk-3.0/settings.ini << "EOF" [Settings] gtk-theme-name=Raleigh gtk-icon-theme-name=Adwaita gtk-font-name=Sans 10 gtk-cursor-theme-name=Adwaita gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 gtk-enable-event-sounds=1 gtk-enable-input-feedback-sounds=1 gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle=hintfull gtk-primary-button-warps-slider=false EOF echo "export GTK_OVERLAY_SCROLLING=0" >> ~/.config/openbox/environment