Conky hava durumu ekleme

Başlatan alembizim, 09 Şubat 2017 - 01:55:47

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

alembizim

Slick conky temasını kullanıyorum.Conky manager manuel text editöründen yazı tipini felan degiştirdim ama  İstanbul hava durumunu eklemeye çalıştım bir türlü başaramadım.Ayrıca temadaki zaman hava durumu sistem gibi yazılarıda türkçe yapmayı başaramadım.Hava duumunu xml olarak istiyor sanırım okısımda öyle bir link var.

background yes
use_xft yes
xftfont Roboto:size=9
xftalpha 0.8
update_interval 1
total_run_times 0
own_window yes
own_window_transparent yes
##############################################
# Compositing tips:
# Conky can play strangely when used with
# different compositors. I have found the
# following to work well, but your mileage
# may vary. Comment/uncomment to suit.
##############################################
## no compositor
#own_window_type override
#own_window_argb_visual no

## xcompmgr
#own_window_type override
#own_window_argb_visual yes

## cairo-compmgr
own_window_type dock
own_window_argb_visual yes
##############################################
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
stippled_borders 0
border_margin 5
border_width 1
default_color white
default_shade_color 000000
default_outline_color 000000
alignment top_middle
minimum_size 4270 240
maximum_width 1000
gap_x -55
gap_y 55
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
short_units yes
text_buffer_size 2048
use_spacer none
override_utf8_locale yes
own_window_argb_value 0
own_window_colour 000000

color1 0778ec
color2 red
color3 green


lua_load txtb.lua
lua_draw_hook_post draw_text1

TEXT
${voffset 82}${offset 50}${font Purisa:size=50}${time %H:%M}
${voffset -135}${offset 305}${font Purisa:bold:size=20}${time %A }
${voffset }${offset 305}${font Purisa:bold:size=10}${time %d/%m/%y }

# ---  Weather --- #
###################
\
# --- WOEID (Location id) --- #
${execi 300 curl -s "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20%3D%202343859%20and%20u%3D%27c%27&format=xml" -o ~/.cache/weather.xml}\
# --- Temperature --- #
#######################
\
${font Purisa:size=25}${offset 500}${voffset -100}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font Purisa:bold:size=9}Celsius${font Purisa Com:size=13}

${font Purisa:bold:size=7}${offset 520}${voffset -10}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°

${offset 575}${voffset -30}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°

# --- Icon - high temperature --- #
###################################
\
${image arrow-up.png -p 505,154 -s 10x10}

# --- Icon - low temperature icon --- #
#######################################
\
${image arrow-down.png -p 560,154 -s 10x10}

# --- Location name (city and country) --- #
############################################
\
${font Aliquam:bold:size=11}${offset 505}${voffset -163}${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "city=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}, ${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "country=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}

###Systems
${voffset -33}${offset 680}${font Purisa:bold:size=11}$nodename
${voffset 2}${offset 680}Cpu: ${cpu cpu1}%
${voffset 2}${offset 680}Ram: $memperc %

##Spotifty
${voffset -95}${offset 840}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "title"|egrep -v "title"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ }
${offset 840}${voffset 12}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artist"|egrep -v "artist"|egrep -v "array"|cut -b 27-|cut -d '"' -f 1|egrep -v ^$ }
${offset 840}${voffset 12}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "album"|egrep -v "album"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ }${color 57BEEB}








ata1

#1
http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-2343859/

Şu kısımda ülke ve şehri doğru olarak bulmalı ve yazmalısın weather.yahoo.com/country/state/city-2343859/


şu kısmı incelersen daha iyi anlarsın sanırım.
https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20%3D%202343859%20and%20u%3D%27c%27&format=xml%22%20-o%20~/.cache/weather.xml

http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-2343859/
</link>
<description>Yahoo! Weather for Canakkale, Canakkale, TR</description>
<language>en-us</language>
<lastBuildDate>Thu, 09 Feb 2017 12:57 AM EET</lastBuildDate>
<ttl>60</ttl>
<yweather:location xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" city="Canakkale" country="Turkey" region=" Canakkale"/>
<yweather:wind xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" chill="41" direction="50" speed="40.23"/>
<yweather:atmosphere xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" humidity="86" pressure="34168.68" rising="0" visibility="25.91"/>
<yweather:astronomy xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" sunrise="7:14 am" sunset="5:44 pm"/>
<image>
<title>Yahoo! Weather</title>
<width>142</width>
<height>18</height>
<link>http://weather.yahoo.com</link>

alembizim

turkey/istanbul/2344116   denedim ama ben beceremedim sanırım.https://developer.yahoo.com/weather/ bu site üzerinden yapmaya çalıştım.En sonunda bir şehir çıktı ama none,london gibi birşey yazıyordu hala çanakkale ile devam :'(