Created
October 9, 2014 16:47
-
-
Save anonymous/1e440b6acb2f4028b04e to your computer and use it in GitHub Desktop.
Script which patches meld (1.4) when working with a dark theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd /usr/share/meld/meld/ | |
echo "Patching files in $(pwd)" | |
sed ' | |
s/\(color_delete_bg"[^"]*\)"[^"]*"/\1"#003300"/ | |
s/\(color_replace_bg"[^"]*\)"[^"]*"/\1"#112233"/ | |
s/\(color_replace_fg"[^"]*\)"[^"]*"/\1"gray80"/ | |
s/\(color_conflict_fg"[^"]*\)"[^"]*"/\1"White"/ | |
s/\(color_inline_bg"[^"]*\)"[^"]*"/\1"#223344"/ | |
s/\(color_inline_fg"[^"]*\)"[^"]*"/\1"White"/ | |
s/\(color_edited_bg"[^"]*\)"[^"]*"/\1"gray20"/ | |
s/\(color_edited_fg"[^"]*\)"[^"]*"/\1"White"/ | |
' preferences.py > preferences.py.new | |
sed ' | |
s/foreground="[^"]*"\([^#]*#[ ]*STATE_NORMAL\)/foreground="white"\1/ | |
s/foreground="[^"]*"\([^#]*#[ ]*STATE_NOCHANGE\)/foreground="white"\1/ | |
' tree.py > tree.py.new | |
for file in preferences.py tree.py; do | |
mv "$file.new" "$file" | |
done | |
echo -e "\e[32;1mDone\e[0m (Note: In case meld doesn't work anymore, please reinstall it.)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment