Skip to content

Instantly share code, notes, and snippets.

@golimpio
Created October 3, 2014 13:39
Show Gist options
  • Save golimpio/038de5dd94055e601dbf to your computer and use it in GitHub Desktop.
Save golimpio/038de5dd94055e601dbf to your computer and use it in GitHub Desktop.
Replace folders' colours in svg files on gnome icon themes
#! /bin/bash
echo Replacing \#$1 by \#$2
find . -name *folder* -path *places* -type f -print0 | xargs -0 -n 1 sed -i -e 's/'$1'/'$2'/g'
find . -name *fileopen* -path *places* -type f -print0 | xargs -0 -n 1 sed -i -e 's/'$1'/'$2'/g'
find . -name *user-desktop* -path *places* -type f -print0 | xargs -0 -n 1 sed -i -e 's/'$1'/'$2'/g'
find . -name *user-home* -path *places* -type f -print0 | xargs -0 -n 1 sed -i -e 's/'$1'/'$2'/g'
find . -name *network* -path *places* -type f -print0 | xargs -0 -n 1 sed -i -e 's/'$1'/'$2'/g'
# e.g. run it from the root folder of the icon theme:
# recolor-numix-folders.sh f5c14e 63b6d1
# recolor-numix-folders.sh e9a439 57a0b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment