The time now is Mon 23 Apr 2018, 11:44
All times are UTC - 4 |
Author |
Message |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Tue 19 Jun 2012, 09:15 Post subject:
|
|
Hello vovchik,
So far it all works nice except that if I try to use lock as a parameter I get the clock! Curiously, I tried "ock".. got a clock!
Thanks for your work, oh, if it makes a difference I'm using fatdog with 32 bit compat and your binary (no bacon in fatdog as yet).
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Tue 19 Jun 2012, 10:24 Post subject:
|
|
Thanks 01micko!
There was a little bug in my FIND routine. It has now been fixed. It really pays to have people test. Thanks again.
With kind regards,
vovchik
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Tue 19 Jun 2012, 15:24 Post subject:
|
|
I wouldn't say the bacon version is inherently faster or smaller considering that it will likely be called from a script and ops can be done using only builtins (typically faster than sourcing and executing an external program)... Then considering that it will be on a compressed squashfs, the script will get compressed without the additional overhead. It's still good to have alternative though, for native bacon apps. A C only version is pretty easy to do, as it would basically only need strcmp and (f)printf. The things that I left stubbed out that would really improve the look, need some input from graphically oriented designers. Backgrounds that can help tie them together with a unified look and feel that also complement foregrounds that can be informative while being graphically appealing and unified. If I had written it in C I was afraid I would lose input due to inaccessibility.
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Tue 19 Jun 2012, 15:47 Post subject:
|
|
Dear technosaurus,
The BaCon is certainly faster at coming up with the icon and color lists at the moment, but those bits could be optimized in bash. What I am interested in most is collecting more of these simple icons for inclusion and including a few more arguments (scaling and gradients come to mind), as well as text generation (with a few effects). It would really be possible to code a little SVG Factory. And it might just be useful to implement object overlays/compositing. Just food for thought
With kind regards,
vovchik
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Tue 19 Jun 2012, 19:10 Post subject:
|
|
I made a quick mod of the code to incorporate the ICON= into a case statement which both speeds it up and reduces memory usage. Also added color support based solely on positional parameters $2, $3... I need to find one of my old examples to incorporate text. For colors, I assume svg can use anything in rgb.txt.. or hex values of course. The backgrounds I am thinking could be an exported VAR so they can unify across the platform. I saw that vovchick had upscaled the image, I guess I should add a parameter to allow that to be adjustable (gtk doesn't do a great job scaling)
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Tue 19 Jun 2012, 23:05 Post subject:
|
|
Forgot to upload.
decided it would be better to use stdout for the icon, that way it can be sent anywhere - got everything but the background complete (unless you export the applicable environment variables to valid SVG code)... todo
but execution time is still <0.05s
Edit: no time to sort through these, but it may have links to some usable icons:
http://wiki.inkscape.org/wiki/index.php/Galleries
Description |
|

Download |
Filename |
svgdraw-col.tar.gz |
Filesize |
86.21 KB |
Downloaded |
744 Time(s) |
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Wed 20 Jun 2012, 08:48 Post subject:
Subject description: SIT-icon-display |
|
Is this going viral?
How about a GUI to try out the icons in the notiification area - but then I guess we'd have to call it SIN (get's more attention
that way )
Code: | #!/bin/sh
#
# based on bash svgdraw by technosaurus (as
# modded by vovchik) and raphaeljs by
# Dmitriy Baranovskiy (copyright 2008
# LICENSE: GPL3
# GUI seaside -requires sit2 and bsvg
cd /tmp
iconsel=`bsvg -i |tr " " '\n' |sed -e '1,/(225):/d' `
for i in $iconsel; do ICONS="$ICONS<item>$i</item>";done
colsel=`bsvg -c |tr " " '\n' |sed -e '1,/(148):/d' `
for i in $colsel; do COLS="$COLS<item>$i</item>";done
makeicon() {
bsvg $ICON $LINE_COLOR $FILL_COLOR
cp /tmp/$ICON.svg /tmp/siticon.svg
exit
}
export -f makeicon
echo '<svg width="128" height="128" viewBox="0 0 128 128">
<g transform="scale(4.0)">
<path style="fill:aliceblue;fill-rule:nonzero;stroke:aliceblue;fill-opacity:0.75;stroke-opacity:0.75;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
d="M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z" />
</g>
</svg>' >/tmp/siticon.svg
sit /tmp/siticon.svg &
export MAIN_DIALOG='
<vbox>
<hbox>
<text>
<label>Icon Select::</label>
</text>
<combobox>
<variable>ICON</variable>
'"$ICONS"'
</combobox>
</hbox>
<hbox>
<text>
<label>Line Color</label>
</text>
<combobox>
<variable>LINE_COLOR</variable>
'"$COLS"'
</combobox>
</hbox>
<hbox>
<text>
<label>Fill Color</label>
</text>
<combobox>
<variable>FILL_COLOR</variable>
'"$COLS"'
</combobox>
</hbox>
<hbox>
<button ok>
<action>makeicon</action>
</button>
<button cancel>
<action>killall sit</action>
<action>exit:</action>
</button>
</hbox>
</vbox>
'
gtkdialog3 --program=MAIN_DIALOG
unset MAIN_DIALOG
|
Regards,
s
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Wed 20 Jun 2012, 13:43 Post subject:
|
|
Dear seaside,
I like the gui very much. Thanks. I see that you use bsvg, so I just made a new version that outputs to stdout if you use "-" as the last argument after the color args (run without parameters and bsvg will show you how). No need to copy to and from /tmp now, just redirect. Also, I have simplified your parsing by adding "-C" and "-I" parameters. They output unformatted lists (1 item per line). The archive contains a new UPX'd binary and the revised source.
It is going viral indeed, and nicely!
With kind regards,
vovchik
Description |
|

Download |
Filename |
bsvg-0.1b.tar.gz |
Filesize |
189.26 KB |
Downloaded |
715 Time(s) |
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Wed 20 Jun 2012, 17:34 Post subject:
|
|
Technosaurus and Vovchik - thanks for those simplifications and additions. Much better.
It seems to me at this point that the icon draw files should be separate from the icon creation mechanism. If more icons are brought in or existing ones changed, considerable extra work is involved with updating.
A simple "grep firefox raphaeljs.txt (holding the draw files)" seems reasonably quick and perhaps might be considered as a way to have any number of "draw" files at the ready.
Best regards,
s
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Thu 21 Jun 2012, 09:23 Post subject:
|
|
Here's a version that seems reasonably responsive. (I'm sure technosaurus would make it absolutely fly )Placing the svg draw in a separate file (svgs).
Code: | #!/bin/sh
#
# based on bash svgdraw by technosaurus (as
# modded by vovchik) and raphaeljs by
# Dmitriy Baranovskiy (copyright 2008
# LICENSE: GPL3
# GUI seaside -requires sit2
while read l; do A="$A\n <item>${l%=*}</item>";done </mnt/sdb6/svgs # svgs file
ICONS=`echo -e $A | grep -v '#' | sort`
colors="
aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond \
blue blueviolet brown burlywood cadetblue chartreuse chocolate coral \
cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray \
darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid \
darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey \
darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue \
firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod \
gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki \
lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan \
lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon \
lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue \
lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue \
mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen \
mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin \
navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod \
palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum \
powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown \
seagreen seashell sienna silver skyblue slateblue slategray slategrey snow \
springgreen steelblue tan teal thistle tomato turquoise violet wheat white \
whitesmoke yellow yellowgreen none None "
for i in $colors; do COLS="$COLS<item>$i</item>";done
makeicon() {
ICOND=`grep $ICON /mnt/sdb6/svgs|cut -f2 -d=`
echo '<svg width="'${SIZE:-32}'" height="'${SIZE:-32}'" viewBox="0 0 '${SIZE:-32}' '${SIZE:-32}'">'$CUSTOM_BG'
<g transform="scale('${RATIO:-1.0}')">
<path style="fill:'${FILL_COLOR:-gray}';fill-rule:nonzero;stroke:'${LINE_COLOR:-black}';fill-opacity:'${FILL_OPACITY:-0.75}';stroke-opacity:'${STROKE_OPACITY:-0.75}';stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
d='$ICOND' />
</g>'$CUSTOM_FG'
</svg>' > /tmp/$ICON.svg
cp /tmp/$ICON.svg /tmp/siticon.svg
exit
}
export -f makeicon
echo '<svg width="128" height="128" viewBox="0 0 128 128">
<g transform="scale(4.0)">
<path style="fill:aliceblue;fill-rule:nonzero;stroke:aliceblue;fill-opacity:0.75;stroke-opacity:0.75;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
d="M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z" />
</g>
</svg>' >/tmp/siticon.svg
sit /tmp/siticon.svg &
export MAIN_DIALOG='
<vbox>
<hbox>
<text>
<label>Icon Select::</label>
</text>
<combobox>
<variable>ICON</variable>
'"$ICONS"'
</combobox>
</hbox>
<hbox>
<text>
<label>Line Color</label>
</text>
<combobox>
<variable>LINE_COLOR</variable>
'"$COLS"'
</combobox>
</hbox>
<hbox>
<text>
<label>Fill Color</label>
</text>
<combobox>
<variable>FILL_COLOR</variable>
'"$COLS"'
</combobox>
</hbox>
<hbox>
<button ok>
<action>makeicon</action>
</button>
<button cancel>
<action>killall sit</action>
<action>exit:</action>
</button>
</hbox>
</vbox>
'
gtkdialog3 --program=MAIN_DIALOG
unset MAIN_DIALOG |
Regards,
s
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Thu 21 Jun 2012, 17:51 Post subject:
|
|
Viral [ ]
I guess we could almost make a script to generate rox desktop icon themes in any colour combination. Just need a few more icons.
yeah, nothing to do with sit, new thread?
I have found some [possibly] suitable icons, lots of them have spaces/new lines in the string starting with "M", any work around?
http://somerandomdude.com/work/iconic/
Description |
|
Filesize |
65.31 KB |
Viewed |
1042 Time(s) |

|
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Thu 21 Jun 2012, 19:41 Post subject:
|
|
I was thinking about the "what should puppy look like?" thread when I came across these.
http://murga-linux.com/puppy/viewtopic.php?t=78080
I wanted a way to make the desktop look like the menu, look like the apps, look like the tray. We'd still need to generate pngs for jwm - anyone want to patch jwm to just use imlib2?
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
Last edited by technosaurus on Thu 11 Dec 2014, 09:40; edited 1 time in total
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Mon 25 Jun 2012, 10:46 Post subject:
Updated to v. 0.1c (over 180 icons added) |
|
Dear all,
I have revised bsvg again and added heaps of new svgs (now 410). I have also included a script that dumps all the icons in the library to your current directory as svg files - and you can specify colors. Incorporated in this version is a set by P.J. Onori (http://somerandomdude.com/work/iconic/), but I first had to modify all his polygons and other shape macros to full svg paths and to standardize all views to 128x128. His icons start with "I_". A real pain, that transformation exercise, but at least all the icons are now one size. I also added a few of my own (icon names starting with V_).
Have fun...
With kind regards,
vovchik
PS. Thanks technosaurus. That was a very nice find:)
PPS. The archive contains the source, a 32-bit UPX'd binary compiled on Lucid and the dump script. I would place the binary and dump script in /usr/local/bin.
PPPS. @ technosaurus, seaside and 01micko. You can now parse my source to grab the icon definitions for use in bash or another language. The new ones (named I_ and V_) need a new svg "<g transform=>" line, which is the last field in each line.[/url]
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Mon 25 Jun 2012, 11:38 Post subject:
Re: Updated to v. 0.1c (over 180 icons added) |
|
vovchik wrote: | Dear all,
I have revised bsvg again and added heaps of new svgs (now 410). I have also included a script that dumps all the icons in the library to your current directory as svg files - and you can specify colors. Incorporated in this version is a set by P.J. Onori (http://somerandomdude.com/work/iconic/), but I first had to modify all his polygons and other shape macros to full svg paths and to standardize all views to 128x128. His icons start with "I_". A real pain, that transformation exercise, but at least all the icons are now one size. I also added a few of my own (icon names starting with V_).
Have fun...
|
Vovchik,
Very impressive.
I checked out those icons mentioned by 01micko and after struggling to parse out the path with this convoluted phrase Code: | sed -n '/<path style/,/\/>/p' $ICON.svg|sed 's/\t//g'|tr -d '\012\015'|cut -f3 -d=|sed 's|/>||' | only to find many were empty and some did not work. Since I had no idea of how to convert the polygons to path draw statements, I did what I do best.......went on to something else.
Thanks for your hard work and how does one convert polygons (or anything else) to path draw statements?
Best Regards,
s
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Mon 25 Jun 2012, 12:00 Post subject:
|
|
Dear seaside,
Thanks. Conversion is a royal pain in the arse. You have to ungroup the image in Inkscape (several times) and then use Item->Convert to paths for every object. I suppose this could be done algorithmically, but I did it the ugly manual way, with some preliminary programmed parsing to throw out prolix metadata and other unnecessary garbage. Nominal scaling is also another pain, but it is important to have one viewport for all icons of the same dimensions, particularly if you later want to convert to png or something else. It will save work later on. With the transform statement I have included, and the path data, you should now be able to use the data in bash or something else to make your own generator or gui.
With kind regards,
vovchik
|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|