Advertisement
Guest User

Untitled

a guest
Aug 10th, 2016
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.38 KB | None | 0 0
  1. conky.config = {
  2.  
  3. -------------------------------------
  4. -- Generic Settings
  5. -------------------------------------
  6. background=true,
  7. update_interval=1,
  8. double_buffer=true,
  9. no_buffers=true,
  10. imlib_cache_size=10,
  11.  
  12. draw_shades=false,
  13. draw_outline=false,
  14. draw_borders=false,
  15. draw_graph_borders=false,
  16. default_graph_height=26,
  17. default_graph_width=80,
  18. show_graph_scale=false,
  19. show_graph_range=false,
  20.  
  21.  
  22. -------------------------------------
  23. -- Window Specifications
  24. -------------------------------------
  25. gap_x=1150,
  26. gap_y=103,
  27. minimum_height=558,
  28. minimum_width=225,
  29. own_window=true,
  30. own_window_type="normal",
  31. own_window_transparent=true,
  32. own_window_hints="undecorated,below,sticky,skip_taskbar,skip_pager",
  33. border_inner_margin=0,
  34. border_outer_margin=0,
  35. --alignment="middle_middle",
  36. --own_window_argb_visual=true,
  37. --own_window_argb_value=0,
  38.  
  39.  
  40. -------------------------------------
  41. -- Text Settings
  42. -------------------------------------
  43. use_xft=true,
  44. xftalpha=1,
  45. font="Droid Sans:size=8",
  46. text_buffer_size=256,
  47. override_utf8_locale=true,
  48.  
  49. short_units=true,
  50. short_units=true,
  51. pad_percents=2,
  52. top_name_width=7,
  53.  
  54.  
  55. -------------------------------------
  56. -- Color Scheme
  57. -------------------------------------
  58. default_color="DCDCDC",
  59. color1="DCDCDC",
  60. color2="DCDCDC",
  61. color3="DCDCDC",
  62. color4="F9F9F9",
  63. color5="F9F9F9",
  64. color6="888888",
  65. color7="484848",
  66. color8="2D2D2D",
  67.  
  68.  
  69. -------------------------------------
  70. -- API Key
  71. -------------------------------------
  72. template6="92c2737c4d2f19bb62e03b82f47f430e",
  73.  
  74.  
  75. -------------------------------------
  76. -- City ID
  77. -------------------------------------
  78. template7="532096",
  79.  
  80.  
  81. -------------------------------------
  82. -- Temp Unit (default, metric, imperial)
  83. -------------------------------------
  84. template8="metric",
  85.  
  86.  
  87. -------------------------------------
  88. -- Locale (e.g. "es_ES.UTF-8")
  89. -- Leave empty for default
  90. -------------------------------------
  91. template9="ru_RU.UTF-8"
  92.  
  93. }
  94.  
  95.  
  96.  
  97. ---------------------------------------------------
  98. ---------------------------------------------------
  99.  
  100.  
  101. conky.text = [[
  102. \
  103. \
  104. ${execi 300 l=${template9}; l=${l%%_*}; curl -s "api.openweathermap.org/data/2.5/forecast/daily?APPID=${template6}&id=${template7}&cnt=5&units=${template8}&lang=$l" -o ~/.cache/forecast.json}\
  105. ${execi 300 l=${template9}; l=${l%%_*}; curl -s "api.openweathermap.org/data/2.5/weather?APPID=${template6}&id=${template7}&cnt=5&units=${template8}&lang=$l" -o ~/.cache/weather.json}\
  106. \
  107. \
  108. \
  109. \
  110. ${image ~/.harmattan-assets/misc/Numix/God-Mode/top-bg.png -s 228x61}\
  111. ${image ~/.harmattan-assets/misc/Numix/God-Mode/bottom-bg.png -p 0,439 -s 228x119}\
  112. ${execi 300 cp -f ~/.harmattan-assets/photos/smallest/$(jq .weather[0].id ~/.cache/weather.json).png ~/.cache/weather.png}${image ~/.cache/weather.png -p 0,61 -s 228x86}\
  113. ${image ~/.harmattan-assets/misc/Numix/God-Mode/border.png -p 0,61 -s 228x86}\
  114. ${image ~/.harmattan-assets/misc/Numix/God-Mode/bg-1.png -p 0,143 -s 228x86}\
  115. ${image ~/.harmattan-assets/misc/Numix/God-Mode/bg-2.png -p 0,229 -s 228x105}\
  116. ${image ~/.harmattan-assets/misc/Numix/God-Mode/bg-3.png -p 0,334 -s 228x105}\
  117. ${image ~/.harmattan-assets/misc/Numix/God-Mode/bg-4.png -p 0,445 -s 228x14}\
  118. ${image ~/.harmattan-assets/misc/Numix/God-Mode/separator-v.png -p 75,152 -s 1x76}\
  119. ${image ~/.harmattan-assets/misc/Numix/God-Mode/separator-v.png -p 152,152 -s 1x76}\
  120. ${image ~/.harmattan-assets/misc/Numix/God-Mode/separator-h.png -p 13,236 -s 202x1}\
  121. ${image ~/.harmattan-assets/misc/Numix/God-Mode/separator-h.png -p 13,336 -s 202x1}\
  122. \
  123. \
  124. \
  125. \
  126. ${color3}${voffset 155}${alignc 77}${execi 300 LANG=${template9} LC_TIME=${template9} date +%^a}${color}
  127. ${color3}${voffset -13}${alignc}${execi 300 LANG=${template9} LC_TIME=${template9} date -d +1day +%^a}${color}
  128. ${color3}${voffset -13}${alignc -77}${execi 300 LANG=${template9} LC_TIME=${template9} date -d +2day +%^a}${color}
  129. \
  130. \
  131. \
  132. \
  133. ${color2}${voffset 51}${alignc 77}${execi 300 jq -r .list[0].temp.min ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°/${execi 300 jq -r .list[0].temp.max ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°${color}
  134. ${color2}${voffset -13}${alignc}${execi 300 jq -r .list[1].temp.min ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°/${execi 300 jq -r .list[1].temp.max ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°${color}
  135. ${color2}${voffset -13}${alignc -77}${execi 300 jq -r .list[2].temp.min ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°/${execi 300 jq -r .list[2].temp.max ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°${color}
  136. \
  137. \
  138. \
  139. \
  140. ${goto 26}${voffset -172}${font Droid Sans :size=36}${color4}${execi 300 jq -r .main.temp ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num}°${font}${color}
  141. ${goto 26}${voffset 14}${font Droid Sans :size=12}${color4}${execi 300 jq -r .weather[0].description ~/.cache/weather.json | sed "s|\<.|\U&|g"}${font}${color}
  142. ${color4}${alignr 32}${voffset -73}${execi 300 jq -r .main.pressure ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num} hPa
  143. ${color4}${alignr 32}${voffset 7}${execi 300 jq -r .main.humidity ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num} %${color}
  144. ${color4}${alignr 32}${voffset 7}${execi 300 jq -r .wind.speed ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num}${if_match "$template8" == "metric"} m/s${else}${if_match "$template8" == "default"} m/s${else}${if_match "$template8" == "imperial"} mi/h${endif}${endif}${endif}${color}
  145. \
  146. \
  147. \
  148. \
  149. ${voffset -117}${font Droid Sans Mono :size=22}${alignc}${color2}${time %H:%M}${font}${color}
  150. ${voffset 4}${font Droid Sans :size=10}${alignc}${color6}${execi 300 LANG=${template9} LC_TIME=${template9} date +"%A, %B %-d"}${font}${color}
  151. \
  152. \
  153. \
  154. \
  155. ${voffset 294}${goto 20}${color5}Cpu:${color}
  156. ${voffset 4}${goto 20}${color5}Mem:${color}
  157. ${voffset 4}${goto 20}${color5}Battery:${color}
  158. ${voffset -47}${alignr 19}${color6}Temp ${platform coretemp.0/hwmon/hwmon2 temp 1} °C${color}
  159. ${voffset 4}${alignr 19}${color6}Freq ${freq_g (1)}GHz${color}
  160. ${voffset 4}${alignr 19}${color6}${battery_percent}%${color}
  161. ${voffset -47}${alignc}${color2}${cpubar 5,36}${color}
  162. ${voffset 4}${alignc}${color2}${membar 5,36}${color}
  163. ${voffset 4}${alignc}${color2}${battery_bar 5,36 BAT0}${color}
  164. ${voffset 12}${goto 20}${cpugraph 26,190 D64937 D64937 -l}
  165. \
  166. \
  167. \
  168. \
  169. ${voffset 26}${goto 20}${color5}${top_mem name 1}${color}
  170. ${voffset 4}${goto 20}${color5}${top_mem name 2}${color}
  171. ${voffset 4}${goto 20}${color5}${top_mem name 3}${color}
  172. ${voffset 4}${goto 20}${color5}${top_mem name 4}${color}
  173. ${voffset 4}${goto 20}${color5}${top_mem name 5}${color}
  174. ${voffset -81}${alignc}${color2}${top_mem mem 1}%${color}
  175. ${voffset 4}${alignc}${color2}${top_mem mem 2}%${color}
  176. ${voffset 4}${alignc}${color2}${top_mem mem 3}%${color}
  177. ${voffset 4}${alignc}${color2}${top_mem mem 4}%${color}
  178. ${voffset 4}${alignc}${color2}${top_mem mem 5}%${color}
  179. ${voffset -81}${alignr 19}${color6}${top_mem mem_res 1}${color}
  180. ${voffset 4}${alignr 19}${color6}${top_mem mem_res 2}${color}
  181. ${voffset 4}${alignr 19}${color6}${top_mem mem_res 3}${color}
  182. ${voffset 4}${alignr 19}${color6}${top_mem mem_res 4}${color}
  183. ${voffset 4}${alignr 19}${color6}${top_mem mem_res 5}${color}
  184. ${voffset -104}${goto 20}${color1}Proc${color}
  185. ${voffset -13}${alignc}${color1}Mem%${color}
  186. ${voffset -13}${alignr 19}${color1}Mem${color}
  187. \
  188. \
  189. \
  190. \
  191. ${if_existing /proc/net/route ppp0}
  192. ${voffset -227}${goto 20}${color5}Up: ${color2}${upspeed ppp0}${color5}${goto 130}Down: ${color2}${downspeed ppp0}
  193. ${voffset 10}${goto 20}${upspeedgraph ppp0 26,80 d64937 d64937}${goto 130}${downspeedgraph ppp0 26,80 d64937 d64937}
  194. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup ppp0}${color5}${goto 130}Received: ${color2}${totaldown ppp0}
  195. ${else}
  196. ${if_existing /proc/net/route ppp1}
  197. ${voffset -240}${goto 20}${color5}Up: ${color2}${upspeed ppp1}${color5}${goto 130}Down: ${color2}${downspeed ppp1}
  198. ${voffset 10}${goto 20}${upspeedgraph ppp1 26,80 d64937 d64937}${goto 130}${downspeedgraph ppp1 26,80 d64937 d64937}
  199. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup ppp1}${color5}${goto 130}Received: ${color2}${totaldown ppp1}
  200. ${else}
  201. ${if_existing /proc/net/route wlp2s1}
  202. ${voffset -253}${goto 20}${color5}Up: ${color2}${upspeed wlp2s1}${color5}${goto 130}Down: ${color2}${downspeed wlp2s1}
  203. ${voffset 10}${goto 20}${upspeedgraph wlp2s1 26,80 d64937 d64937}${goto 130}${downspeedgraph wlp2s1 26,80 d64937 d64937}
  204. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup wlp2s1}${color5}${goto 130}Received: ${color2}${totaldown wlp2s1}
  205. ${else}
  206. ${if_existing /proc/net/route wlp2s0}
  207. ${voffset -266}${goto 20}${color5}Up: ${color2}${upspeed wlp2s0}${color5}${goto 130}Down: ${color2}${downspeed wlp2s0}
  208. ${voffset 10}${goto 20}${upspeedgraph wlp2s0 26,80 d64937 d64937}${goto 130}${downspeedgraph wlp2s0 26,80 d64937 d64937}
  209. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup wlp2s0}${color5}${goto 130}Received: ${color2}${totaldown wlp2s0}
  210. ${else}
  211. ${if_existing /proc/net/route wlan0}
  212. ${voffset -279}${goto 20}${color5}Up: ${color2}${upspeed wlan0}${color5}${goto 130}Down: ${color2}${downspeed wlan0}
  213. ${voffset 8}${goto 20}${upspeedgraph wlan0 26,80 d64937 d64937}${goto 130}${downspeedgraph wlan0 26,80 d64937 d64937}
  214. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup wlan0}${color5}${goto 130}Received: ${color2}${totaldown wlan0}
  215. ${else}
  216. ${if_existing /proc/net/route wlan1}
  217. ${voffset -292}${goto 2}${color5}Up: ${color2}${upspeed wlan1}${color5}${goto 130}Down: ${color2}${downspeed wlan1}
  218. ${voffset 10}${goto 20}${upspeedgraph wlan1 26,80 d64937 d64937}${goto 130}${downspeedgraph wlan1 26,80 d64937 d64937}
  219. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup wlan1}${color5}${goto 130}Received: ${color2}${totaldown wlan1}
  220. ${else}
  221. ${if_existing /proc/net/route eth1}
  222. ${voffset -305}${goto 20}${color5}Up: ${color2}${upspeed eth1}${color5}${goto 130}Down: ${color2}${downspeed eth1}
  223. ${voffset 10}${goto 20}${upspeedgraph eth1 26,80 d64937 d64937}${goto 130}${downspeedgraph eth1 26,80 d64937 d64937}
  224. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup eth1}${color5}${goto 130}Received: ${color2}${totaldown eth1}
  225. ${else}
  226. ${if_existing /proc/net/route eth0}
  227. ${voffset -318}${goto 20}${color5}Up: ${color2}${upspeed eth0}${color5}${goto 130}Down: ${color2}${downspeed eth0}
  228. ${voffset 10}${goto 20}${upspeedgraph eth0 26,80 d64937 d64937}${goto 130}${downspeedgraph eth0 26,80 d64937 d64937}
  229. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup eth0}${color5}${goto 130}Received: ${color2}${totaldown eth0}
  230. ${else}
  231. ${if_existing /proc/net/route enp0s0}
  232. ${voffset -331}${goto 20}${color5}Up: ${color2}${upspeed enp0s0}${color5}${goto 130}Down: ${color2}${downspeed enp0s0}
  233. ${voffset 10}${goto 20}${upspeedgraph enp0s0 26,80 d64937 d64937}${goto 130}${downspeedgraph enp0s0 26,80 d64937 d64937}
  234. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup enp0s0}${color5}${goto 130}Received: ${color2}${totaldown enp0s0}
  235. ${else}
  236. ${if_existing /proc/net/route enp0s1}
  237. ${voffset -344}${goto 20}${color5}Up: ${color2}${upspeed enp0s1}${color5}${goto 130}Down: ${color2}${downspeed enp0s1}
  238. ${voffset 10}${goto 20}${upspeedgraph enp0s1 26,80 d64937 d64937}${goto 130}${downspeedgraph enp0s1 26,80 d64937 d64937}
  239. ${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup enp0s1}${color5}${goto 130}Received: ${color2}${totaldown enp0s1}
  240. ${else}
  241. ${voffset -311}${goto 20}${color5}Network disconnected${color}
  242. ${image ~/.harmattan-assets/misc/Numix/God-Mode/offline.png -p 44,284 -s 16x16}
  243. ${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
  244. \
  245. \
  246. \
  247. \
  248. ${image ~/.harmattan-assets/misc/Numix/God-Mode/pressure.png -p 204,64 -s 16x16}\
  249. ${image ~/.harmattan-assets/misc/Numix/God-Mode/humidity.png -p 204,84 -s 16x16}\
  250. ${image ~/.harmattan-assets/misc/Numix/God-Mode/wind-2.png -p 204,105 -s 16x16}\
  251. ${execi 300 cp -f ~/.harmattan-assets/icons/#dcdcdc__32/$(jq .list[0].weather[0].id ~/.cache/forecast.json).png ~/.cache/weather-1.png}${image ~/.cache/weather-1.png -p 21,177 -s 32x32}\
  252. ${execi 300 cp -f ~/.harmattan-assets/icons/#dcdcdc__32/$(jq .list[1].weather[0].id ~/.cache/forecast.json).png ~/.cache/weather-2.png}${image ~/.cache/weather-2.png -p 99,177 -s 32x32}\
  253. ${execi 300 cp -f ~/.harmattan-assets/icons/#dcdcdc__32/$(jq .list[2].weather[0].id ~/.cache/forecast.json).png ~/.cache/weather-3.png}${image ~/.cache/weather-3.png -p 175,177 -s 32x32}${font}${voffset -120}\
  254. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement