trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: November 2011

Customization of the Crystal SVG icons theme

From: Laurent Dard <f.couperin@...>
Date: Fri, 18 Nov 2011 16:36:40 +0100
I see trinity developers are talking about how to ease users contributions.
It inspired me to submit the following tip.

It changes the settings for the whole system.
Is there a way to add a custom icons folder in $HOME ?

Comments are welcomed.
(And feel free to correct my english.)

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-------------------------------------------------------------------------------
                       Chega De Saudade (No More Blues)
 how to change the default color of the folder icon in Crystal SVG icons theme
-------------------------------------------------------------------------------

I like the Crystal SVG icons shapes but I've been tired to see so much blue
folders in konqueror. I needed colors!

So I wrote down this tip for my personal use, and to share with others.

(Following commands must be run as root.)

1/ The first time:

  # possible values for COLOR: blue green grey orange red violet yellow
  COLOR=orange
  ICONSFOLDER=/opt/trinity/share/icons
  for d in $ICONSFOLDER/crystalsvg/*/filesystems ; do
    echo $d
    [ ! -e $d/folder_blue.png ] &&
      [ ! -e $d/folder.orig.png ] &&
      mv -v $d/folder.png $d/folder.orig.png &&
      ln -v folder.orig.png $d/folder_blue.png
    ln -v $d/folder_$COLOR.png $d/folder.png
  done

2/ To change color later:

  # possible values for COLOR: blue green grey orange red violet yellow
  COLOR=violet
  ICONSFOLDER=/opt/trinity/share/icons
  for d in $ICONSFOLDER/crystalsvg/*/filesystems ; do
    rm -v $d/folder.png
    ln -v $d/folder_$COLOR.png $d/folder.png
  done

3/ To undo all changes and revert to the default

  ICONSFOLDER=/opt/trinity/share/icons
  for d in $ICONSFOLDER/crystalsvg/*/filesystems ; do
    echo $d
    [ ! -e $d/folder_blue.png ] &&
      [ ! -e $d/folder.orig.png ] &&
      rm -v $d/folder.png $d/folder_blue.png &&
      mv -v $d/folder.orig.png $d/folder.png ||
      echo "ERROR!"
  done

4/ Notes

* Crystal SVG icons theme is installed by kdelibs-data-trinity

* On Debian-based systems, dpkg diversions may be added:
      for d in /opt/trinity/share/icons/crystalsvg/*/filesystems ; do
        dpkg-divert --local --divert $d/folder.orig.png --add $d/folder.png
      done
  To remove:
      for d in /opt/trinity/share/icons/crystalsvg/*/filesystems ; do
        dpkg-divert --remove $d/folder.png
      done

5/ Disclaimer

USE THIS TIP AT YOUR OWN RISK. BACKUPS PREVENT TEARS!
For example:
    cp a /opt/trinity/share/icons/{crystalsvg,.crystalsvg.save}
To restore:
    rm -r /opt/trinity/share/icons/crystalsvg
    mv /opt/trinity/share/icons/{.crystalsvg.save,crystalsvg}

Copyright (C)  2011  Laurent Dard
License: GPL-2+
 The above text is free documentation; you can redistribute it
 and/or modify it under the terms of the GNU General Public
 License as published by the Free Software Foundation; either
 version 2 of the License, or (at your option) any later
 version.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-- 
Laurent Dard