It is currently Tue Aug 22, 2017 4:54 pm



Welcome
Welcome to antiX-forum.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!


Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Desktop Weather in MX-16 XFCE Desktop, not taskbar (SOLVED)
PostPosted: Mon Jan 30, 2017 9:50 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:46 pm
Posts: 150
I just installed mx-16 on my wife's old laptop which is NON-PAE...
I am looking for a desktop weather program that works...
I tried searching synaptic and found gdesklets and added 4 weather related gdesklets to it, they work and display on the desktop, but I can't seem to get my weather location to work in them...
Is there a working weather program that anyone knows about, and or maybe a working conky weather???
Thanks in advance for any help... :)

_________________
Robert J. Marks
Image


Last edited by rjm65 on Wed Feb 01, 2017 6:11 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Mon Jan 30, 2017 10:20 pm 
Offline

Joined: Mon Apr 20, 2015 9:58 pm
Posts: 495
Location: Sheboygan, WI
Inxi has weather built in

Code:
inxi -w
inxi -wxxx
Inxi -W 97131 -xxx


See if those commands in terminal help.


Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Mon Jan 30, 2017 10:30 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:46 pm
Posts: 150
Thank you, those all work, but I was looking for something that displayed on the desktop, something similar to linux mint desklets weather... :-)

_________________
Robert J. Marks
Image


Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Mon Jan 30, 2017 11:15 pm 
Offline

Joined: Mon Apr 20, 2015 9:58 pm
Posts: 495
Location: Sheboygan, WI
Sorry, but I do hope someone can help you.


Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Tue Jan 31, 2017 5:14 am 
Offline

Joined: Fri Feb 27, 2009 10:17 am
Posts: 589
Are you in the USA? I have one, but it's based on the National Weather Service here in the US.


Attachments:
File comment: My conky with weather and news
screenshot.jpg
screenshot.jpg [ 148.85 KiB | Viewed 1009 times ]

_________________
Too many computers, in use now:
1-Dell D620 2gb
2-HP DV9917 4gb
3-Dell E5540 8gb
4-Dell Inspiron 15 7559 16gb
various older machines
Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Tue Jan 31, 2017 10:22 am 
Offline

Joined: Thu Feb 09, 2012 7:29 am
Posts: 1267
rjm65 wrote:
I was looking for something that displayed on the desktop, something similar to linux mint desklets weather

v--------- LOTS of ideas here:
Topic: » Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)
https://forums.bunsenlabs.org/viewtopic.php?id=189&p=54


FWIW, instead of adding desktop distractions, I just check from terminal, on-demand
~.profile
Code:
alias weather='curl http://wttr.in'
...or if the browser's open, I just surf to wttr.in


Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Tue Jan 31, 2017 5:06 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:46 pm
Posts: 150
skidoo wrote:
rjm65 wrote:
I was looking for something that displayed on the desktop, something similar to linux mint desklets weather

v--------- LOTS of ideas here:
Topic: » Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)
https://forums.bunsenlabs.org/viewtopic.php?id=189&p=54


FWIW, instead of adding desktop distractions, I just check from terminal, on-demand
~.profile
Code:
alias weather='curl http://wttr.in'
...or if the browser's open, I just surf to wttr.in


I actually liked the one that was on that forum link but I could not find anywhere to download it at....

_________________
Robert J. Marks
Image


Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Tue Jan 31, 2017 5:08 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:46 pm
Posts: 150
thriftee wrote:
Are you in the USA? I have one, but it's based on the National Weather Service here in the US.

Yes I am in Pennsylvania, I could live with what I am seeing on your desktop, is the weather portion of your conkyrc easy to add to an existing conkyrc???

_________________
Robert J. Marks
Image


Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Tue Jan 31, 2017 6:41 pm 
Offline
User avatar

Joined: Fri Feb 20, 2009 3:44 am
Posts: 4047
Location: Pecos, Texas
I know Sector11 as a online buddy. He is located in South America and is a Conky Guru in my estimation.
Since he lives in South America. He likes his conky complicated. Very very complicated.



Which from I am gathering from this thread. Complicated is not your forte.

Quote:
I actually liked the one that was on that forum link but I could not find anywhere to download it at....


Living in the desert. My needs are not so complicated in AntiX conky. So my weather script is KISS.

I know you said your wifes computer is non-pae.But. I would like to see a

Code:
inxi -Fxz


report.

I am sure if you ask nice like over here.

https://forum.mxlinux.org/viewforum.php?f=55

You can ask them to build you MX compatible package of Flair. Which can then be installed through Synaptic package manager.
Here is more info on flair for that thread you can open up in MX Forum when you ask for your weather Desktop Widget.
https://launchpad.net/~teejee2008/+arch ... /+packages

What flair looks like

Image

The package developers at MX Forums are very accommodating and helpful. Don't try adding Ubuntu PPA to install flair in MX linux. It might end badly for you. Just ask nicely and show what info I shared with you just now. I am sure they will build a flair package for MX.

Or. Fly with thrftees post. I have no dog in this hunt.

_________________
Linux Registered User # 475019
Linux at Home courses
How to Search for AntiX solutions to your problems


Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Tue Jan 31, 2017 8:12 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:46 pm
Posts: 150
rokytnji wrote:
I know Sector11 as a online buddy. He is located in South America and is a Conky Guru in my estimation.
Since he lives in South America. He likes his conky complicated. Very very complicated.



Which from I am gathering from this thread. Complicated is not your forte.



Yes I would like something simple at this point in time, i spent two days now searching online and trying stuff with no luck at all...
I ran into problems when I first bought this machine on ebay, however the guys over at solydx found out the processor was non pae when they looked up the processor on a website...
MX-16 is flying on this machine and I am very happy with it...
I know the machine is old compared to the machines we have here at home, but we keep this one at my mother in laws house, so when my wife goes to visit on the weekends she don't have to be carrying her laptop back and forth...
here is the inxi you asked me for...
Code:
$ inxi -Fxz
System:    Host: ibmt40 Kernel: 3.16.0-4-686-pae i686 (32 bit gcc: 4.8.4)
           Desktop: Xfce 4.12.2 (Gtk 2.24.25) Distro: MX-16_386 Metamorphosis 12 December 2016
Machine:   Device: laptop System: IBM product: 23737CU v: ThinkPad T40
           Mobo: IBM model: 23737CU BIOS: IBM v: 1RETDRWW (3.23 ) date: 06/18/2007
Battery    BAT0: charge: 4.0 Wh 101.0% condition: 4.0/47.5 Wh (8%)
           model: SANYO IBM-08K8193 status: Full
CPU:       Single core Intel Pentium M (-UP-) cache: 1024 KB
           flags: (sse sse2) bmips: 1598 speed/max: 800/1300 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RV200/M7 [Mobility Radeon 7500] bus-ID: 01:00.0
           Display Server: X.Org 1.16.4 drivers: ati,radeon (unloaded: modesetting,fbdev,vesa)
           Resolution: [email protected]
           GLX Renderer: Mesa DRI R100 (RV200 4C57) x86/MMX/SSE2 DRI2
           GLX Version: 1.3 Mesa 12.0.3 Direct Rendering: Yes
Audio:     Card Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller
           driver: snd_intel8x0 ports: 1c00 18c0 bus-ID: 00:1f.5
           Sound: Advanced Linux Sound Architecture v: k3.16.0-4-686-pae
Network:   Card-1: Qualcomm Atheros AR5212/AR5213 Wireless Network Adapter
           driver: ath5k bus-ID: 02:02.0
           IF: wlan0 state: up mac: <filter>
           Card-2: Intel 82801DB PRO/100 VE (MOB) Ethernet Controller
           driver: e100 v: 3.5.24-k2-NAPI port: 8000 bus-ID: 02:08.0
           IF: eth0 state: down mac: <filter>
Drives:    HDD Total Size: 81.1GB (9.1% used)
           ID-1: /dev/sda model: HTS721080G9AT00 size: 80.0GB
           ID-2: USB /dev/sdb model: DataTraveler_2.0 size: 1.0GB
Partition: ID-1: / size: 72G used: 5.0G (8%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 2.17GB used: 0.00GB (0%) fs: swap dev: /dev/sda2
Sensors:   System Temperatures: cpu: 42.0C mobo: 35.0C
           Fan Speeds (in rpm): cpu: N/A fan-1: 2996
Info:      Processes: 135 Uptime: 26 min Memory: 153.7/2023.1MB
           Init: SysVinit runlevel: 5 Gcc sys: 4.9.2 Client: Shell (bash 4.3.301) inxi: 2.3.8

cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family   : 6
model      : 9
model name   : Intel(R) Pentium(R) M processor 1300MHz
stepping   : 5
microcode   : 0x7
cpu MHz      : 600.000
cache size   : 1024 KB
fdiv_bug   : no
f00f_bug   : no
coma_bug   : no
fpu      : yes
fpu_exception   : yes
cpuid level   : 2
wp      : yes
flags      : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 tm pbe bts est tm2
bogomips   : 1198.98
clflush size   : 64
cache_alignment   : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:

_________________
Robert J. Marks
Image


Top
 Profile  
 
 Post subject: Re: Desktop Weather
PostPosted: Tue Jan 31, 2017 8:47 pm 
Offline
User avatar

Joined: Sat Apr 26, 2008 6:02 am
Posts: 1103
Location: Clinton Township, Michigan
The Xfce desktop (which is available in MX-16) has an Xfce Weather applet available.

Using DuckDuckGo, I found this: https://community.linuxmint.com/idea/view/418 - they mention a Xfce weather applet.

I used to use a weather app that has been modified considerably over the years. http://fungi.yuggoth.org/weather/ documents where it's at now. The code works on Linux systems; it's fast, efficient, fairly portable, and I believe that the current implementation is written in Python. I believe that a very old version used to use shell-based code with calls to a command browser, such as links, elinks, etc. I have not used this one recently, but it may be suitable for someone with a need for a light, fast interface that can probably be customized (provided you understand the code).

I also used http://www.linuxquestions.org/questions ... et-832330/ to point me in this direction.

http://www.wxforum.net/index.php?topic=29502.0 has more information about many of the old scripts that have changed.

http://vortex.plymouth.edu/rwis/nh_zrwis.html from Plymouth State University in Plymouth, NH always has some interesting stuff available.

Let me know if any of this is helpful.

_________________
Brian Masinick
Favorite distros: antiX, MX, Debian Sid


Top
 Profile  
 
 Post subject: Re: Desktop Weather in MX-16 XFCE Desktop, not taskbar
PostPosted: Wed Feb 01, 2017 4:14 pm 
Offline

Joined: Fri Feb 27, 2009 10:17 am
Posts: 589
There is no big magic for weather in my conky. There is one line for a script getweatherc.sh I got the gets current conditions, which appears to not be working at the moment I took that snapshot (got it from a site like crunchbang), and a 2nd script I wrote getweather7d.sh which is working in the pic that takes the NWS 7 day forecast and trims out all the long words and extra words to squish it down to fit the conky screen well. All the scripts should be somewhere on the path. I use /usr/local/bin because for some odd reason /usr/local/sbin isn't always in the path. You need to find out and replace my KORD (airport code for Chicago O'Hare) and il/ilz014.txt (filename for NWS 7 day text forecast in Chicago area on NWS site) with values for your airport and 7 day text forecast files. So for Pennsylvania, they are in http://tgftp.nws.noaa.gov/data/forecasts/zone/pa/ and you go look at the files there to find the one you want tio use and put the pa/paz001.txt if you are in Erie, for example, into the .conkyrc to replace my il/ilz014.txt, and it will go get Erie's weather forecast every 600 seconds

Code:
# .conkyrc - conky resource file
# Update interval in seconds
update_interval 5

text_buffer_size 6000
max_specials 600

# set to yes if you want Conky to be forked in the background
background yes

short_units yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
font 8x12
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont Sans:size=10

# Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops)
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar

# Text alpha when using Xft
xftalpha 0.8

#on_bottom no

# mail spool
#mail_spool $MAIL

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 445 869
maximum_width 545

# Gap between borders of screen and text
# x = distance from right edge
# y = distance from top edge
gap_x 15
gap_y 1

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
#border_margin 10

# border width
border_width 2

# color scheme
color0 black
color1 red
color2 green
color3 yellow
color4 blue
color5 magenta
color6 cyan
color7 white
# hot pink
#color8 #FF078B
# flourecent orange
#color9 #FF9C07

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer right

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# boinc (seti) dir
# seti_dir /opt/seti

# stuff after 'TEXT' will be formatted on screen
TEXT
${font Sans:size=16}${color #FF078B}${nodename}     ${font Sans:size=10}\
${color2}O/S: ${color}${head ~/.conkyosversion 1}\
${color2}CpuAvg: ${color}${freq_g}Ghz ${machine} - ${color}${cpu}%  ${color2}Temp: ${color}${acpitemp}'C   ${color2}System/kernel: ${color}$sysname $kernel
${color2}  Cpu 1: ${color}${cpu cpu1}% \
${if_match ${cpu cpu1} <= 50}\
${color green}${cpubar cpu1 9}\
${else}\
   ${if_match ${cpu cpu1} <= 80}\
${color orange}${cpubar cpu1 9}\
   ${else}\
${color red}${cpubar cpu1 9}\
   ${endif}\
${endif}
${color2}  Cpu 2: ${color}${cpu cpu2}% \
${if_match ${cpu cpu2} <= 50}\
${color green}${cpubar cpu2 9}\
${else}\
   ${if_match ${cpu cpu2} <= 80}\
${color orange}${cpubar cpu2 9}\
   ${else}\
${color red}${cpubar cpu2 9}\
   ${endif}\
${endif}
${color2}Ram : ${color}$mem${color}/${color}$memmax ${color}- $memperc% \
${if_match ${memperc} <= 50}\
${color green}${membar 9}\
${else}\
   ${if_match ${memperc} <= 80}\
${color orange}${membar 9}\
   ${else}\
${color red}${membar 9}\
   ${endif}\
${endif}
#${color2}Swap: ${color}$swap${color}/${color}$swapmax ${color}- ${color}$swapperc%    \
#${if_match ${swapperc} <= 10}\
#${color green}${swapbar 9}\
#${else}\
#   ${if_match ${swapperc} <= 60}\
#${color orange}${swapbar 9}\
#   ${else}\
#${color red}${swapbar 9}\
#   ${endif}\
#${endif}
#${if_existing /live/boot-dev/antiX/rootfs}
#${color2}RootFS:/live/persist-root:${color} ${fs_free /live/persist-root}Free ${color}= ${fs_free_perc /live/persist-root}%       \
#${if_match ${fs_free_perc /live/persist-root} < 10}\
#${color red}${fs_bar 9 /live/persist-root}\
#${else}\
#   ${if_match ${fs_free_perc /live/persist-root} < 20}\
#${color orange}${fs_bar 9 /live/persist-root}\
#   ${else}\
#${color green}${fs_bar 9 /live/persist-root}\
#   ${endif}\
#${endif}
#${else}\
#${color2}Root:/:${color} ${fs_free /}Free ${color}= ${fs_free_perc /}%       \
#${if_match ${fs_free_perc /} < 10}\
#${color red}${fs_bar 9 /}\
#${if_match ${fs_free_perc /} < 3}${execi 60 lowspace /}${endif}\
#${else}\
#   ${if_match ${fs_free_perc /} < 20}\
#${color orange}${fs_bar 9 /}\
#   ${else}\
#${color green}${fs_bar 9 /}\
#   ${endif}\
#${endif}\
#${endif}
${color2}Home:/home:${color} ${fs_free /home}Free ${color}= ${fs_free_perc /home}%       \
${if_match ${fs_free_perc /home} < 10}\
${color red}${fs_bar 9 /home}\
${if_match ${fs_free_perc /home} < 3}${execi 60 lowspace /home}${endif}\
${else}\
   ${if_match ${fs_free_perc /home} < 20}\
${color orange}${fs_bar 9 /home}\
   ${else}\
${color green}${fs_bar 9 /home}\
   ${endif}\
${endif}
${if_match "${battery_short BAT0}" >= "G"}\
${else}\
${if_match "${battery_short BAT0}" >= "F"}\
${color green}Battery ${battery BAT0} ${battery_bar 9 BAT0}\
${else}\
${if_match "${battery_short BAT0}" >= "D"}\
${if_match ${battery_percent BAT0} > 75}\
${color yellow}Battery ${color green}${battery BAT0} ${battery_time BAT0} min ${battery_bar 9 BAT0}\
${else}\
${if_match ${battery_percent BAT0} > 50}\
${color yellow}Battery ${battery BAT0} ${battery_time BAT0} min ${battery_bar 9 BAT0}\
${else}\
${if_match ${battery_percent BAT0} > 35}\
${color orange}Battery ${battery BAT0} ${battery_time BAT0} min ${battery_bar 9 BAT0}\
${else}\
${color red}${blink PLUG IN CHARGER NOW!!!   }${color}\
${color red}Battery ${color red}${battery BAT0} ${battery_time BAT0} min ${battery_bar 9 BAT0}\
${if_match ${battery_percent BAT0} <= 20}${execi 60 lowbattery}${endif}\
${endif}\
${endif}\
${endif}\
${else}\
${if_match "${battery_short BAT0}" >= "C"}\
${if_match ${battery_percent BAT0} > 50}\
${color2}Battery ${color green}${battery BAT0} ${battery_bar 9 BAT0}\
${else}\
${if_match ${battery_percent BAT0} > 25}\
${color2}Battery ${color yellow}${battery BAT0} ${battery_bar 9 BAT0}\
${else}\
${if_match ${battery_percent BAT0} > 10}\
${color2}Battery ${color orange}${battery BAT0} ${battery_bar 9 BAT0}\
${else}\
${color2}Battery ${color orange}${battery BAT0} ${battery_bar 9 BAT0}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}
${if_match ${acpitemp} > 77}${execi 60 hightemp}${endif}\
${color2}Wireless: ${color}${wireless_essid wlan0} ${color2}IP:${color} ${addr wlan0} ${color2}spd: ${color} ${wireless_bitrate wlan0} ${color2}strength: ${color3} ${wireless_link_bar 9 wlan0}
${color2}Processes: ${color}$processes  ${color2}Running: ${color}$running_processes ${color2}Uptime: ${color}$uptime   ${color2}wlan0 Up/Dn ${color}${upspeed wlan0}${color2}/${color}${downspeed wlan0}
${color3}Program Name         PID    CPU%  MEM%                            ${color2}eth0 Up/Dn ${color}${upspeed eth0}${color2}/${color}${downspeed eth0}
${color} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color3}News Headlines, NWS Current Weather and 7 Day Forecast:
${color}${execi 60 conky-rss.sh http://feeds.abcnews.com/abcnews/topstories 6 2}
${font Sans:size=10}${color3}${execi 120 getweatherc.sh KORD}
${font Sans:size=8}${color}${execi 600 getweather7d.sh il/ilz014.txt}
${font courier:bold:size=15}${color3}                     ${time %a} ${time %b} ${time %d} ${time %Y}
${color3}${font courier:bold:size=13}${execpi 600 DJS=`date +%_d`; cal -h | sed '1d' | sed '2s/^/\${color}/' | sed 's/^/                         /g' | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color2}'"$DJS"'$color'/}


Code:
#!/bin/bash
# getweather7d - gets weather forecast text file
# usage: getweather7d.sh il/ilz014.txt
#   files are stored by state, so need to pass combined state and filename
#   delete first 11 lines and last 2 lines to get actual forecast text
#
# Requires: curl, tr, fold, sed
#
if [ "$1" = "" ]; then
    echo "ERROR, usage: getweather7d.sh il/ilz014.txt"
else
   curl_retryn=0
    curl -s http://tgftp.nws.noaa.gov/data/forecasts/zone/$1 > ~/.getweather7d.tmp.txt
   if [ $? -ne 0 ]; then
      while [ curl_retryn -le 3 ]
      do
         sleep 10
         curl_retryn=`expr $curl_retryn + 1`
         curl -s http://tgftp.nws.noaa.gov/data/forecasts/zone/$1 > ~/.getweather7d.tmp.txt
         if [ $? -ne 0 ]; then
            continue
         fi
         curl_retryn=0
         break
      done
   fi
   if [ $curl_retryn -ne 0 ]; then
      echo "ERROR, getweather7d.sh curl failed to get weather for $1"
   else
      # ~/.getweather7d.tmp.txt now contains text of 7 day forecast, remove 1st 2 lines and 1st 11 lines,
      #      delete 1st char of 1st line
      #####cat ~/.getweather7d.tmp.txt | sed '$ d' | sed '$ d' | sed '1,11 d' | sed -e '1s/^.//' > ~/.getweather7d.tmp2.txt
      cat ~/.getweather7d.tmp.txt | sed '1,11 d' > ~/.getweather7d.tmp2.txt
      # lines are wrapped at xx chars, so need to unwrap and then rewrap at yy chars
      # change all newline 0a characters into and all . to b
      tr '\n' 'a' < ~/.getweather7d.tmp2.txt > ~/.getweather7d.tmp3.txt
      tr '.' 'b' < ~/.getweather7d.tmp3.txt > ~/.getweather7d.tmp4.txt
      # ab combos are real newlines, and change all ... to -
      cat ~/.getweather7d.tmp4.txt | sed -e "s/ab/\n/g" | sed -e "s/bbb/-/g" > ~/.getweather7d.tmp5.txt
      # change b back to. and make a into spaces
      tr 'b' '.' < ~/.getweather7d.tmp5.txt > ~/.getweather7d.tmp6.txt
      tr 'a' ' ' < ~/.getweather7d.tmp6.txt > ~/.getweather7d.tmp7.txt
      cat ~/.getweather7d.tmp7.txt | sed -e "s/^/--/g" | sed -e "s/ PERCENT/%/g" | sed -e "s/TEMPERATURES/TEMPS/g" | sed -e "s/AROUND/ABOUT/g" \
      | sed -e "s/BELOW ZERO/BELOW/g" | sed -e "s/ABOVE ZERO/ABOVE/g" | sed -e "s/ ABOVE//g" | sed -e "s/ ZERO/ 0/g" | sed -e "s/TEMPS NEARLY/TEMPS/g" \
      | sed -e "s/REST OF TODAY/TODAY/g" | sed -e "s/REST OF TONIGHT/TONITE/g" | sed -e "s/IN THE AFTERNOON/AFTERNOON/g" | sed -e "s/IN THE EVENING/EVENING/g" \
      | sed -e "s/SUBURBS/BURBS/g" | sed -e "s/DOWNTOWN/CITY/g" | sed -e "s/THROUGH/THRU/g" | sed -e "s/MOSTLY SUNNY/SUNNY/g" | sed -e "s/RANGING FROM/FROM/g" \
      | sed -e "s/MPH WITH GUSTS UP/MPH, GUSTS/g" | sed -e "s/GUSTS UP TO/GUSTS TO/g" | sed -e "s/CHILLS/CHILL/g" | sed -e "s/MOSTLY CLOUDY/CLOUDY/g" \
      | sed -e "s/WINDS/WIND/g" | sed -e "s/LOWS/LO/g" | sed -e "s/HIGHS/HI/g" | sed -e "s/BITTERLY/BITTER/g" | sed -e "s/MOSTLY CLEAR/CLEAR/g" \
      | sed -e "s/NUMEROUS SNOW SHOWERS/SNOW/g" | sed -e "s/SNOW SHOWERS/SNOW/g" | sed -e "s/RAIN SHOWERS/RAIN/g" | sed -e "s/MORNING/AM/g" \
      | sed -e "s/ACCUMULATION/ACCUM/g" | sed -e "s/TONIGHT/TONITE/g" | sed -e "s/LOWER/LO/g" | sed -e "s/LOW/LO/g" | sed -e "s/BECOMING/TURNING/g" \
      | sed -e "s/ADVISORY IN EFFECT FROM/ADVISORY FROM/g" | sed -e "s/HIGH/HI/g" | sed -e "s/NORTHEAST/NE/g" | sed -e "s/NORTHWEST/NW/g" \
      | sed -e "s/PRECIPITATION/PRECIP/g" | sed -e "s/SOUTHEAST/SE/g" | sed -e "s/SOUTHWEST/SW/g" | sed -e "s/LIGHT/LITE/g" \
      | sed -e "s/THUNDERSTORMS/STORMS/g"  > ~/.getweather7d.tmp8.txt 
      # to limit number of forecast day/night sections, count each section as a line before wrapping, typically 15 max
      cat ~/.getweather7d.tmp8.txt | sed -e '15,$d' > ~/.getweather7d.tmp9.txt
      # wrap text for 80 char wide display, limit to 26 lines of output
      fold -s -w 80 ~/.getweather7d.tmp9.txt | sed -e '26,$d' > ~/.getweather7d.tmp10.txt
      # print lines to std output, conky will get result and display
      cat ~/.getweather7d.tmp10.txt
   fi
fi


Code:
#!/bin/bash
# getweatherc.sh - - Gets and returns one line current conditions for weather station code passed as parm1
# usage: getweatherc.sh KORD
#
# Requires: wget, sed, xmllint
#
station="$1.xml"
wdir='/tmp/weather'

update_xml() {
   if [ ! -e "$station" ]; then
      wget -q http://w1.weather.gov/xml/current_obs/${station}
      [ -e "$station" ] && touch "${station}"
   else
      # dtime: time the .xml file was downloaded
      # otime: time the weather data was observed
      # ctime: current time (time this script is being run)
      dtime=$(stat -c %Y $station)
      otime=$(date -d "$utime" +%s)
      ctime=$(date +%s)

      if (( "$otime" + 4507 < "$ctime" )); then
         if (( "$dtime" + 307 < "$ctime" )); then
            wget -q -O "$station" http://w1.weather.gov/xml/current_obs/${station}
            [ -e "$station" ] && touch "${station}"
         fi
      fi
   fi
}

from_xml() { xmllint -xpath "//$1" - <<< "$xml" | sed 's/<[^>]*>//g'; }
   
[ -d "$wdir" ] || mkdir -p "$wdir"
cd "$wdir" || exit 1

xml=''
[ -r $station ] && xml="$(< $station)"
( update_xml >/dev/null 2>&1 ) &

if [ -n "$xml" ]; then
   location=$(from_xml "location")
   # if we just want the city the location is in
   #locationx=$(from_xml "location")
    #location="$(echo "$locationx" | cut -f1 -d",")"
   utime=$(from_xml "observation_time_rfc822")
   otime=$(date -d "$utime" '+%a %b %e %R')
   #date +"%Y/%m/%d %H:%M"
   #Invoking date with no format argument is equivalent to invoking `date '+%a %b %e %H:%M:%S %Z %Y''.
   weather=$(from_xml "weather")
   temperature=$(from_xml "temp_f")
   humid=$(from_xml "relative_humidity")
   wind_dir=$(from_xml "wind_dir")
   case "$wind_dir" in
      "North") wind_dir="N" ;;
      "South") wind_dir="S" ;;
      "East") wind_dir="E" ;;
      "West") wind_dir="W" ;;
      "Northwest") wind_dir="NW" ;;
      "Northeast") wind_dir="NE" ;;
      "Southwest") wind_dir="SW" ;;
      "Southeast") wind_dir="SE" ;;
   esac
   wind_speed=$(from_xml "wind_kt")
   baro_pressure=$(from_xml "pressure_in")

###   echo "$location"
   printf '%s, %s %s F, wind %s %s kt in %s, NWS station %s\n' "$otime" "$weather" "$temperature" "$wind_dir" "$wind_speed" "$location" "$1"
###   echo "$location"
###   printf 'Weather: %s %s°F\n' "$weather" "$temperature"
###   printf 'Barometric Pressure: %s inches\n' "$baro_pressure"
###   printf 'Wind: %s at %s knots\n' "$wind_dir" "$wind_speed"
###   printf 'Humidity: %s%%\n' "$humid"
###   echo "Updated: $(date -d "$utime" 2>/dev/null )"
else
   echo "ERROR: No weather data available for $1..."
fi


Code:
#!/bin/bash

# getosversion - saves os version to a file for conky to display

rm ~/.conkyosversion
touch ~/.conkyosversion

# bash for loop
for f in $( ls /etc/*version --sort=time ); do
   cat $f >> ~/.conkyosversion
   echo $f
done


Code:
#!/bin/bash

# lowbattery - alert for low battery with sound and popup screen from dave

play /usr/share/sounds/error.wav
play /usr/share/sounds/error.wav
play /usr/share/sounds/error.wav

MESSAGE="The System Battery is Extremely low! Shut Down Now?"
TITLE="BATTERY EXTREMELY LOW!"

FLAG_FILE="/tmp/batterylow"

if [ ! -f $FLAG_FILE ]; then
   touch $FLAG_FILE
   yad --image='error' --text="$MESSAGE" #--button='ok:0' --button='cancel:1'
   case $? in
            0)    rm $FLAG_FILE && desktop-session -s    ;;
            1)    rm $FLAG_FILE && exit                  ;;
            *)    echo "Not an option" && exit                ;;
   esac
fi
[code]

[code]
#!/bin/bash
#
# conky-rss.sh - RSS Display Script by Bill Woodford ([email protected]) v1.0
#
# This script is designed to output story titles for most any RSS Feed.
#
# This script depends on curl.  Please ensure it is installed and in your $PATH
# Gentoo: emerge -av net-misc/curl
# Debian: apt-get install curl
# Homepage: http://curl.haxx.se/
#
# Usage:
# .conkyrc:   ${execi [time] /path/to/script/conky-rss.sh URI LINES TITLENUM}
#   URI = Location of feed, ex. http://www.gentoo.org/rdf/en/glsa-index.rdf
#   LINES = How many titles to display (default 5)
#   TITLENUM = How many times the title of the feed itself is specified, usually 1 or 2 (default 2)
#
# Usage Example      
#      ${execi 300 /home/youruser/scripts/conky-rss.sh http://www.foxnews.com/xmlfeed/rss/0,4313,1,00.rss 4 2}

#RSS Setup - Don't change unless you want these values hard-coded!
uri=$1                     #URI of RSS Feed
lines=$2                  #Number of headlines
titlenum=$3                  #Number of extra titles

#Script start
#Require a uri, as a minimum
if [[ "$uri" == "" ]]; then
   echo "No URI specified, cannot continue!" >&2
   echo "Please read script for more information" >&2
else
   #Set defaults if none specified
   if [[ $lines == "" ]]; then lines=5 ; fi
   if [[ $titlenum == "" ]]; then titlenum=2 ; fi

   #The actual work
   curl -s --connect-timeout 30 $uri |\
   sed -e 's/<\/title>/\n/g' |\
   grep -o '<title>.*' |\
   sed -e 's/<title>//' |\
   sed -e 's/<!\[CDATA\[//g' |\
   sed -e 's/\]\]>//g' |\
   head -n $(($lines + $titlenum)) |\
   tail -n $(($lines))
fi

_________________
Too many computers, in use now:
1-Dell D620 2gb
2-HP DV9917 4gb
3-Dell E5540 8gb
4-Dell Inspiron 15 7559 16gb
various older machines


Top
 Profile  
 
 Post subject: Re: Desktop Weather in MX-16 XFCE Desktop, not taskbar
PostPosted: Wed Feb 01, 2017 6:10 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:46 pm
Posts: 150
this all seems like too much work, it is a shame there isn't an easy way to do this like linux mint has, where you choose a desklet put in your zip code and it is done.... I guess I am just going to use the one for the task bar and call it a day.... Thank you everyone for your suggestions, I appreciate it.... :)

_________________
Robert J. Marks
Image


Top
 Profile  
 
 Post subject: Re: Desktop Weather in MX-16 XFCE Desktop, not taskbar (SOLV
PostPosted: Thu Feb 02, 2017 3:38 pm 
Online

Joined: Wed Sep 12, 2007 4:55 pm
Posts: 446
This is a good question--sorry I did not see it sooner. There is gis-weather in the MX repo you could take a look at.

[url=http://www.zimagez.com/zimage/screenshot24cab4f61b3440e34669a95abcdb51e0.php]
Image
[/url]


Top
 Profile  
 
 Post subject: Re: Desktop Weather in MX-16 XFCE Desktop, not taskbar (SOLV
PostPosted: Thu Feb 02, 2017 4:41 pm 
Online

Joined: Wed Sep 12, 2007 4:55 pm
Posts: 446
It's highly configurable (via right-click), and here is how I actually run it on my main desktop:

[url=http://www.zimagez.com/zimage/screenshot-1495.php]
Image
[/url]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
suspicion-preferred