Monday 4 May 2020

A Compiz/Xfce/Mint 19.3 Update - 2020 May 04

I've been playing with Compiz and working out a few changes to make it more stable.

Compiz uses Metacity for theming and there some really annoying things that Compiz does when it is working with Mint 19.3 Xfce that are worse than simply annoying.
Other things that 'are simply annoying' are the result of the themes for Window decorations clashing with GTK themes for Xfce.  Things like tiny or otherwise unreadable control buttons on the Titiebars for example. 

In a couple of themes I do like a lot, Compiz does strange things. The DarkCold theme for example, looks nice and works well, until I try to use the mousewheel on the Titiebar to shade the window. If the window is not Maximised, it works perfectly.
If the window IS Maximised, and I scroll the mouswwheel on the Titiebar to shade the window - I lose all Titiebars on ALL windows!

 I managed to find a little script on the web that allows me to select a Metacity friendly theme (out of those installed in Xfce) to use with Compiz. Running the script brings up a Zenity Dialog that lets me select from available themes easily.


As you can see from the Titiebar in the image, while it is still pretty plain, it is easy to see and the Buttons on the right for Min, Max and Close in the 'Human' theme are clear and big enough to use. 
In some of the other themes the buttons are almost impossible to see or to find with the mouse.

Having this script makes it simple to test which Window Decoration themes look ok and 'work', and which ones don't.

I found the Theme Selector script at:
Metacity Theme Selector

The script for the Theme Selector is:
<code>
#!/bin/bash

SAVEIFS=$IFS
IFS=$(echo -en "\n\b")

if [ ! -f /usr/bin/metacity ]; then
  zenity --warning --text="<b>You do not appear to have Metacity installed.</b>\n\nThe Compiz GTK window decorator uses Metacity libraries to operate. The Metacity theme is what this tool adjusts.\n\nInstall the metacity package if you would like to use the Compiz GTK window decorator."
fi

main_window() {
  selection=$(
    zenity --height 450 --width 320 --list --ok-label="Apply" --cancel-label="Close" --title="Metacity themes" \
    --column="Current theme: $( if [ $(gsettings get org.gnome.desktop.wm.preferences theme) == "''" ]; then
        echo Default
      else
        gsettings get org.gnome.desktop.wm.preferences theme
      fi)" \
    "Compiz GWD default" \
    $(
      for d in /usr/share/themes/*/metacity-1; do
        echo $d | sed 's:/usr/share/themes/::' | sed 's:/metacity-1::'
      done
    )
  )
}

while [ $? = 0 ]; do
if [ "$selection" == "Compiz GWD default" ]; then
  gsettings set org.gnome.desktop.wm.preferences theme ""
elif [ "$selection" != "" ]; then
  gsettings set org.gnome.desktop.wm.preferences theme "$selection"
fi
main_window
done

IFS=$SAVEIFS

</code>






No comments:

Post a Comment