You are not logged in.

#1 2019-10-19 08:47:04

ohnonot
...again
Registered: 2015-09-29
Posts: 4,529
Website

A Collection of GTK Tweaks, Fixes & Settings

This is just a collection of tweaks found elsewhere.

Here are those that go into ~/.config/gtk-3.0/settings.ini

# various tweaks: https://wiki.archlinux.org/index.php/GTK+

# CSD: no buttons at all, only a menu hamburger:
gtk-decoration-layout=menu:

gtk-menu-popup-delay=0

# only icons on toolbars, no text
gtk-toolbar-style = GTK_TOOLBAR_ICONS
# just smaller icons
gtk-icon-sizes="panel-menu=16,16:panel=16,16:gtk-menu=16,16:gtk-large-toolbar=16,16:gtk-small-toolbar=16,16:gtk-button=16,16"

# make scrollbar buttons behave like they used to
gtk-primary-button-warps-slider=false

# https://wiki.archlinux.org/index.php/GNOME/Tips_and_tricks#Disable_animations
# gsettings set org.gnome.desktop.interface enable-animations false
gtk-enable-animations=0

It's a little unclear if the above setting disables all animations: might be ebtter to enter this command, also:

gsettings set org.gnome.desktop.interface enable-animations false

Then there's a few tweaks for ~/.config/gtk-3.0/gtk.css, mostly to disable GTK3's own shadows, and client side decorations:

/*
https://wiki.archlinux.org/index.php/GTK%2B#Client-side_decorations
*/
.window-frame, .window-frame:backdrop {
 box-shadow: 0 0 0 black;
 border-style: none;
 margin: 0;
 border-radius: 0;
}

.titlebar {
 border-radius: 0;
}

.window-frame.csd.popup {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13);
}

.header-bar {
  background-image: none;
  background-color: #ededed;
  box-shadow: none;
}
/* You may want to use this if you don't like the double title.
GtkLabel.title {
    opacity: 0;
}*/


/* from oomox documentation (using with tiling wms) */
window decoration {
    margin: 0;
    border: 0;
}

/*
various tweaks: https://wiki.archlinux.org/index.php/GTK+
*/
/* Remove dotted lines from GTK+ 3 applications */
undershoot.top, undershoot.right, undershoot.bottom, undershoot.left { background-image: none; }

/*
testing linuxquestions.org/questions/linux-newbie-8/missing-scroll-bars-4175642135
*/
/*
scrollbar {
   -GtkScrollbar-has-backward-stepper: 1 !important;
   -GtkScrollbar-has-forward-stepper: 1 !important;
}
*/
/*
different version: https://www.linuxquestions.org/questions/linux-mint-84/v18-1-to-v19-1-differences-4175653745/#post5994161
*/
/*
scrollbar {
    -GtkScrollbar-has-backward-stepper: true;
    -GtkScrollbar-has-forward-stepper: true;
}

scrollbar slider {
    min-width: 14px;
    min-height: 14px;
}

scrollbar button {
    min-width: 20px;
    min-height: 20px;
}
*/

some are commented out. Experiment.

All in all, it really pays to have a good read of these two pages:
https://wiki.archlinux.org/index.php/GTK+
https://wiki.archlinux.org/index.php/GN … and_tricks

Last edited by ohnonot (2020-02-17 07:32:02)


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#2 2019-10-19 09:39:43

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,811
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

Thanks! Maybe some candidates for setting as BL defaults?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#3 2019-10-25 23:16:44

obscurant
Member
Registered: 2017-08-06
Posts: 146

Re: A Collection of GTK Tweaks, Fixes & Settings

Thanks for this. Here's a couple of GTK3 tweaks I found recently, for some things that drive. me. batty.

In ~/.profile

Disable overlay scrollbars

export GTK_OVERLAY_SCROLLING=0

Fix mouse scrolling in some apps

export GDK_CORE_DEVICE_EVENTS=1

Offline

#4 2020-02-17 07:33:40

ohnonot
...again
Registered: 2015-09-29
Posts: 4,529
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

I changed the title of the thread to make it a catch-all for all sorts of GTK tweaks.
Here's another one:

Uniform look for user & root GTK windows (e.g. synapic):

$ sudo su -
# cd
# ln -s /home/<your_user_name>/.gtkrc-2.0
# mkdir -p .config/gtk-3.0
# cd .config/gtk-3.0
# ln -s /home/<your_user_name>/.config/gtkrc-3.0/settings.ini
# exit
$

Last edited by ohnonot (2020-02-17 07:34:41)


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#5 2020-02-17 11:30:15

damo
....moderator....
Registered: 2015-08-20
Posts: 5,988

Re: A Collection of GTK Tweaks, Fixes & Settings

^ Just pointing out that root/user themes are different by design in BL, so you are supposed to know what you are doing!


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#6 2020-02-17 13:03:29

clusterF
Member
Registered: 2019-05-07
Posts: 539

Re: A Collection of GTK Tweaks, Fixes & Settings

^ by uniform look, does this mean root and user themes look identical? If so that is probably not a good idea. Id rather have all my root gui have the raleigh look and have bog stock icons like gnome or adwaita.

Offline

#7 2020-02-18 00:36:00

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,811
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^Right now in BL we don't do any theming on the root account so it just gets whatever the default is. That probably looks different enough to do the job.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#8 2020-02-18 04:28:49

DeepDayze
Member
From: In Linux Land
Registered: 2017-05-28
Posts: 860

Re: A Collection of GTK Tweaks, Fixes & Settings

johnraff wrote:

^Right now in BL we don't do any theming on the root account so it just gets whatever the default is. That probably looks different enough to do the job.

Makes good sense to have any GUI apps run as root have a different theme/color to identify them as such.


Real Men Use Linux

Offline

#9 2020-02-18 08:56:03

ohnonot
...again
Registered: 2015-09-29
Posts: 4,529
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

TBH I use graphical apps as root so rarely that I don't really need that distinction.

I don't even use this myself, just posting for somebody else who thought it was important.

Nevertheless, I do have this in /root/.gtkrc-2.0.mine:

style "mine"
{
base[NORMAL] = "#FF0000"
base[ACTIVE] = "#FF0000"
}
# widget_class "*" style "default"
class "GtkWidget" style "mine"
#class "FmMainWin.*.FmTabPage" style "mine"
#class "*Entry*" style "mine"

Colors some filemanager elements fiercely red.

Works only if you also have this line in ~/.gtkrc-2.0:

include "~/.gtkrc-2.0.mine"

Last edited by ohnonot (2020-02-18 08:56:40)


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#10 2020-02-18 09:09:55

clusterF
Member
Registered: 2019-05-07
Posts: 539

Re: A Collection of GTK Tweaks, Fixes & Settings

^ Good idea, similar to what i do with nano color scheme, when in root its bright red, for the user it is blue.

Offline

#11 2020-03-12 20:16:27

obscurant
Member
Registered: 2017-08-06
Posts: 146

Re: A Collection of GTK Tweaks, Fixes & Settings

I found this, but haven't tried it. It's a "small module used to disable the client side decoration of Gtk+ 3." It replaces the Gtk3 "header bar" with the old titlebar.

https://github.com/PCMan/gtk3-nocsd

Something like this could be used in your .profile

# More explanation here
# https://github.com/PCMan/gtk3-nocsd
export GTK_CSD=0
export LD_PRELOAD=/lib/libgtk3-nocsd.so.0

Offline

#12 2020-03-12 22:35:46

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,129

Re: A Collection of GTK Tweaks, Fixes & Settings

Personally I prefer the "OLD" look with menus and icons
Mousepad (GTK3) - Debian 10
2020-03-12-193323-S11.jpg


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#13 2020-03-13 06:37:09

ohnonot
...again
Registered: 2015-09-29
Posts: 4,529
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

This is in the repos.

apt install gtk3-nocsd

... and I'm pretty sure it "Just Works" after installation, no additional setup required.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#14 2020-03-13 07:41:57

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,811
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^ & ^^^ gtk3-nocsd just works indeed, but you might not necessarily like what it does. Two title bars? Anyway, try it out by all means.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#15 2020-03-13 07:45:28

ohnonot
...again
Registered: 2015-09-29
Posts: 4,529
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^are you saying exporting GTK_CSD=0 helps with that?


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

#16 2020-03-13 08:25:31

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,811
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^no
As you said, gtk3-nocsd sets its own configuration, at least in Debian.
What I was saying was that you might not like it. No configuration will help with that.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#17 2020-03-30 05:16:03

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,811
Website

Re: A Collection of GTK Tweaks, Fixes & Settings


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB