LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-18-2012, 10:38 PM   #1681
PatrickDickey
Member
 
Registered: Sep 2011
Location: Muscatine, IA
Distribution: Ubuntu variants (ubuntu/Mythbuntu) and Windows Home Server/Windows 7
Posts: 33

Rep: Reputation: Disabled

Quote:
Originally Posted by Habitual View Post
Can I have that code please?
I'd like that code also. I have a forecast on mine, but it doesn't even show the temps correctly.

Have a great day
Patrick.
 
Old 08-19-2012, 08:08 AM   #1682
shotswell21
LQ Newbie
 
Registered: Aug 2009
Posts: 16

Rep: Reputation: 6
Shotys, conky ans weather scripts

Quote:
Originally Posted by Habitual View Post
Can I have that code please?
1. create a folder in your home called .weather

2. Create a file called forcast.sh and paste the following

#!/bin/bash
# forecast.sh

if ping -c1 rss.wunderground.com 1>/dev/null
then
dump=$(curl -s 'http://rss.wunderground.com/auto/rss_full/OK/okc.xml?units=english' | tr -d '\r\n\t' | grep -o "CDATA\[[^]]*" | sed -e 's/^CDATA\[/\n/' -e 's/Pressure:/Pres:/' -e 's/Conditions:/Cond:/' -e 's/<[^>]*>//g' -e 's/ | /\n/g' -e 's/&deg;F/ F/' -e 's/ //' | fold -sw 50 | awk '/^$/ && !f{f=1;next}1')
#forecast=$(echo -en "$dump")
echo "$dump" > ~/.weather/weatherdump
else
forecast=$(echo -en "Forecast is Unavailable")
fi
echo "$forecast"


3. Create a file called getimage.sh and paste the following

#!/bin/bash
if ping -c1 rss.wunderground.com 1>/dev/null
then
iconloc=$(curl -s 'http://www.wunderground.com/US/OK/Will_Rogers_World.html' | grep "curIcon" | sed -e 's/<div[^<]*id="curIcon"*>//g' -e 's/<a[^>]*>//g' -e 's/<img src="//g' -e 's/.gif[^>]*>/.gif/g' -e 's/^[ \t]*//' | cut -d "<" -f1)
wget -q "$iconloc" -O ~/.weather/current.gif
wget -q http://i.imwx.com//web/radar/us_okc_..._plus_usen.jpg -O ~/.weather/radar.jpg
fi


Run it from conky by adding the following to .conkyrc

${execi 300 ~/.weather/getimage.sh}
${image ~/.weather/current.gif -p 180,740 -s 70x70}${image ~/.weather/radar.jpg -p 0,470 -s 350x236}


${texeci 300 ~/.weather/forcast.sh}
${texeci 300 cat ~/.weather/weatherdump}

you'll need the scripts above to be executable and you'll have to change the values to something that works for your location, unless your in OKC. I've also tried to attach the scripts to this post as well as my conkyrc. Note both scripts need to be in a folder called .weather under your home directory and need to be chmodded 755 so that conky can run them


Thanks! Shotsy
Attached Files
File Type: txt forcast.sh.txt (556 Bytes, 14 views)
File Type: txt getimage.sh.txt (437 Bytes, 9 views)
File Type: txt conkyrc.txt (2.6 KB, 10 views)

Last edited by shotswell21; 08-19-2012 at 08:16 AM. Reason: Addinng info
 
1 members found this post helpful.
Old 08-20-2012, 01:08 PM   #1683
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: ElementaryOS, Ubuntu LTS, Slackware
Posts: 1,497

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I've recently migrated my workhorse PC from Debian Squeeze + KDE4 to Slackware 13.37 + Xfce 4.8. I found my desktop quite sluggish and wanted something snappier while having all the needed apps for my daily work at my disposition. At the latest count, there's about 200 extra packages mostly from SBo, and I'm very happy with the result.
Attached Images
File Type: jpg slackware_desktop.jpg (259.8 KB, 219 views)
 
Old 08-22-2012, 09:34 PM   #1684
patostevens
Member
 
Registered: Dec 2007
Location: Kennewick,WA
Distribution: Slackware 14
Posts: 170

Rep: Reputation: 21
For some reason this conkyrc is not giving me a transparent window.
Code:
background		        yes
update_interval			1.0
double_buffer			yes

use_xft				yes
xftfont				Droid Sans:size=9
xftalpha			1

own_window			yes
own_window_transparent	        yes
own_window_argb_visual	        yes
own_window_type			override
own_window_class		conky
own_window_hints		undecorated,below,sticky,skip_taskbar,skip_pager

minimum_size			190 50
draw_shades			no
draw_outline			no
draw_borders			no
draw_graph_borders		no

default_color			white
default_shade_color		black
default_outline_color	        D8D8D8

alignment			top_left
gap_x				25
gap_y				0

no_buffers			yes

cpu_avg_samples			2

##############################################
#  Output
##############################################
TEXT
${hr 2}
${alignc}${execi 1 cat /etc/slackware-version}:
${alignc}${execi 1 lynx -dump http://slackware.osuosl.org/slackware64-13.37/ChangeLog.txt | head -1}
${hr 2}
#${alignc}SYSTEM
#${hr 1}

User: ${alignr}$alignc${exec whoami} @ $nodename
Kernel: ${alignr}$kernel ($machine)
Uptime: ${alignr}${uptime}
Time: ${alignr}${time %H:%M}
Date: ${alignr}${time %m %d %Y}
#${hr 1}
${alignc}CPU
#${hr 1}
Core 0:${alignr}${cpu cpu0}%                 ${freq_g cpu0} GHz
Core 1:${alignr}${cpu cpu1}%                 ${freq_g cpu1} GHz
Core 2:${alignr}${cpu cpu2}%                 ${freq_g cpu2} GHz
Core 3:${alignr}${cpu cpu3}%                 ${freq_g cpu3} GHz
${top name 1}${alignr}${top cpu 1}%
${top name 2}${alignr}${top cpu 2}%
${top name 3}${alignr}${top cpu 3}%
${top name 4}${alignr}${top cpu 4}%
${top name 5}${alignr}${top cpu 5}%
#${hr 1}
${alignc}MEMORY
#${hr 1}

RAM:  ${alignr}$mem  /  ${alignr}$memmax
SWAP: ${alignr}$swap  /  ${alignr}$swapmax
${top_mem name 1}${alignr}${top_mem mem 1}%
${top_mem name 2}${alignr}${top_mem mem 2}%
${top_mem name 3}${alignr}${top_mem mem 3}%
${top_mem name 4}${alignr}${top_mem mem 4}%
${top_mem name 5}${alignr}${top_mem mem 5}%
#${hr 1}
#${alignc}STORAGE
#${hr 1}
${alignc}HARD DISK
Filesystem:$alignr${fs_type}
${alignr}Used        Alloted
Root:${alignr}${fs_used /}     ${fs_size /}
Home:${alignr}${fs_used /home}     ${fs_size /home}
#Crap:${alignr}${fs_used /crap}     ${fs_size /crap}
#${hr 1}
${alignc}NETWORK
#${hr 1}
LAN:    $alignr${addr wlan0}
WAN:    $alignr${execi 600 wget http://checkip.dyndns.org/ -q -O - | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'}
U:   ${upspeed wlan0}${alignr}${totalup wlan0}
D:   ${downspeed wlan0}${alignr}${totaldown wlan0}
#${hr 1}
Any hints greatly appreciated.
 
Old 08-22-2012, 09:46 PM   #1685
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 527
Blog Entries: 3

Rep: Reputation: 126Reputation: 126
Change
Code:
own_window_type override
to
Code:
own_window_type desktop
 
Old 08-22-2012, 10:00 PM   #1686
patostevens
Member
 
Registered: Dec 2007
Location: Kennewick,WA
Distribution: Slackware 14
Posts: 170

Rep: Reputation: 21
Still not transparent - am cursed with a black background.
 
Old 08-22-2012, 10:18 PM   #1687
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 527
Blog Entries: 3

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by patostevens View Post
Still not transparent - am cursed with a black background.
Weird.. You killed conky and started it again right?
I was able to copy and paste your config and get transparency by changing that one line.

Which DE/WM are you using? Do you have compositing enabled?
From http://conky.sourceforge.net/docs.html
Quote:
own_window_argb_visual
Boolean, use ARGB visual? ARGB can be used for real transparency, note that a composite manager is required for real transparency. This option will not work as desired (in most cases) in conjunction with 'own_window_type override'.

Last edited by D1ver; 08-22-2012 at 10:18 PM. Reason: s/composting/compositing
 
Old 08-22-2012, 10:53 PM   #1688
patostevens
Member
 
Registered: Dec 2007
Location: Kennewick,WA
Distribution: Slackware 14
Posts: 170

Rep: Reputation: 21
I'm using fluxbox. Don't know how to tell if compositing is enabled. Other rc's do give give transparancy, but I'm not sure why. What about the 'default_shade_color black' line?
 
Old 08-22-2012, 11:19 PM   #1689
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 527
Blog Entries: 3

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by patostevens View Post
I'm using fluxbox. Don't know how to tell if compositing is enabled. Other rc's do give give transparancy, but I'm not sure why. What about the 'default_shade_color black' line?
Ok I think I've got it I changed into fluxbox this time to test it and with
Code:
own_window_argb_visual	        yes
own_window_type			desktop
In Xfce I get transparency, but in Fluxbox I get a black background.

However if I delete the 'own_window_argb_visual yes' line altogether and keep 'own_window_type desktop', it works!
So that section ends up looking like
Code:
background		        yes
update_interval			1.0
double_buffer			yes

use_xft				yes
xftfont				Droid Sans:size=9
xftalpha			1

own_window			yes
own_window_transparent	        yes

own_window_type			desktop
own_window_class		conky
own_window_hints		undecorated,below,sticky,skip_taskbar,skip_pager

Last edited by D1ver; 08-22-2012 at 11:21 PM.
 
1 members found this post helpful.
Old 08-22-2012, 11:31 PM   #1690
patostevens
Member
 
Registered: Dec 2007
Location: Kennewick,WA
Distribution: Slackware 14
Posts: 170

Rep: Reputation: 21
You sir, are a genius.
 
Old 08-22-2012, 11:58 PM   #1691
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 527
Blog Entries: 3

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by patostevens View Post
You sir, are a genius.
Less genius and more guess and check :P

Happy to help
 
Old 08-23-2012, 07:03 AM   #1692
PatrickDickey
Member
 
Registered: Sep 2011
Location: Muscatine, IA
Distribution: Ubuntu variants (ubuntu/Mythbuntu) and Windows Home Server/Windows 7
Posts: 33

Rep: Reputation: Disabled
Maybe you can help me out with my conky problem also. I just copied and pasted your code (after changing it to my locations), and updated my .conkyrc file. The radar image shows up over top of the processes, disk space available, and network information text; and the forecast doesn't show up at all. I'm running it on Ubuntu/Unity, along the right-hand side of the screen.

Here is the code from my .conkyrc file. The weather stuff is at the bottom. I'm pretty sure it's something to do with the positions for the text and images, but I'm not familiar enough with conky to fix it. Also, if you have any suggestions for another problem, I'd greatly appreciate that. Near the top, you'll see something that says display-dhammapada. It's supposed to display a hindu quote, but instead it just says "display-dhammapada" in my conky window. I'm not sure how to fix that either.

Code:
# Conky, a system monitor, based on torsmo
#
# Any original torsmo code is licensed under the BSD license
#
# All code written since the fork of torsmo is licensed under the GPL
#
# Please see COPYING for details
#
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# set to yes if you want Conky to be forked in the background

    background yes
    use_xft yes
    xftfont HandelGotD:size=9
    xftalpha 0.5
    update_interval 1.0
    total_run_times 0
    color0 88ffff
    color1 green
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 250 5
    maximum_width 280
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes
    default_color aaaaaa
    default_shade_color red
    default_outline_color green
    alignment top_right
    gap_x 5
    gap_y 5
    no_buffers yes
    uppercase no
    cpu_avg_samples 2
    override_utf8_locale no

    TEXT
    ${color0}Date & Time ${hr 2}
    ${alignc}${font Arial Black:size:24}${time %H:%M:%S}${font}
    ${alignc}${Time %A %m %d %Y}
    
    ${color0}System ${hr 2}
    $sysname $kernel on $machine
    Hostname $alignr $nodename
    Uptime $alignr $uptime
    Athlon-64 XP 3000+ @  ${freq}MHz
    CPU $alignr ${cpu cpu0}%
    ${cpubar cpu0}

${alignc 42}${font Arial Black:size=10}${color1}${display-dhammapada}${font}

${voffset 2}${font Arial Black:style=Bold:size=12}#!${font}   CrunchBang Linux  ${alignr}08.10.01
${font OpenLogos:size=16}u${font}   Kernel:  ${alignr}${kernel}
${font StyleBats:size=16}A${font}   CPU: ${cpu cpu0}% ${alignr}${cpubar cpu0 8,60}
${font StyleBats:size=16}g${font}   RAM: $memperc% ${alignr}${membar 8,60}
${font StyleBats:size=16}j${font}   SWAP: $swapperc% ${alignr}${swapbar 8,60}
${font StyleBats:size=16}q${font}   Uptime: ${alignr}${uptime}

${color0}PROCESSES ${hr 2}

NAME $alignr PID    CPU
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5}
${top name 6} $alignr ${top pid 6} ${top cpu 6}
${top name 7} $alignr ${top pid 7} ${top cpu 7}
${top name 8} $alignr ${top pid 8} ${top cpu 8}
    
${color0}HD ${hr 2}

${voffset 4}${font Pie charts for maps:size=14}7${font}   ${voffset -5}Root: ${alignr}${fs_bar 8,60 /}

${font Pie charts for maps:size=14}7${font}   ${voffset -5}Global: ${alignr}${fs_bar 8,60 /home/patrickdickey}

${color0}NETWORK ${hr 2}

${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup eth0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown eth0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr eth0}

${color0}WEATHER: ${hr 2}
TEXT
${execi 300 ~/.weather/getimage.sh}
${image ~/.weather/current.gif -p 180,740 -s 70x70}${image ~/.weather/radar.jpg -p 0,470 -s 350x236}


${texeci 300 ~/.weather/forcast.sh}
${texeci 300 cat ~/.weather/weatherdump}
Have a great day And for everyone else, sorry for hijacking the desktop thread for this.
Patrick.
 
Old 08-24-2012, 06:23 AM   #1693
shotswell21
LQ Newbie
 
Registered: Aug 2009
Posts: 16

Rep: Reputation: 6
${color0}WEATHER: ${hr 2}
TEXT
${execi 300 ~/.weather/getimage.sh}
${image ~/.weather/current.gif -p 180,740 -s 70x70}${image ~/.weather/radar.jpg -p 0,470 -s 350x236}


${texeci 300 ~/.weather/forcast.sh}
${texeci 300 cat ~/.weather/weatherdump}[/CODE]

the location of the image is set with -p 180,740 and -p 0,470 above, play with these values until you get the image in the right place, The first number is left and right and the second number is up and down, once you get it set it wont change. Also the white space inbetween the the image tag and the texeci tag are important as well.

For the forecast not showing up, can you call conky from a terminal and paste any errors that you are getting, also verify that weatherdump is being generated in the .weather folder when you run forcast.sh.... Also you can call forcast.sh from a terminal and see if it generated the waetherdump

Last edited by shotswell21; 08-24-2012 at 06:27 AM. Reason: More info.
 
Old 08-24-2012, 06:54 AM   #1694
PatrickDickey
Member
 
Registered: Sep 2011
Location: Muscatine, IA
Distribution: Ubuntu variants (ubuntu/Mythbuntu) and Windows Home Server/Windows 7
Posts: 33

Rep: Reputation: Disabled
Quote:
Originally Posted by shotswell21 View Post
${color0}WEATHER: ${hr 2}
TEXT
${execi 300 ~/.weather/getimage.sh}
${image ~/.weather/current.gif -p 180,740 -s 70x70}${image ~/.weather/radar.jpg -p 0,470 -s 350x236}


${texeci 300 ~/.weather/forcast.sh}
${texeci 300 cat ~/.weather/weatherdump}[/CODE]

the location of the image is set with -p 180,740 and -p 0,470 above, play with these values until you get the image in the right place, The first number is left and right and the second number is up and down, once you get it set it wont change. Also the white space inbetween the the image tag and the texeci tag are important as well.

For the forecast not showing up, can you call conky from a terminal and paste any errors that you are getting, also verify that weatherdump is being generated in the .weather folder when you run forcast.sh.... Also you can call forcast.sh from a terminal and see if it generated the waetherdump
Ok, I've got most of the issues figured out. I didn't have curl installed, so it wasn't getting the current weather information. Now, I need to figure out how to increase the size of the window. Right now, I have the values from above set to -p 180,780 (current.gif) and -p 0,870 (radar). So, I see the entire gif file, and the top 1/4 of the radar screen. Plus, I only see two and a partial lines from the weather dump.

I know it's because the window isn't long enough, but I honestly have no clue as to how to fix that.

Thanks for your help, and have a great day
Patrick.
 
Old 08-24-2012, 05:13 PM   #1695
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 527
Blog Entries: 3

Rep: Reputation: 126Reputation: 126
Try fiddling with the
Code:
maximum_width
values to make the window wider.
 
  


Reply

Tags
background, cwm, dwm, framebuffer, gui, i3, ion3, kde, monitor, musca, screenshot, tmux, wallpaper, xfce4, xterm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3D Desktop on Slackware? darkhatter Slackware 3 10-10-2006 12:26 PM
Slackware 10.0 with NO Desktop NiPP Linux - Newbie 2 01-02-2006 10:43 AM
3d desktop on Slackware k1ll3r_x Linux - Software 1 09-20-2005 10:47 PM
Desktop Slackware s0no Slackware 5 12-04-2004 11:20 AM
I can't get my desktop in Slackware 10 DraGoNsLaYeR Linux - Newbie 1 06-27-2004 02:00 PM


All times are GMT -5. The time now is 06:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration