-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I invite you to contribute for improving #1
Comments
Observations: I do not know how to revert the modified colours to the original or change the modified colours again to another colour like your Papirus's |
It easy to fix.
That's a really big problem. The easiest way to solve this problem is to embed the color scheme in each icon. The icons will look like: <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<defs>
<style id="suru-color-scheme" type="text/css">
.SuruColorScheme-default { fill:#5c616c; }
.SuruColorScheme-arrogrin { fill:url(#grad_arrogrin); }
.SuruColorScheme-black { fill:#404747; }
.SuruColorScheme-golden { fill:#d4af37; }
.SuruColorScheme-green { fill:#009f6b; }
.SuruColorScheme-grey { fill:#a9a9a9; }
.SuruColorScheme-mycenean { fill:url(#grad_mycenean); }
.SuruColorScheme-orange { fill:#ff7538; }
.SuruColorScheme-purple { fill:#7851a9; }
.SuruColorScheme-red { fill:#ed2939; }
.SuruColorScheme-telinkrin { fill:url(#grad_telinkrin); }
.SuruColorScheme-yellow { fill:#fedf00; }
</style>
<linearGradient id="grad_arrogrin" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color: #dd9b44; stop-opacity: 1" />
<stop offset="100%" style="stop-color: #ad6c16; stop-opacity: 1" />
</linearGradient>
<linearGradient id="grad_mycenean" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color: #8bbac9; stop-opacity: 1" />
<stop offset="100%" style="stop-color: #2585a3; stop-opacity: 1" />
</linearGradient>
<linearGradient id="grad_telinkrin" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color: #f99f5e; stop-opacity: 1" />
<stop offset="100%" style="stop-color: #f95e6b; stop-opacity: 1" />
</linearGradient>
</defs>
<path class="SuruColorScheme-default" d="M 2 2 C 2 2 1 2 1 3 L 1 12 C 1 13 2 13 2 13 L 4 13 L 5 14 L 11 14 L 12 13 L 14 13 C 14 13 15 13.12994 15 12 L 15 3 C 15 2 14 2 14 2 L 2 2 z M 3 4 L 13 4 L 13 11 L 11 11 L 10 12 L 6 12 L 5 11 L 3 11 L 3 4 z"/>
</svg> Switching the color scheme will be performed by a simple command:
But the method has several issues:
|
We can create
Do you refer to CSS |
The main issue that color property doesn't support
Do not clearly understand how to switch to another custom color. By replacing the whole line? .SuruColorScheme-custom { fill:UNKNOWN; } |
What about
.SuruColorScheme-custom { fill:#custom; } sed -i -r 's/class="SuruColorScheme-[[:alnum:]]+"/class="SuruColorScheme-custom"/g; s/#custom/#abcdef' icon.svg |
When
That's not works when need to change one custom color to another. |
@SmartFinn, I will discard and disconsider the colour custom. I will add only when somebody requests new colour and new gradient. I will replace all Perl files for the commands And are conditions of locating the icons theme and |
Hi @SmartFinn! As I have finished to create the icons and to optimise the icons with The problem is that some SVG files have already Therefore, I am going to use the original Perl to add the list of colours and gradients to all the files. Then I will readapt the Perl files and the Bash script in this repository. I do not know if you know Perl. |
The original file (readapted):
|
You can try quickly in the folder test-beta |
Now I don't think that the embedded color scheme is a good idea. Each issue that I listed before is a pain. Adding/changing/removing colors of the color scheme hard to automatize. I like a method that using oomox to generate custom themes. The method creates a separated theme named like suru-plus-golden from the main theme and left the last one unchanged. No need to restore colors - just delete the custom theme. It's can be a separate script or a plugin for Oomox with GUI like I did for Papirus https://github.com/themix-project/oomox/tree/master/plugins/icons_papirus |
You are totally right. I etsted, using Sublime Text, some files did not work due to KDE bug. May I fork it, pull request to him, so my icons theme would be added for support to Oomox? |
At the moment, suru-plus repo is incompatible with Oomox. You have to change directory structure to Papirus-like style. I recommend to do it in the next suru-plus release. I'll help you with Makefile and install.sh scripts, etc. Also, I recommend you switch to GitHub Flow, meaning master branch for development, tags for stable, branches for features. The current flow looks like hell. |
The repo is ready, may I release or better may I wait and redo for readapting the directory structure in the Papirus-like style before?
Very interesting! I have just installed it. |
Release it as is and delete beta/unstable branches then we start. |
@gusbemacbe plugin for oomox was added themix-project/themix-gui#209 |
can be tested in arch linux as |
HI @SmartFinn and @actionless ! Sorry for my absence, I was too sick. @actionless , are you asking to me or to Sergei? And this repository, @SmartFinn ? |
@gusbemacbe i was asking you |
Hi @actionless ! In Arch Linux and Manjaro, it gave two errors to install Erros
|
llvm currently broken in arch linux under some specific usecases (which are reproduciable when compiling some of rust packages), to workaround it you can do:
|
Hi @SmartFinn and @actionless ! It worked on Manjaro KDE. But the icons theme exported is in Sorry for my absence and for my delay, because my Mac mini passed away, I was unable to run Arch Linux or Ubuntu on my second external HDD on my Mac mini. Then I can not test Oomox on Arch and on Ubuntu. My laptop is incompatible with running VirtualBox virtual machines. I have to save a lot of money to purchase the new super-computer. I will not buy nothing from Apple due to its new anti-repair policy. I do not want to replace a broken new Mac for a new Mac. |
do you mean ./local/share ? |
No, Oomix moved the exported icons theme to But if you move to In the KDE, some apps are GTK-based and need one icons theme applied by the For both KDE-based apps and GTK-based apps to recognise the same icon theme exported in KDE, it should be in |
@actionless a simple if statement in change_color.sh can solve the issue. But I'm not sure should we check |
i think i can just add a flag to scripts to choose destination directory (i think some of them already have such flag) in GUI last exported parameter is saved so it shouldn't be a problem for user after setting it once |
@actionless do you want to leave the choice to end-user? It's not a good idea to my mind. |
i can set default value to some reasonable one, but yeah, having a choice is always better than not so we still could discuss the default value for it |
So the default value is obvious. |
ok, so i've reviewed the files manually for example: if grep --quiet 'url(#arrongin)' *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/url(#arrongin)/url(#fitdance)/g'
elif grep --quiet 'url(#aurora)' *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/url(#aurora)/url(#fitdance)/g'
elif grep --quiet 'url(#oomox)' *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/url(#oomox)/url(#fitdance)/g'
elif grep --quiet 'url(#rainblue)' *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/url(#rainblue)/url(#fitdance)/g'
elif grep --quiet 'url(#sunrise)' *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/url(#sunrise)/url(#fitdance)/g'
elif grep --quiet 'url(#telinkrin)' *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/url(#telinkrin)/url(#fitdance)/g'
elif grep --quiet 'url(#60spsycho)' *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/url(#60spsycho)/url(#fitdance)/g'
elif grep --quiet 'url(#90ssummer)' *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/url(#90ssummer)/url(#fitdance)/g'
else
sed --in-place --follow-symlinks *.svg -e 's/currentColor/url(#fitdance)/g'
fi it could be refactored like: NEW_COLOR="url(#fitdance)"
ALL_COLORS=(
"url(#90ssummer)"
<.....>
"url(#sunrise)"
"currentColor"
)
for color in "${ALL_COLORS[@]}" ; do
if grep --quiet "$color" *.svg; then
sed --in-place --follow-symlinks *.svg -e 's/'"$color"'/'"$NEW_COLOR"'/g'
break
fi
done |
Nice codes simplification, @actionless ! I have just updated, I will test at my own risk. |
A small fail. The terminal said " |
but it's the same what your original code do try running each command manually in terminal to understand how they should be modified in script to work correctly
means grep (without std output) color in all .svg files in the current directory you probably need to prepend it with find like here: #1 (comment) |
I understood what happened, because of suru-plus-colourise/change_color.sh Lines 64 to 78 in ac8b466
The @SmartFinn codes you suggested were for creating a new icons theme, but I will try to use |
|
Or I must remove |
just try running |
I also did it and received a warning " |
yup, replace |
and also do |
And still |
Ah, I also tried with |
have you modified sed command the same as you modifed grep? |
also you need to specify target dir to find, like |
No, here:
The file |
ah, wait, you don't need find at all, i see those script are not independent but they should be called by your change-color script |
so just add |
in the file |
hm, that also wouldn't work was this script even working before? i think you can just rewrite it all with find as single script (#1 (comment)) instead of having 10 scripts just instead of having NEW_COLOR pre-defined read it from user |
The Ah, the problem is |
The concluding, the problem is |
Better to let @SmartFinn know what's wrong with the file |
Hahaha, but that's not so. |
|
@actionless yep, I have an idea. |
Now |
I was unaware of your last message, but is this current commit and README OK? |
Hello @SmartFinn!
I am inviting you to contribute and to improve this little repository.
I am not sure if these codes are bad and inelegant for you. If so, you can improve (only when you have time) if you want.
Little problem is that, these files do not preserve the symlinks. I found the solutions, they preserved the symlinks, but they makde them unsuable.
Based on:
find
ing the directories and tocd
multiple specific folders of a found directory to call the function?I also would like to replace Perl files for Bash files, because Bash offers
--in-place --follow-symlinks
, but I am not sure I can something similar in Bash to that in Perl.I am not sure it works for any terminal and if it is bash-agnostic.
Please do not forget of putting your credit on AUTHORS and CREDIT.
The text was updated successfully, but these errors were encountered: