Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 01 Sep 2014, 22:14
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
text2xpm in shell
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4348

PostPosted: Thu 29 Dec 2011, 18:21    Post subject:  

01micko wrote:
Ok, so I put this to actual use

Note the feature request.
that was exactly the kind of thing I had in mind when I wrote this. Things like partview, battview, tempview... Then I found out how to do the same thing in svg much easier, but it is still good for xcb/X11+xpm only apps I guess.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7796
Location: qld

PostPosted: Tue 03 Jan 2012, 15:31    Post subject:  

Another one,

cpuicon

There's a difference, no thread topic, this is just a link to the source code and support files including a build script.

You could say I'm going a bit mad on tray icons! But I find them more useful than widgets or conky as I actually use them! They don't look fantastic but they are functional.

techno, care to share the svg knowledge?

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4348

PostPosted: Tue 03 Jan 2012, 23:38    Post subject:  

Try playing with this:
(save as <something>.svg and open with viewnior)
Code:
<svg>
  <rect width="100"
     height="50"
     x="0"
     y="0"
     style="font-size:12;fill:#0000ff;fill-opacity:0.75;fill-rule:evenodd;stroke-width:3pt;"
     id="rect1" />
  <rect
     width="50"
     height="50"
     x="0"
     y="0"
     style="font-size:12;fill:#ff00ff;fill-opacity:0.75;fill-rule:evenodd;stroke-width:3pt;"
     id="rect2" />
  <text
     x="0"
     y="50"
     style="font-size:12;font-weight:normal;fill-opacity:0.75;stroke-width:3pt;font-family:helvetica;"
     id="text1">
    <tspan
       id="tspan1">test</tspan>
  </text>
</svg>

you can add as many rectangles as you want, or you can save some svgS from inklite (uncompressed) for other shapes etc... (crap, now Iremember where I posted this before - it was in the project management / planner thread ... covered lines too)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Wed 04 Jan 2012, 07:16    Post subject:  

01micko wrote:
Another one,

cpuicon


You could also eliminate a folder with 100 xpms, etc, with a small tray icon that just toggles cpu-usage on and off in a small window when you need it.
cpu.png
 Description   
 Filesize   47.85 KB
 Viewed   300 Time(s)

cpu.png

Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4348

PostPosted: Wed 04 Jan 2012, 13:32    Post subject:  

this just requires echo and variables to generate svg
Code:
echo '<svg>
   <rect width="100" height="50" x="0" y="0" id="rect1" style="font-size:12;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke-width:3pt;"/>
   <rect width="50" height="50" x="0" y="0" id="rect2" style="font-size:12;fill:#ff00ff;fill-opacity:0.75;fill-rule:evenodd;stroke-width:3pt;"/>
   <ellipse cx="24" cy="24" rx="24" ry="24" style="font-size:12;fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke-width:3pt;"/>
   <ellipse cx="74" cy="24" rx="24" ry="24" style="font-size:12;fill:#00ff00;fill-opacity:0.75;fill-rule:evenodd;stroke-width:3pt;"/>
   <text x="12" y="25" id="text1" style="font-size:12;font-weight:normal;fill-opacity:0.75;stroke-width:3pt;font-family:helvetica;">test</text>
   <path d="M 50 25 L 100.0 25.0 " style="font-size:12;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;"/>
</svg>' >$FILE

simply edit the fixed parameters in place and then just replace the rest with single quoted variables. ex.

... width="50" .... becomes ... width="'${WIDTH}'" ...

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Thu 05 Jan 2012, 03:52    Post subject:  

cpu-usage with Eterm

wrapper (toggle from tray):
Code:

#/bin/sh

var="$(pidof cpu)"

if [ "$var" ]; then
  kill -9  "$var"
else
Eterm --trans --no-cursor --buttonBar no --scrollBar no -x -f WHITE -g 10x2+890+682 -e cpu &
fi
cpu.png
 Description   
 Filesize   29.7 KB
 Viewed   255 Time(s)

cpu.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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
[ Time: 0.0594s ][ Queries: 12 (0.0039s) ][ GZIP on ]