jpfleury / clearlooks-phenix

GTK3 port of the Clearlooks theme
GNU General Public License v3.0
96 stars 42 forks source link

Overlay scrollbars #46

Open nauved opened 6 years ago

nauved commented 6 years ago

Putting a fix into /etc/environment to kill the overlay scrollbars worked but there was an objection to allowing the theme to put it there. So we are directing our solution to /etc/X11/Xsession.d/52gtk3-nooverlayscrollbar-nocsd instead. Here's the magic:

# This file is sourced by Xsession(5), not executed.

# This file configures the global behavior of GTK3 "hidden" overlay 
# scrollbars and client side decorations. These settings may be overridden
# by individual users by setting the same variables to different values in
# in their ~/.xsessionrc.

BASESTARTUP=${STARTUP%% *}
BASESTARTUP=${BASESTARTUP##*/}
if [ "$BASESTARTUP" = x-session-manager ]; then
    BASESTARTUP=$(basename $(readlink /etc/alternatives/x-session-manager))
fi
case "$BASESTARTUP" in
  gnome-session*)
      # This is GNOME, make sure settings are left at their defaults.
      unset GTK_CSD
      unset GTK_OVERLAY_SCROLLING
      unset LIBOVERLAY_SCROLLBAR
      ;;
  *)
      # Not GNOME, and the user didn't specify settings themselves, 
      # so set them to 0.
      if [ -z "$GTK_OVERLAY_SCROLLING" ] ; then
          GTK_OVERLAY_SCROLLING=0
      fi
      export GTK_OVERLAY_SCROLLING
      if [ -z "$LIBOVERLAY_SCROLLBAR" ] ; then
          LIBOVERLAY_SCROLLBAR=0
      fi
      export LIBOVERLAY_SCROLLBAR
      if [ -z "$GTK_CSD" ] ; then
          GTK_CSD=0
      fi
      export GTK_CSD
      ;;
esac

And here's the antidote to reverse it:

# To disable the Clearlooks-Phénix-Purpy GTK3 hack
# place the following lines in ~/.xsessionrc:

GTK_OVERLAY_SCROLLING=1
export GTK_OVERLAY_SCROLLING
LIBOVERLAY_SCROLLBAR=1
export LIBOVERLAY_SCROLLBAR
GTK_CSD=1
export GTK_CSD