simple game framework for scripting languages

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
linuph
Posts: 128
Joined: Mon 04 Jun 2012, 02:29
Location: Philippines

#46 Post by linuph »

Icon programming.

I've been digging lately to find a graphics programming language without bloating dependencies. I think I found one: Icon. You may never have heard of it.

See here: http://www.cs.arizona.edu/icon/index.htm

It's ancient in software/computer terms (1998). The earliest mention of it that I found dates back to 1979.

I downloaded the packages from the above website, compiled it with X11 headers and dropped the resulting directory with files into ~/bin and made a symlink.

Guess what: it works flawlessly. And it is rather easy to understand, even for me :P

Below some examples I made with the help of the excellent documentation in an hour or so. But there's lot more to Icon than this, like high level string handling and Turtle Graphics, so I'm venturing on with it.

I would have liked to attach the Icon compilation as well, but it's 1.7Mb zipped (9Mb unzipped).

BTW there's Unicon (http://unicon.sourceforge.net/faq.htm) which is a 'modernized dialect that descends from Icon", but I have not yet looked into it.

I thought you might be interested....

Code: Select all

#!/bin/icon
# fonts
link graphics

procedure main()
	WOpen("size=600,200") | stop("Can't open window")
	WAttrib("pos=50,150")
	WAttrib("label=Icon Programming - Fonts Demonstration")
	GotoXY(10,50)
	ransom("The quick brown fox jumps over the lazy dog.")
	WDone()
end

procedure ransom(s)
	local c
	static famlist, attlist, sizelist
	initial
		{
		famlist:=["URW Chancery L","DejaVu Sans"]
		attlist:=["","","bold","italic"]
		sizelist:=[18,22,24,32,34]
		}
	every c:=!s do
		{
		Font(?famlist || "," || ?sizelist || "," || ?attlist)
		WWrites(c)
		}
	return
end

Code: Select all

#!/bin/icon
#clipping
link graphics

procedure main()

	local x,y
	WOpen("size=600,400", "bg=yellow")
	WAttrib("pos=300,100")
	WAttrib("label=Icon Programming - Clipping")
	Fg("red")
	FillRectangle(50,50,400,300)
	Fg("green")
	FillRectangle(70,70,360,260)
	Clip(71,71,359,259)
	every 1 to 50 do
		{
		x:=?400+50
		y:=?300+50
		WAttrib("fg=black","linewidth=5")
		DrawCircle(x,y,30)
		WAttrib("fg=white","linewidth=3")
		DrawCircle(x,y,30)
		}
	WDone()
end

Code: Select all

#!/bin/icon
# Sierpinsky

$define Width	400
$define Height	400

$define X1		0
$define Y1		Height

$define X2		(Width/2)
$define Y2		0

$define X3		Width
$define Y3		Height

link graphics

procedure main()

	local x,y
	WOpen("size=400,400", "bg=light green")
	WAttrib("label=Icon Programming - Sierpinski Diagram")
	Fg("red")
	WWrite("Press 'q' to quit")
	Fg("black")
	x:=Width/2
	y:=Height/2
	until WQuit() do
		{
			case ?3 of
			{
			1: {
				x:=(x+X1)/2
				y:=(y+Y1)/2
				}
			2:	{
				x:=(x+X2)/2
				y:=(y+Y2)/2
				}
			3:	{
				x:=(x+X3)/2
				y:=(y+Y3)/2
				}
			}
		DrawPoint(x,y)
		}
end
Attachments
Sierpinsky.png
(17.13 KiB) Downloaded 344 times
clipping.png
(19.35 KiB) Downloaded 357 times
fonts.png
(8.25 KiB) Downloaded 356 times

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

width and height variable in svg

#47 Post by recobayu »

Hi Everyone, i very2 new in programming with svg. I want to make a background that can be full screen. but i can't change the variable WIDTH and HEIGHT in my script. this is my script:

Code: Select all


#!/bin/sh
if [ -f startku.jpg ]; then
	rm startku.jpg
fi
USER=$HOSTNAME
RES=$(xrandr | grep "current" | cut -d 'c' -f1,3 | tr -cd 'x [:digit:]' | cut -d 'x' -f1,2) 
WIDTH=$(echo $RES | cut -d 'x' -f1,1) 
HEIGHT=$(echo $RES | cut -d 'x' -f2,3)
echo '
<svg version="1.1">
	<rect width="1366" height="768"
	style="fill:rgb(0,0,255)"/>
	<text >
	<tspan x="550" y="500" font-family="Open Sans" font-weight="bolder" font-size="100"
		fill="white" letter-spacing="-5">
		limuks
	</tspan>
	<tspan x="550" y="530" font-family="Open Sans" font-weight="lighter" font-size="30"
		fill="white">
		'"$USER"''"'"'s puppy linux
	</tspan>
	</text>

    
    <path stroke-dasharray="20,10,5,5,5,10" d="M5 60 215 0" />
	<circle cx="370" cy="100" r="12" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="350" cy="140" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="400" cy="110" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="410" cy="130" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="430" cy="120" r="2" fill="#6BADF6" style="fill-opacity:0.3"/>
	
	<circle cx="300" cy="110" r="40" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="300" cy="110" r="33" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="300" cy="110" r="21" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="700" cy="100" r="80" fill="#6BADF6" style="fill-opacity:0.2"/>
	<circle cx="700" cy="100" r="60" fill="#6BADF6" style="fill-opacity:0.2"/>
	<circle cx="700" cy="100" r="40" fill="#6BADF6" style="fill-opacity:0.2"/>
	<circle cx="700" cy="100" r="20" fill="#6BADF6" style="fill-opacity:0.2"/>

	<circle cx="1000" cy="150" r="100" fill="#6BADF6" style="fill-opacity:0.2"/>
	<circle cx="1000" cy="150" r="80" fill="#6BADF6" style="fill-opacity:0.2"/>
	<circle cx="1000" cy="150" r="60" fill="#6BADF6" style="fill-opacity:0.2"/>
	<circle cx="1000" cy="150" r="45" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1000" cy="150" r="30" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1000" cy="150" r="15" fill="#6BADF6" style="fill-opacity:0.5"/>
	
	<circle cx="300" cy="700" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="300" cy="700" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="300" cy="700" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="400" cy="710" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="400" cy="710" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="400" cy="710" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="500" cy="730" r="30" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="500" cy="730" r="23" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="500" cy="730" r="16" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="640" cy="700" r="30" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="640" cy="700" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="640" cy="700" r="7" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="700" cy="680" r="30" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="700" cy="680" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="700" cy="680" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="900" cy="720" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="900" cy="720" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="900" cy="720" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="935" cy="700" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="935" cy="700" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="935" cy="700" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="1000" cy="680" r="30" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1000" cy="680" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1000" cy="680" r="15" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1000" cy="680" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="1050" cy="710" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1050" cy="710" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1050" cy="710" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="1100" cy="735" r="20" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1100" cy="735" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1100" cy="735" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>

	<circle cx="1200" cy="730" r="20" fill="#6BADF6" style="fill-opacity:0.5"/>
	<circle cx="1200" cy="730" r="10" fill="#6BADF6" style="fill-opacity:0.3"/>
	<circle cx="1200" cy="730" r="5" fill="#6BADF6" style="fill-opacity:0.3"/>
</svg>' > startku.jpg
if [ -f /usr/share/backgrounds/startku.jpg ]; then
	rm /usr/share/backgrounds/startku.jpg
fi
cp startku.jpg /usr/share/backgrounds/startku.jpg&
wallpaper /usr/share/backgrounds/startku.jpg&
defaultimageviewer startku.jpg
The variable USER can reference to $HOSTNAME, but why WIDTH and HEIGHT can't?
How to solve my problem?
Thank you.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#48 Post by technosaurus »

you need to set width and height in the svg tag as in this post:
http://murga-linux.com/puppy/viewtopic. ... 581#674581

edit: and its not a jpg

edit2:and you arent using the HEIGHT and WIDTH variables anywhere
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#49 Post by recobayu »

thank you technosaurus,
i mean the width and height is at rectangle
if i change

Code: Select all

<rect width="1366" height="768"
	style="fill:rgb(0,0,255)"/>
with

Code: Select all

<rect width="'$WIDTH'" height="'$HEIGHT'"
	style="fill:rgb(0,0,255)"/>
i don't see any rectangle. just black screen with text and circle.
i looked at this thread:
http://murga-linux.com/puppy/viewtopic. ... 253#647253
and you can use $BACKGROUND variable in the svg's script. but why in my script don't work?
thank you

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#50 Post by technosaurus »

probably because it is the size of your screen. you can make it any size and it will stretch to fill the window if you have the right aspect ratio. removing the title bar is different though, depends on wm settings or modifying the source code
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

[SOLVED]

#51 Post by recobayu »

I got it. I'm sorry, i know what is the problem. My mistake is the delimiter. the code before is:

Code: Select all

WIDTH=$(echo $RES | cut -d 'x' -f1,1) 
 HEIGHT=$(echo $RES | cut -d 'x' -f2,3)
and it should be

Code: Select all

WIDTH=$(echo $RES | cut -d ' ' -f1,1) 
 HEIGHT=$(echo $RES | cut -d ' ' -f3,3)
i realized this after i copy the echo code to a plain text and i got 'space' in $WIDTH. so the $WIDTH="1366 " and $HEIGHT=" 768". That's why rectangle didn't appear. [/code]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#52 Post by technosaurus »

oK, Too many people have needed this info to have to keep having to hack together an ugly set of sed/grep/tr/cut pipes, so I wrote a helper app in C

Code: Select all

# displayinfo
XWIDTH=1280
XHEIGHT=800
XDEPTH=24
#
time on the static version is ~.002s while the shared version is ~.004s

so to use it in a script just
eval `displayinfo`
echo $XHEIGHT

The attached tarball contains a both a shared and static binary as well as the source code - consider it public domain.

P.S. I may add this to pupngo's xwin/startx via setenv so that the variables are always available.

Edit: if you want something faster without having to install anything

Code: Select all

xwininfo -root 2>&1|awk 'BEGIN{FS=" |x"}/geometry/{split($5,height,"+");print "width=" $4 "\nheight=" height[1]}'
its time is ~0.008s vs xrandr's 1.100s, so much better than xrandr and not _too_ much worse than my little helper
Attachments
displayinfo.tar.gz
shared version is 3kb, static version is 57kb &amp; source is included
(34.83 KiB) Downloaded 312 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#53 Post by seaside »

technosaurus,

Have you abandoned bash? :D

Code: Select all

eval `xwininfo -root|while read LINE ; do 
 case $LINE in   
     Width*) echo ${LINE/: /=};;     
     Height*) echo ${LINE/: /=};;   
      esac;
 done`
0m0.008s and the Width, Height variables are set.

Regards,
s

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#54 Post by technosaurus »

nope, I just missed those lines due to the size of my terminal

Edit: here is a shell version

Code: Select all

displayinfo(){
xwininfo -root|while read VAR VALUE; do
case $VAR in
    Height:)echo XHEIGHT=$VALUE;;
    Width:)echo XWIDTH=$VALUE;;
    Depth:)echo XDEPTH=$VALUE;;
esac
done
}
#read can read multiple variables and separates them at $IFS
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
linuph
Posts: 128
Joined: Mon 04 Jun 2012, 02:29
Location: Philippines

#55 Post by linuph »

Nice and good programming exercise!

Seaside, no output, but without eval it works:

Code: Select all

#!/bin/sh
xwininfo -root | while read LINE; do
  case $LINE in
    Width*) echo ${LINE/: /=};;
    Height*) echo ${LINE/: /=};;
  esac;
done
real user sys
0.037s 0.010s 0.007s

technosaurus's awk :
real user sys
0.036s 0.007s 0.007s

xrandr doesn't seem THAT slow if done like this:

Code: Select all

#!/bin/sh
xrandr | awk '/*/{split($1,res,"x");print "width="res[1]"\nheight="res[2]}'
real user sys
0.109s 0.010s 0.007s

technosaurus' Displayinfo:
real user sys
0.025s 0.000s 0.013s

techosaurus' Displayinfo-static:
real user sys
0.004s 0.000 0.000

technosaurus' C routines are, of course, the clear winner, timing wise. But is's not quite fair, because the C-routines also print the color depth.

So, lastly, a very short awk routine that also prints the color depth:

Code: Select all

#/bin/sh
xwinfo -root | awk '{ if( NR>7 && NR<11) print $1$2; next }'
real user sys
0.023s 0.007s 0.003s

Timing varies a bit depending on what the system is doing at that point.

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#56 Post by recobayu »

linuph wrote:

Code: Select all

#!/bin/sh
xwininfo -root | while read LINE; do
  case $LINE in
    Width*) echo ${LINE/: /=};;
    Height*) echo ${LINE/: /=};;
  esac;
done

Code: Select all

#!/bin/sh
xrandr | awk '/*/{split($1,res,"x");print "width="res[1]"\nheight="res[2]}'

Code: Select all

#/bin/sh
xwininfo -root | awk '{ if( NR>7 && NR<11) print $1$2; next }'
I'm sorry to ask again.
All of that code can showing an output about WIDTH, HEIGHT, and DEPTH. but then when i write echo $HEIGHT or echo $XWIDTH, it doesn't appear anything. I'm still very2 new in programming. How to save to a variable?
Thanks in advance.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#57 Post by L18L »

recobayu wrote:...All of that code can showing an output about WIDTH, HEIGHT, and DEPTH. but then when i write echo $HEIGHT or echo $XWIDTH, it doesn't appear anything. I'm still very2 new in programming. How to save to a variable?
Thanks in advance.
try

Code: Select all

WIDTH=`xwininfo -root  | awk '{ if( NR==8) print $2; next }'   `
or

Code: Select all

WIDTH=`xrandr 2>/dev/null | awk '/*/{split($1,res,"x");print res[1]}'`

User avatar
linuph
Posts: 128
Joined: Mon 04 Jun 2012, 02:29
Location: Philippines

#58 Post by linuph »

These scripts have a name (not shown here). So, if you type the script name in a terminal it will output to screen.

To save the output as a variable, follow L18L's suggestion. If you want to see that variable, you have to type 'echo <variable name>' in a terminal.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#59 Post by technosaurus »

I explained this in the same post that has the displayinfo tarball but I reiterate
when the output is in VAR=VALUE format all you have to do is:
eval `the_function...` #those are back ticks
or
eval $(the_function ...)
or
you may even be able to leave off the eval
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
linuph
Posts: 128
Joined: Mon 04 Jun 2012, 02:29
Location: Philippines

#60 Post by linuph »

I believe that $(....) is preferred in stead of back ticks `....`. Am I correct?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#61 Post by technosaurus »

for readability, not for posix compliance. If you want it to work in a posix sh or possibly with bash in posix mode, you need to use backticks as they work in all posix compliant shells. That being said, most shells currently in wide use do recognize $(...) ... using backticks is kind of like writing a current web page to support ie6 and netscape ... or just to save 1 byte in an obfuscated shell contest if they had those.

As we have kinda gotten off topic anyways, there was a topic on slashdot recently on what software the open source community needs, and immediately a presentation tool came to mind.

Is anyone up for taking the game framework and making it into a lightweight presentation tool? SVG already has 99% of the capability and since the flow control is separate the rest (audio and video) could use external apps like aplay and mplayer (or equivalents)... if so start a separate thread and I'll help out as much as I can.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#62 Post by seaside »

recobayu wrote:
linuph wrote:
I'm sorry to ask again.
All of that code can showing an output about WIDTH, HEIGHT, and DEPTH. but then when i write echo $HEIGHT or echo $XWIDTH, it doesn't appear anything. I'm still very2 new in programming. How to save to a variable?
Thanks in advance.
recobayu

You set the variables by using "eval" as below-

Code: Select all

eval `xwininfo -root|while read LINE ; do
 case $LINE in   
     Width*) echo ${LINE/: /=};;     
     Height*) echo ${LINE/: /=};;   
      esac;
 done` 

Code: Select all

# echo $Width
1366
# echo $Height
768
# 
You can also do that with the other examples by placing "eval" in front and enclosing the following commands in either backticks ` or parens $(commands here).

An example of "eval" works like this in a terminal -

Code: Select all

# var=t=5
# echo $var
t=5
# echo $t

# $var
bash: t=5: command not found
# eval $var
# echo $t
5
#
Cheers,
s

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#63 Post by recobayu »

Ok. I'm very appreciate to all of you. Thank you very much. :D
This is what I have now. I make a little start screen was called PupStart

Code: Select all

#!/bin/sh
funcbtnwide() {
	echo '<button width-request="150" height-request="75" homogeneous="true" image-position="Top">
			<label>'$1'</label>
			<variable>btn'$1'</variable>					
			<input file>'$2'</input>
			<height>50</height>
			<action>'$3'&</action>
			<action>EXIT:sure</action>
		</button>'
}
funcbtnnormal() {
	echo '
		<button width-request="75" height-request="75" homogeneous="true" image-position="Top">
			<label>'$1'</label>
			<variable>btn'$1'</variable>					
			<input file>'$2'</input>
			<height>50</height>
			<action>'$3'&</action>
			<action>EXIT:sure</action>
		</button>'
}

echo 'style "os50" 
{ 
  font_name="Segoe UI Light 20"  
  
} 
widget "*os50ku" style "os50" 
class "GtkText*" style "os50"' > /tmp/gtkrc_os50 

export GTK2_RC_FILES=/tmp/gtkrc_os50:/root/.gtkrc-2.0



midi=/root/puppy-reference/midi-icons
pixmaps=/root/puppy-reference/pixmaps
eval `xwininfo -root|while read LINE ; do 
 case $LINE in    
     Width*) echo ${LINE/: /=};;      
     Height*) echo ${LINE/: /=};;    
      esac; 
 done`
export MAIN_DIALOG='
<window title="Startmenu" height-request="'$Height'" width-request="'$Width'" resizable="true" decorated="false" window_position="1">
	<vbox border-width="0">
		<text width-chars="40" height-request="20"><label>""</label></text>
		
		<hbox>
			<text name="os50ku" use-markup="true"><label>"<span color='"'white'"' size='"'medium'"'>'"$HOSTNAME"'</span>"</label></text>
			<button relief="2">
				<input file>'$midi/contact48.png'</input>
				<height>20</height>
				<width>20</width>
			</button>
		</hbox>
		<text name="os50ku" xalign="0" use-markup="true"><label>"<span size='"'xx-large'"' color='"'white'"'>PupStart</span>"</label></text>
		<text height-request="20"><label>""</label></text> 
		<frame>
		<hbox scrollable="true" vscrollbar-policy="1">
		  <vbox>
			<text name="os50ku" use-markup="true"><label>"<span color='"'black'"' size='"'large'"'>Desktop</span>"</label></text>
			<hseparator></hseparator>
			<hbox>
			<vbox homogeneous="false" >
				'"$(funcbtnwide Desktop $midi/pc48.png EXIT:sure)"'
				'"$(funcbtnwide 'Jwm Config' $midi/setup48.png jwmconfig)"'
				'"$(funcbtnwide 'GTK Theme' $midi/setup48.png defaultwordprocessor)"'
				'"$(funcbtnwide Wallpaper $pixmaps/wallpaper.png wallpaper)"'
				
			</vbox>
			<vbox homogeneous="false" >
				'"$(funcbtnwide Console $midi/console48.png urxvt)"'
				'"$(funcbtnwide Explore $midi/folder48.png rox)"'
				'"$(funcbtnwide Pmount $midi/drive48.png pmount)"'
				'"$(funcbtnwide Internet $midi/www48.png defaultbrowser)"'
			</vbox>
			</hbox>
		  </vbox>
		  <text width-request="2"><label>""</label></text>
		  <vbox>
			<text name="os50ku" use-markup="true"><label>"<span color='"'black'"' size='"'large'"'>System</span>"</label></text>
			<hseparator></hseparator>
			<hbox>
			<vbox homogeneous="false" >
				'"$(funcbtnwide Geany $midi/edit48.png geany)"'
				<hbox>'"$(funcbtnnormal Paint $midi/paint48.png mtpaint)"'
				'"$(funcbtnnormal Draw $midi/draw48.png inkscape)"'</hbox>
				<hbox>'"$(funcbtnnormal Word $midi/word48.png defaultwordprocessor)"'
				'"$(funcbtnnormal Excel $midi/spread48.png defaultspreadsheet)"'</hbox>
				'"$(funcbtnwide Notecase $midi/edit48.png notecase)"'
			</vbox>
			<vbox homogeneous="false">
				<hbox>
				'"$(funcbtnnormal 'Alsa Mixer' $midi/multimedia48.png 'rxvt -e alsamixer')"'
				'"$(funcbtnnormal 'New Mixer' $midi/multimedia48.png gnome-alsamixer)"'
				</hbox>
				<hbox>
				'"$(funcbtnnormal Mplayer $midi/multimedia48.png gnome-mplayer)"'
				'"$(funcbtnnormal Pmusic /usr/local/pmusic/pmusic20.png pmusic)"'
				</hbox>
				'"$(funcbtnwide Equalizer /usr/share/icons/hicolor/24x24/apps/eq.png pequalizer)"'
				'"$(funcbtnwide Kamera $midi/camera48.png guvcview)"'
			</vbox>
			</hbox>
		  </vbox>
		  <text name="os50ku" width-request="2"><label>""</label></text>
		  <vbox>
			<text name="os50ku" use-markup="true"><label>"<span color='"'black'"' size='"'large'"'>Graphic</span>"</label></text>
			<hseparator></hseparator>
			<hbox>
			<vbox homogeneous="false">
				<hbox>
				'"$(funcbtnnormal Pburn $midi/optical48.png pburn)"'
				'"$(funcbtnnormal 'Wave Editor' $pixmaps/mhwaveedit.xpm mhwaveedit)"'
				</hbox>
				'"$(funcbtnwide Wallpaper $midi/pc48.png wallpaper)"'
				'"$(funcbtnwide Kamera $midi/camera48.png guvcview)"'
				'"$(funcbtnwide Kamera $midi/camera48.png guvcview)"'
			</vbox>
			<vbox homogeneous="false" >
				'"$(funcbtnwide Explorer $midi/folder48.png rox)"'
				<hbox>'"$(funcbtnnormal Word $midi/word48.png defaultwordprocessor)"'
				'"$(funcbtnnormal Excel $midi/spread48.png defaultspreadsheet)"'</hbox>
				'"$(funcbtnwide Desktop $midi/pc48.png EXIT:sure)"'
				'"$(funcbtnwide Desktop $midi/pc48.png EXIT:sure)"'
			</vbox>
			</hbox>
		  </vbox>
		  <text width-request="2"><label>""</label></text>
		  <vbox>
			<text name="os50ku" use-markup="true"><label>"<span color='"'black'"' size='"'large'"'>Document</span>"</label></text>
			<hseparator></hseparator>
			<hbox>
			<vbox homogeneous="false">
				<hbox>
				'"$(funcbtnnormal Alsa $midi/multimedia48.png 'rxvt -e alsamixer')"'
				'"$(funcbtnnormal Jwm $midi/setup48.png jwmconfig)"'
				</hbox>
				'"$(funcbtnwide Wallpaper $midi/pc48.png wallpaper)"'
				'"$(funcbtnwide Kamera $midi/camera48.png guvcview)"'
				'"$(funcbtnwide Kamera $midi/camera48.png guvcview)"'
			</vbox>
			<vbox homogeneous="false" >
				'"$(funcbtnwide Explorer $midi/folder48.png rox)"'
				<hbox>'"$(funcbtnnormal Word $midi/word48.png defaultwordprocessor)"'
				'"$(funcbtnnormal Excel $midi/spread48.png defaultspreadsheet)"'</hbox>
				'"$(funcbtnwide Desktop $midi/pc48.png EXIT:sure)"'
				'"$(funcbtnwide Desktop $midi/pc48.png EXIT:sure)"'
			</vbox>
			</hbox>
		  </vbox>
		  <text width-request="2"><label>""</label></text>
		  <vbox>
			<text name="os50ku" use-markup="true"><label>"<span color='"'black'"' size='"'large'"'>Multimedia</span>"</label></text>
			<hseparator></hseparator>
			<hbox>
			<vbox homogeneous="false" >
				'"$(funcbtnwide Explorer $midi/folder48.png rox)"'
				'"$(funcbtnwide Word $midi/word48.png defaultwordprocessor)"'
				'"$(funcbtnwide Desktop $midi/pc48.png EXIT:sure)"'
			</vbox>
			</hbox>
		  </vbox>
		</hbox>
		</frame>
		<hbox homogeneous="true">
			<button ok></button>
		</hbox>
		<text width-chars="40" height-request="140"><label>""</label></text>
	</vbox>
</window>
'
case $1 in
	-d | --dump) echo "$MAIN_DIALOG" ;;
	*) gtkdialog --program=MAIN_DIALOG --gtk-module=gtk2desklet ;;
esac
if you choose my gtktheme, maybe it's just a little different with the real metro.
http://murga-linux.com/puppy/viewtopic. ... 393#671393

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#64 Post by technosaurus »

I was getting ready to work on some svg icons and came across this old thread of mine. Is anyone using this? If so what updates/improvements would you like to see?

Background:
I was getting back to work on my jwm-tools and it became blatantly obvious that puppy was severely lacking a standards compliant icon set. (I was having to go all over the filesystem to get appropriate icons that may still not be in other puppy versions)... So I decided that I would design a set of flat-ish theme-able svg icons.

I've already done some svg work here:
http://murga-linux.com/puppy/viewtopic. ... 323#635323
http://murga-linux.com/puppy/viewtopic. ... 250#836250
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply