You are not logged in.

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

ohnonot
...again
Registered: 2015-09-29
Posts: 5,445
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.

Offline

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

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,909
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: 150

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: 5,445
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.

Offline

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

damo
....moderator....
Registered: 2015-08-20
Posts: 6,599

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

Offline

#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: 7,909
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
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,215

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: 5,445
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.

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: 150

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,628

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.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

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

ohnonot
...again
Registered: 2015-09-29
Posts: 5,445
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.

Offline

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

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,909
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: 5,445
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.

Offline

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

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,909
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: 7,909
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

#18 2020-09-16 02:32:03

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,909
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

I couldn't find a more appropriate thread to put this, and it didn't seem to deserve one of its own, so:
GIMP washed out colors: Color to Alpha and layer recombination
https://www.preining.info/blog/2020/09/ … ut-colors/

(another one from Norbert Preining)


...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

#19 2020-09-16 17:43:16

ohnonot
...again
Registered: 2015-09-29
Posts: 5,445
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^ Great, I have to remember that! (I certainly came across that effect a few times.)


BL quote proposals to this thread please.

Offline

#20 2021-02-22 20:09:59

ohnonot
...again
Registered: 2015-09-29
Posts: 5,445
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

The GTK3 filechooser and gsettings

Many applications use it. Many people are complaining about its lack of configurability. But you can change a few settings:

$> gsettings list-recursively org.gtk.Settings.FileChooser
org.gtk.Settings.FileChooser sort-column 'name'
org.gtk.Settings.FileChooser last-folder-uri ''
org.gtk.Settings.FileChooser date-format 'regular'
org.gtk.Settings.FileChooser show-hidden true
org.gtk.Settings.FileChooser sidebar-width 220
org.gtk.Settings.FileChooser clock-format '24h'
org.gtk.Settings.FileChooser window-position (238, 71)
org.gtk.Settings.FileChooser startup-mode 'cwd'
org.gtk.Settings.FileChooser expand-folders false
org.gtk.Settings.FileChooser window-size (1203, 902)
org.gtk.Settings.FileChooser show-type-column true
org.gtk.Settings.FileChooser sort-order 'ascending'
org.gtk.Settings.FileChooser type-format 'category'
org.gtk.Settings.FileChooser show-size-column false
org.gtk.Settings.FileChooser location-mode 'path-bar'
org.gtk.Settings.FileChooser sort-directories-first true

Most of these settings are easily changed through the filechooser UI itself, but some aren't:

$> gsettings describe org.gtk.Settings.FileChooser location-mode
Controls whether the file chooser shows just a path bar, or a visible entry for the filename as well, for the 
benefit of typing-oriented users. The possible values for these modes are "path-bar" and "filename-entry".
$> gsettings describe org.gtk.Settings.FileChooser type-format
Different ways to show the 'Type' column information. Example outputs for a video mp4 file:
'mime' -> 'video/mp4' 'description' -> 'MPEG-4 video' 'category' -> 'Video'

Nice, let's set that to 'mime':

$> gsettings set org.gtk.Settings.FileChooser type-format mime

Most people on this forum will also want to see hidden files:

$> gsettings set org.gtk.Settings.FileChooser  show-hidden true

BL quote proposals to this thread please.

Offline

#21 2021-02-23 04:50:49

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,909
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^Thanks.
I certainly found the current GTK3 filechooser annoying compared with what I had on Debian Stretch, especially that "File System" is gone from the shortcuts. Now to open a file not in ~/ you have to go to "other locations" > "computer" >... No fix for that I suppose?


...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

#22 2021-02-23 07:06:43

ohnonot
...again
Registered: 2015-09-29
Posts: 5,445
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^ It seems I forgot the most important command!

$> gsettings set org.gtk.Settings.FileChooser location-mode path-bar

Allows you to type in a location (possibly starting with /) or using Alt + Arrow-Up/Dn to traverse the hierarchy.

Of the FileChooser keys I can see, I see none that would do what you want directly.

Last edited by ohnonot (2021-02-24 05:51:02)


BL quote proposals to this thread please.

Offline

#23 2021-02-23 07:53:13

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,909
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^'filename-entry' maybe?


...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

#24 2021-02-23 12:13:44

ohnonot
...again
Registered: 2015-09-29
Posts: 5,445
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^

gsettings describe org.gtk.Settings.FileChooser filename-entry
No such key “filename-entry”

BL quote proposals to this thread please.

Offline

#25 2021-02-24 02:47:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,909
Website

Re: A Collection of GTK Tweaks, Fixes & Settings

^(scroll to the end)

gsettings describe org.gtk.Settings.FileChooser location-mode
Controls whether the file chooser shows just a path bar, or a visible entry for the filename as well, for the benefit of typing-oriented users. The possible values for these modes are "path-bar" and "filename-entry".

I think "filename-entry" is the setting for "Allows you to type in a location".

BTW I can set it via gsettings but can't get it to actually apply any change to the GUI. Some dbus issue maybe...
I can

gsettings set org.gtk.Settings.FileChooser location-mode "filename-entry"

and for a while it shows in the output of 'gsettings list-recursively org.gtk.Settings.FileChooser', but makes no difference to the appearance of the geany or mousepad "open" dialogue window, and eventually reverts to "path-bar" anyway.

Last edited by johnraff (2021-02-24 05:49:52)


...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