Page 4 of 5

Posted: Sun 12 Oct 2008, 18:37
by alienjeff
@HairyWill

First, that's not Puppy. It's Arch 2008.6 i686 running on my HP Kayak XU-800. Arch has supported SMP for quite some time.

The RAM and swap bar graphs are for memory in use. The Kayak sports 1G of RAM. As for the 235MB figure, that's with a crapload of things running, including Firefox 3 with well over a dozen tabs open. And I have yet to use swap space since using Arch. On the same box running Puppy, swap usage, though not frequent, was often enough for me to question the manner in which the kernel was compiled.

The weather, uh ... "thingie" (to coin a Kaulerism) is an experiment, XSL lesson, and frivolous little extra which adds insignificant CPU load.

Matt's Draft House is nestled in the little village of Inlet, NY, near where I camp every September.

Sleep? What's sleep? I only nap.

re: Conky transparency

Posted: Mon 13 Oct 2008, 20:24
by wilson
Hi, this is a follow-up to aussierod's great posts regarding transparency for Conky. This post shows another way I have found to deal with the transparency issue, and works well when you change the wallpaper/background a lot. Sorry in advance for the length, I have to talk it out or I doubt it would make sense, as I am not by any stretch a real programmer. :wink:

Back in the 3.x versions of puppy, I had read on this forum that the following lines in .xinitrc loaded Conky at startup and allowed transparency:

Code: Select all

qiv -z /root/Choices/ROX-background.jpg
conky -d & 
It worked just fine.

When I changed to puppy 4.0, I noticed this no longer worked to achieve transparency. As WolfPup noted in an earlier post on the first page of this topic, qiv is not pre-installed on Puppy 4.x, but can be added via a .pet file.
I added qiv, but still didn't get transparency.

I then found that there was a new program in Puppy 4.x for changing the wallpaper/background under Menu>Desktop>Wallpaper setter. After some research I found that changing the wallpaper/background using this program does not affect /root/Choices/ROX-background.jpg as the previous wallpaper/background program had done. Further research found that the Wallpaper setter program writes the current wallpaper/background choice to the file /root/.config/tmp/bg_img.

Using this information, I changed the additional lines in .xinitrc to the following:

Code: Select all

qiv -z -F /root/.config/tmp/bg_img
conky -d & 
After adding the two lines to .xinitrc and restarting X (Menu>Shutdown>Restart X server), I had transparency, finally.

The -z in the qiv line above stretches the image on the background. Qiv has the nice -F option that allows it to read file names from text in a file, thereby allowing it to read the current wallpaper/background image choice from the /root/.config/tmp/bg_img file. I was not able to find an equivalent for xli, which meant qiv was necessary to get this solution to work. So I kept the qiv line instead of using xli as is currently suggested towards the beginning of this topic.

If anyone knows how to have xli read text from the file /root/.config/tmp/bg_img, or if I am just totally confusing this, please let me know.

For those who don't know, to add the new lines to .xinitrc, open the program Geany (Menu>Document>Geany text editor), then use Geany to open the file /root/.xinitrc, and add the new lines above the line "#exec $CURRENTWM". Save the changed file as /root/.xinitrc, then restart X. You will have to add the qiv .pet if you have not already done so, this will need to be done before you restart X for the new lines to work properly. Keep in mind that restarting X will close any windows you may have open, so make sure you have saved anything important.

**************************

OK, so I had transparency. But I like to switch between backgrounds a lot, being a shutterbug with lots of pictures and what must be a mild form of background-viewing ADHD. I began to wonder if there was a better way to change the background and keep Conky in step than having to restart X each time. I did some more research on the Wallpaper setter program in Puppy 4.x, and came up with this solution.

The main work for the Wallpaper setter program appears to occur through the file /usr/local/apps/System/Wallpaper/AppRun. In the AppRun file I added three action lines to the "Apply" button for the Wallpaper setter program. The lines basically 1) stop any Conkys currently running, 2) start qiv with the newly chosen wallpaper/background and then 3) restart Conky. The three lines are similar to those posted earlier in this topic for another use under Puppy 3.x, as follows:

Code: Select all

<action>killall conky</action>
<action>qiv -z -F /root/.config/tmp/bg_img</action>
<action>conky</action>
The addition of these lines in the AppRun file goes under the actions for the Apply button in the Wallpaper setter program. The place is towards the bottom of the AppRun file directly after the program writes the wallpaper/background selection to /root/.config/tmp/bg_img, as follows:

Code: Select all

<button>
      <label>Apply</label>
      <input file stock=\"gtk-apply\"></input>
      <action>$APPDIR/set_bg \"\$IMAGE\"</action>
      <action>echo \"\$IMAGE\" > \$HOME/.config/tmp/bg_img</action>

      <action>killall conky</action>
      <action>qiv -z -F /root/.config/tmp/bg_img</action>
      <action>conky</action>

      <action type=\"refresh\">TEXT</action>
     </button>
Before you add these lines, it would be good to backup the file /usr/local apps/System/Wallpaper/Apprun to something like ApprunOriginal just in case anything goes wrong. To add the new lines, open the program Geany (Menu>Document>Geany text editor), then use Geany to open the file /usr/local apps/System/Wallpaper/Apprun. Add the three new lines as shown above, then restart X (Menu>Shutdown>Restart X server).

Once you have restarted X, you should be able to go in to the Wallpaper setter program and change your wallpaper/background as often as desired, and Conky will re-load with the appropriate wallpaper/background in transparent mode each time. Or it should. I hope it does. Let me know if it doesn't. And remember, this should not be necessary unless you are using Puppy 4.x. Oh, and I haven't tried it on anything but 4.0, so bear that in mind. Yeah, backing up your files might not be a bad idea at all.

For all those I have confused terribly, or bored silly, my sincere apologies. :lol:

Posted: Tue 14 Oct 2008, 19:06
by DC
Nvidia GPU temperature
for those of you who have a Nvidia graphic card and have the Nvidia drivers installed
drivers - http://www.murga-linux.com/puppy/viewtopic.php?t=34001

here's the code for conky .conkyrc (borrowed from Fedora forum)

Code: Select all

${color orange}   GPU Temp: $color ${execi 30 nvidia-settings -q gpucoretemp | grep '):' | awk '{print $4}' | cut -c -2} degC
It works for me in
Puppy 4.1 - 2.6.25.16 with a GeForce 6600 GT card. Don't know if it works with all cards or not.

DC

P.S. please don't ask me to explain the code, I can't :?

Posted: Sat 18 Oct 2008, 16:48
by DC
Hi,
The Conky site faq says you can have more than one instance of Conky running.
It works from the command line ok
# conky -c config1 or conky -c -config2

Can somebody tell me how to get both running at the same time and both to auto start at the same time.

thanks

DC

Why two ? - top right of screen - CPU,MoBo, GPU, HDD temperatures
bottom right of screen - weather forecast

Posted: Sat 18 Oct 2008, 18:17
by alienjeff
DC wrote:Why two ? - top right of screen - CPU,MoBo, GPU, HDD temperatures bottom right of screen - weather forecast
You don't need two instances of conky running to accomplish what you've just described. FYI, I run mine from ~/.xinitrc just before starting my window manager. YMMV.

In your .conkyrc file and below the "TEXT" portion, when editing just stick the necessary number of "carriage returns" between the HW configuration code and the weather forecast code.

Here's an example:

Code: Select all

TEXT
${color4}F1 - ${color9}email     |     ${color4}F2 - ${color9}browse     |     ${color4}F3 - ${color9}edit     |     ${color4}F4 - ${color9}term     |     ${color4}F5 - ${color9}IRC     |     ${color4}F6 - ${color9}rox     |     ${color4}F12 - ${color9}gxine


${color4}user/node: ${color8}${exec whoami}@$nodename
${color4}load: ${color8}$loadavg
${color4}uptime: ${color8}$uptime

${cpugraph cpu1 21,128 ff0000 33ff00}
${offset 10}CPU 1 - ${cpu cpu1}%
${cpugraph cpu2 21,128 ff0000 33ff00}
${offset 10}CPU 2 - ${cpu cpu2}%
${downspeedgraph eth0 21,128 ff0000 33ff00}  
${offset 10}eth0 down: ${downspeed eth0} k/s
${upspeedgraph eth0 21,128 ff0000 33ff00}
${offset 10}eth0 up: ${upspeed eth0} k/s

${membar 6,128}
${offset 10}RAM: $mem

${swapbar 6,128}
${offset 10}swap: $swap






${execi 300 /home/jeff/weather/06098.sh}

${execi 300 /home/jeff/weather/13360.sh}
Then fiddle with text alignment and gap (and possibly font size) for your particular monitor screen and conky display.

Code: Select all

# Text alignment
alignment top_left

# Gap between borders of screen and text
gap_x 1
gap_y 1
Be patient as it's a bit of trial and error. You can open a console/terminal and use the commands "killall conky" and "conky &" to avoid having to reboot each time you want to test a new/tweaked configuration.

Posted: Sat 18 Oct 2008, 18:36
by DC
Hi alienjeff,
In your .conkyrc file and below the "TEXT" portion, when editing just stick the necessary number of "carriage returns" between the HW configuration code and the weather forecast code.
does'nt that make the space between the two displays not usable?
and I was thinking of other things in the other two corners - conky -c config3 works as well


DC

two conkys

Posted: Sat 18 Oct 2008, 18:36
by wilson
Hi Jeff, DC. You know Jeff, "carriage returns" - that's a lot more intelligent than what I was going through.

Well, just for fun, this worked for me. My main config file is .conkyrc (set in the upper left) and I made a copy called .conkyrca (set in the bottom left). I then put the following lines in to .xinitrc:

Code: Select all

conky -d  
conky -d -c .conkyrca
I restarted x and both Conkys came up.

By the way, everyone should ignore my post from 10/13, I loaded a fresh frugal Puppy 4.10 on my system and found my instructions/assumptions/understanding to have been flawed. Back to the drawing board...

Posted: Sat 18 Oct 2008, 18:47
by sideburns
does'nt that make the space between the two displays not usable?
DC
Of course not. Conky writes to the root window, making it, in effect, part of your wallpaper. Any other window you open will, if needed, go right on top of it.

Posted: Sat 18 Oct 2008, 18:49
by alienjeff
DC wrote: does'nt that make the space between the two displays not usable?
Only if you're using Conky with "own_window yes" - otherwise, no.
and I was thinking of other things in the other two corners - conky -c config3 works as well
You didn't mention that before, though you could accomplish that without having two instances of Conky running, though it would be tricky to set up.

Posted: Sat 18 Oct 2008, 20:13
by DC
In the end it was easy

made a script file - conkyboot.sh
with

#!/bin/bash
conky -d -c config2
conky -d -c config3


and put it in /root/startup

seems to works fine. One advantage of seperate conky windows is they are different sizes and are only as big as required.

DC

Posted: Sat 18 Oct 2008, 20:31
by alienjeff
DC wrote:One advantage of seperate conky windows is they are different sizes and are only as big as required.
Astute observation and excellent point! Thanks.

Posted: Tue 21 Oct 2008, 16:59
by zigbert
I'm trying to get a transparent conky in Puppy 4.1.

When installing qiv, I get the message that missing requirements are: Gkt-1.2.

Do I really have to install Gtk-1.2 ???

Sigmund

Posted: Tue 21 Oct 2008, 19:35
by zigbert
Okay, I didn't need qiv. xli did the job.

Posted: Sun 07 Dec 2008, 08:02
by wosifat
Looking at http://conky.sourceforge.net, I see that it's possible to show info on what song is currently playing in the media player, but when I tried all I can get is "MPD: 0:00 ".
I notice that it says, "must be enabled at compile." Is it, and if not, how can I, and how hard would it be?

Posted: Thu 25 Dec 2008, 08:02
by Evil20071
No clue, but I'd like to see that one pop up. Get Pwidgets (Spelling).

Posted: Thu 25 Dec 2008, 08:31
by 01micko
wosifat wrote:Looking at http://conky.sourceforge.net, I see that it's possible to show info on what song is currently playing in the media player, but when I tried all I can get is "MPD: 0:00 ".
I notice that it says, "must be enabled at compile." Is it, and if not, how can I, and how hard would it be?
Interesting idea for a widget. Maybe could get Pmusic shrunken and integrated into Pwidgets, Hmmmmmmmm...... :wink:

Posted: Thu 25 Dec 2008, 09:08
by zigbert
Pmusic keeps info about:
- Songname in /root/.pmusic/pmusic-ffmpeg_NOW_PLAYING
- Time in /root/.pmusic/pmusic-OLD_TIME

OLD_TIME is not really old. Most often 1 second behind. I could send the actual time to another file, but does it really matter ?

Posted: Fri 26 Dec 2008, 02:29
by wow
Image

This is how I added pmusic's info to conky in my puplet(lines from my conkyrc file):

Code: Select all

${if_existing /usr/bin/pmusic_conky.sh}
Pmusic ${execi 10 pmusic_conky.sh version} $alignr${execi 2 pmusic_conky.sh progress}%
${scroll 33 ${execi 3 pmusic_conky.sh info}}
${execibar 2 pmusic_conky.sh progress}
It takes info from an script. Copy and paste the whole code to a terminal window to create it:

Code: Select all

cat > /usr/bin/pmusic_conky.sh << "EOF" 
#!/bin/sh
WORKDIR="$HOME/.pmusic/tmp"
SONG="add music to playlist..."
TIME="..."
BITRATE="..."
PERCENT="0"
VERSION="...waiting..."

if [ -d $WORKDIR ];then
   if [  -f $HOME/.pmusic/pmusicrc ];then
      VERSION=`cat $HOME/.pmusic/pmusicrc | grep VERSION | sed 's/export VERSION=//g'`
   fi
   if [ "`cat $WORKDIR/pmusic-stop`" = "true" ];then
      SONG="press the play button"
   else
      if [ -f $WORKDIR/pmusic-ffmpeg_NOW_PLAYING ];then
         SONG=`cat $WORKDIR/pmusic-ffmpeg_NOW_PLAYING | head -n 1`
      fi
      if [ -f $WORKDIR/pmusic-ffmpeg_output ];then
         cat $WORKDIR/pmusic-ffmpeg_output | grep bitrate | head -n 1| sed -e 's/: /=/g' | sed -e 's/, /\n/g' | sed -e 's/ //g' | sed -e 's/00://g'> $WORKDIR/my_conky_info.txt
         . $WORKDIR/my_conky_info.txt
         BITRATE=$bitrate
         TIME=$Duration
      fi
      if [  -f $WORKDIR/pmusic-PERCENT_BAR ];then
         PERCENT=`cat $HOME/.pmusic/tmp/pmusic-PERCENT_BAR | head -n 1`
      fi
   fi
fi

case "$1" in
    info)
        echo "$SONG  $TIME  $BITRATE   "
        ;;
    progress)
	echo $PERCENT
        ;;
    version)
	echo $VERSION
        ;;
    *)
        echo $"Usage: $0 {info|progress|version}"
        ;;
esac
EOF
chmod +x /usr/bin/pmusic_conky.sh

Don't use it if you have an old computer, feel free to improve it.

Posted: Fri 26 Dec 2008, 14:51
by wosifat
Groovy, but haven't really grown to like Pmusic much yet. Would it be too much to ask for one for VLC?

Posted: Sun 28 Dec 2008, 10:41
by DaveS
I have been following and using the info on this thread thanks, and a special thanks to those who take the trouble to post their config files. This is a huge help. But I am stuck now. Apparently, Conky can display the presence of unread emails using the 'new_mails' option, but I just cant figure out how to syntax it.
${colour grey}New Emails: $colour $new_mails
Stops conky from running, so I guess I am miles out. I guess a variable might be needed to tell conky where to look. I am using 4.1.1 Frugal. Can anyone help please?