Sample Conky (system monitor) configuration file with weather, CPU graph, memory graph, network traffic graph and processes
Revision | c9950b8a40364c5fd9261448c879f2828aeecd02 (tree) |
---|---|
Zeit | 2016-03-26 18:00:01 |
Autor | ![]() |
Commiter | shitamo |
Correct image selection
@@ -44,7 +44,7 @@ conky.config = { | ||
44 | 44 | template2 = [[ |
45 | 45 | ${color #eae5e3}${top name \1} ${top pid \1} ${top cpu \1} ${top mem \1} ${top time \1}]], |
46 | 46 | template3 = [[ |
47 | -${execi 300 cp -f ~/.conky/icons/$(ruby -ne 'cnt ||= 0; if /yweather:forecast.*code="(.+?)"/ then cnt+=1; print $1 if cnt == \1; end' ${template1}).png ~/.cache/weather-\1.png}${image ~/.cache/weather-\1.png -p \2 -s 32x32}]], | |
47 | +${execi 300 cp -f ~/.conky/icons/$(ruby -ne 'cnt ||= 0; $_.scan(/yweather:forecast.*?code="(.+?)"/) { cnt+=1; print $1 if cnt == \1; }' ${template1}).png ~/.cache/weather-\1.png}${image ~/.cache/weather-\1.png -p \2 -s 32x32}]], | |
48 | 48 | template4 = [[ |
49 | 49 | ${rss http://weather.livedoor.com/forecast/rss/warn/16.xml 60 item_title \1}]], |
50 | 50 |
@@ -59,10 +59,10 @@ ${execi 300 curl -s 'https://query.yahooapis.com/v1/public/yql' -d q='select * f | ||
59 | 59 | \ |
60 | 60 | # Weather |
61 | 61 | \ |
62 | -${goto 36}${voffset 0}${font mono:size=36}${color1}${execi 300 ruby -ne 'if /yweather:condition .* temp="(.+?)"/ then printf("%s℃", $1 ); end' ${template1}}${font}${color} | |
63 | -${goto 46}${voffset 14}${font mono:size=12}${color1}${execi 300 ruby -ne 'if /yweather:condition .* text="(.+?)"/ then print $1; end' ${template1}}${font}${color} | |
62 | +${goto 36}${voffset 0}${font mono:size=36}${color1}${execi 300 ruby -ne 'if /yweather:condition .*? temp="(.+?)"/ then printf("%s℃", $1 ); end' ${template1}}${font}${color} | |
63 | +${goto 46}${voffset 14}${font mono:size=12}${color1}${execi 300 ruby -ne 'if /yweather:condition .*? text="(.+?)"/ then print $1; end' ${template1}}${font}${color} | |
64 | 64 | \ |
65 | -${color1}${alignr 55}${voffset -72}${execi 300 ruby -ne 'if /yweather:atmosphere .* pressure="(.+?)"/ then print $1; end' ${template1}}${execi 300 ruby -ne 'if /yweather:units .*? pressure="(.+?)"/ then print $1; end' ${template1}} | |
65 | +${color1}${alignr 55}${voffset -72}${execi 300 ruby -ne 'if /yweather:atmosphere .*? pressure="(.+?)"/ then print $1; end' ${template1}}${execi 300 ruby -ne 'if /yweather:units .*? pressure="(.+?)"/ then print $1; end' ${template1}} | |
66 | 66 | ${color1}${alignr 55}${voffset 7}${execi 300 ruby -ne 'if /yweather:atmosphere .* humidity="(.+?)"/ then print $1; end' ${template1}}%${color} |
67 | 67 | ${color1}${alignr 55}${voffset 7}${execi 300 ruby -ne 'if /yweather:wind .* speed="(.+?)"/ then print $1; end' ${template1}}${execi 300 ruby -ne 'if /yweather:units .*? speed="(.+?)"/ then print $1; end' ${template1}}${color} |
68 | 68 | \ |