Install Adium themes to Empathy

  • Some time ago Empathy developers implemented support for Adium themes.

    I’ve just created simple shell script for installing such themes from adiumxtra:// urls:

         #!/bin/sh
         # Adium theme AdiumMessageStyle installer for Empathy
         # Last version here: http://gist.github.com/191499
    
         if [ -z $1 ]
           then
            echo
            echo "  Usage:"
            echo "      `basename $0` adiumxtra://some.url.here/extra"
            echo
            exit 1
         else
            TMPDIR=`mktemp --directory`
            XTRAURL=`echo $1 | sed -e "s/^adiumxtra:/http:/"`
            DEST="$HOME/.local/share/adium/message-styles/"
            if [ !-d $DEST ]
            then
                mkdir -v -p $DEST
            fi
         
            cd $TMPDIR
            echo "Downloding extra..."
            wget --no-verbose --progress=bar:force -O xtra.zip $XTRAURL
            unzip -qq xtra.zip
         
            THEMES=`ls -d *.AdiumMessageStyle/`
         
            if [ -z $THEMES ]
            then
                echo "No themes found in downloaded file"
            else
                for theme in $THEMES
                do
                    cp -r $theme $DEST
                done
                echo "\nTheme $XTRAURL was succesfully installed to $DEST"
            fi
            rm xtra.zip
            rm -r $TMPDIR
         fi
         exit 0

    Use gconf to enable this protocol handler for clever browsers:

        gconftool-2 -t string -s /desktop/gnome/url-handlers/adiumxtra/command "/usr/loca/bin/adiumxtra-install %s"
        gconftool-2 -t bool -s /desktop/gnome/url-handlers/adiumxtra/enabled true
        gconftool-2 -t bool -s /desktop/gnome/url-handlers/adiumxtra/needs_terminal false

    Works at least in Chromium :)