changing the active window title bar color

skm smitchel at bnin.net
Fri Mar 8 01:35:24 CET 2019


There are themes that do this very thing: change the active window title bar
color to be different from the inactive title bar color.

try Mr. Robot xfce blue, for example.
 Here is how that theme does it:
Look at 2 of the files in the theme, I chose bottom-right-active.xpm and
bottom-right-inactive,xpm.  

Observe that in the color section of the -active file it lists #00a9ff as
the color (a blue)

Looking at the bottom-right-inactive.xpm's color chart, it lists the color
as #8c8c8c (gray).

All that is needed to change the color is to change all occurrences of one
color to a new color, in all 60-120 (or so) files in that theme.

Sounds like a tedious job, but it is easy with a simple search with replace.
We can use the find command with the -exec option to run sed -i on each file
to perform the actual search and replace.  The -i tells sed to edit the file
in place.
first change to the theme directory where the files are:

This directory has changed with different versions, in mint 19:
cd /usr/share/themes/theme-name/xfwm4 (for system themes)
or
cd /home/user/.themes/theme-name/xfwm4 (for user installed themes)
then

Find ./ -name '*.xpm' -exec sed -i s/#old_color/#new_color/  '{}'  \;

To edit the system installed themes in /usr, you need to sudo or be root.

so find finds all .xpm files in the current directory, then uses the stream
editor to do a search with replace in each file from the old color
(discovered when we looked at the file, above) to the new color you choose.
  
You can use any of the color picker programs--there are several--to get the
rgb values of the color you want.
 
Note that including the octothorpe in the search string is on purpose, so it
will only search the color table section of the xpm's and skip any
accidental occurrences of the same string in the data section of the .xpm's,
should there be any.

Note this changes *all* .xpm files in that directory, which works for a
theme that already has the -active and -inactive colors different.  If your
theme has them the same, like the default theme, you will need to modify the
wildcard to only change the *-active.xpm's  (use either *-active.xpm or
*-inactive.xpm for the wildcard).



--
Sent from: http://xfce.10915.n7.nabble.com/Xfce-Users-f3.html


More information about the Xfce mailing list