2

I am using Debian - Jessie I managed to change the default window border thickness by editing the appropriate theme .xml file. In this case:

/usr/share/themes/BlueMenta/metacity-1/metacity-theme-1.xml

How would I go about doing this for all themes? (I have to change this on multiple machines and they are all using different/custom themes).

Another option is to try and figure out the theme being used and use that info to make changes to an appropriate file but:

gsettings get org.gnome.desktop.interface gtk-theme

Always shows 'Adwaita' even though its not being used.

Can I utilize /usr/share/themes/Default somehow to change this globally, no matter what theme is being used?

Thanks a bunch!

UPDATE

actually this is showing the correct theme being used in real time:

gsettings get org.mate.interface gtk-theme

which narrows it down at least so I can modify only the correct file.

UPDATE-2

I ended up writing a script that would replace the left/right_width and bottom_height parameters in the config file of the theme that is being used by a certain user.
Usage: run the script with the username as the parameter.

#!/bin/bash

if [[ -z $1 ]]; then
  echo 'No params provided' && exit 1 ; fi

themeRootDir=/usr/share/themes/
backupDir=/opt/theme_backup$(date +%d-%m-%H%M%S)
themeUsed=$(sudo su -c "gsettings get org.mate.interface gtk-theme | tr -d '\'\'" $1)

if ! [[ -d $backupDir ]]; then
  mkdir $backupDir ; fi

if ! [[ -z themeUsed ]]; then
  rsync -av $themeRootDir$themeUsed $backupDir;
  echo "Theme configuration backup: $backupDir"; else
echo 'Theme could not be located' && exit 1 ; fi

for xml in $(find $themeRootDir$themeUsed -name 'metacity*.xml'); do
  sed -i '/distance name="left_width"/c<distance name="left_width" value="10"/>' $xml
  sed -i '/distance name="right_width"/c<distance name="right_width" value="10"/>' $xml
  sed -i '/distance name="bottom_height"/c<distance name="bottom_height" value="10"/>' $xml
done
  • 1
    Looks like you've found an answer! Please submit and mark it as such instead of adding it to your question. – Cees Timmerman Jan 18 '19 at 5:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.