• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

Sample Conky (system monitor) configuration file with weather, CPU graph, memory graph, network traffic graph and processes


Commit MetaInfo

Revision28695df76c13d84f831209dd50964d56def2c191 (tree)
Zeit2016-03-26 17:24:05
Autorshitamo <shitamo@user...>
Commitershitamo

Log Message

- Change of Yahoo Weather API
- switch from cal to gcal

Ändern Zusammenfassung

Diff

--- a/conkyrc
+++ b/conkyrc
@@ -55,20 +55,20 @@ conky.text = [[
5555 # ${pre_exec /usr/sbin/smartctl --scan | awk '{print "/usr/sbin/hddtemp " $1 " -n -unit=C"}' > ~/.cache/hdddev.sh; chmod +x ~/.cache/hdddev.sh}\
5656 # https://weather.yahoo.com/japan/ -> Toyama Prefecture -> Toyama-shi
5757 # https://weather.yahoo.com/japan/toyama-prefecture/toyama-shi-1118400/
58-${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=1118400&u=c" -o ${template1}}
58+${execi 300 curl -s 'https://query.yahooapis.com/v1/public/yql' -d q='select * from weather.forecast where woeid=1118400 and u="c"' -o ${template1}}
5959 \
6060 # Weather
6161 \
6262 ${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}
6363 ${goto 46}${voffset 14}${font mono:size=12}${color1}${execi 300 ruby -ne 'if /yweather:condition .* text="(.+?)"/ then print $1; end' ${template1}}${font}${color}
6464 \
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-${color1}${alignr 55}${voffset 7}${execi 300 ruby -ne 'if /yweather:atmosphere humidity="(.+?)"/ then print $1; end' ${template1}}%${color}
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}
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+${color1}${alignr 55}${voffset 7}${execi 300 ruby -ne 'if /yweather:atmosphere .* humidity="(.+?)"/ then print $1; end' ${template1}}%${color}
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}
6868 \
69-${color3}${voffset 30}${alignc}${execi 300 ruby -ne 'cnt ||= 0; if (cnt < 3) && /day="(.+?)"/ then cnt+=1; printf(" %s ", $1 ); end' ${template1}}${color}
69+${color3}${voffset 30}${alignc}${execi 300 ruby -ne 'cnt ||= 0; $_.scan(/day="(.+?)"/){ if (cnt < 3) then cnt+=1; printf(" %s ", $1 ); end }' ${template1}}${color}
7070 \
71-${color2}${voffset 40}${alignc}${execi 300 ruby -ne 'cnt ||= 0; if (cnt < 3) && /low="(.+?)" high="(.+?)"/ then cnt+=1; printf("%3s℃/%3s℃ ", $1, $2); end' ${template1}}${color}
71+${color2}${voffset 40}${alignc}${execi 300 ruby -ne 'cnt ||= 0; $_.scan(/high="(.+?)" low="(.+?)"/){ if (cnt < 3) then cnt+=1; printf("%3s℃/%3s℃ ", $1, $2); end }' ${template1}}${color}
7272 ${hr 2}
7373 \
7474 ${color #d8e698}System information :${color #eae5e3}
@@ -79,7 +79,7 @@ ${color #d8e698}System information :${color #eae5e3}
7979 ${color #ffffff}Swap Usage : ${color #eae5e3}${swap}/${swapmax} - ${swapperc}% - ${swapbar 5}
8080 ${color #d8e698}${stippled_hr}
8181 ${color #d8e698}Device temperature :${color #eae5e3}
82-${execi 60 ~/.cache/hdddev.sh > ~/.cache/hddtemp.txt}\
82+${execi 58 ~/.cache/hdddev.sh > ~/.cache/hddtemp.txt}\
8383 ${color #ffffff} CPU0:${color #eae5e3}${execi 60 sensors | grep -A 0 'Core0' | cut -c 14-22} ${color #ffffff}HDD1: ${color #eae5e3}${execi 60 sed -e '1!d' ~/.cache/hddtemp.txt}.0℃
8484 ${color #ffffff} CPU1:${color #eae5e3}${execi 60 sensors | grep -A 0 'Core1' | cut -c 14-22} ${color #ffffff}HDD2: ${color #eae5e3}${execi 60 sed -e '2!d' ~/.cache/hddtemp.txt}.0℃
8585 ${color #ffffff} M/B :${color #eae5e3}${execi 60 sensors | grep -A 0 'MB' | cut -c 25-33} ${color #ffffff}HDD3: ${color #eae5e3}${execi 60 sed -e '3!d' ~/.cache/hddtemp.txt}.0℃
@@ -119,9 +119,9 @@ ${color #d8e698}Networking :
119119 ${color #ffffff}Up speed : ${color #eae5e3}${upspeed eth0}
120120 ${color #ffffff}Down speed : ${color #eae5e3}${downspeed eth0}
121121 ${color #d8e698}${stippled_hr}
122-${font mono:size=9}${execi 60 cal -h3 |sed -e "1s/^\(.\{16\}\).\{21\}/\1/" -e "2s/^\(.\{15\}\).\{15\}/\1/" -e "3,$ s/^\(.\{20\}\).\{22\}/\1/"}
123-${color #d8e698}${stippled_hr}
124-${font mono:size=12}${execi 60 cal -h}
122+${font mono:size=9}${execi 60 gcal -i -H no . |sed -e "1,5d" -e "6,$ s/^\(.\{21\}\).\{26\}/\1/"}
123+# ${color #d8e698}${stippled_hr}
124+${font mono:size=12}${execi 60 gcal -i | sed -e "1d" }
125125 # Various images including the icons of the forecast #
126126 \
127127 ${image ~/.conky/images/pressure.png -p 350,24 -s 16x16}\