How to make GIMP 2.10 titlebar black

My new, simpler solution

Another solution is to use Dark-Headers, a background service will ensure that your software always has a dark title bar.

Follow the installation instructions on the Github page, and define the list of software in ~/.config/dark-headers.conf.

Kudos to @catvitalio for developing the service.


My original solution

Open Gimp, and run the following command in a terminal:

xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark

Then click on the Gimp window. Its titlebar will become dark.

Unfortunately you have to do this each and every time you open Gimp. I am sure there must be a way to run this command via a Bash script so that it happens automatically. The following bash script should automate this:

#!/bin/bash
WINTITLE="GNU Image Manipulation Program"
APP="flatpak run org.gimp.GIMP"
$APP &
until [ -n "$(wmctrl -l | grep "$WINTITLE")" ] ; do : ; done 
WINID=$(wmctrl -l | grep "$WINTITLE" | awk '//{print $1}')
xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark -id $WINID

You would then just modify your menu entry to launch the bash script, rather than directly launching Gimp.

You can use the MenuLibre tool to modify menu entries easily.

Source: https://eischmann.wordpress.com/2017/01/10/dark-title-bars-for-apps-with-dark-ui/