Skip to content

Instantly share code, notes, and snippets.

@dustyfresh
Created November 21, 2017 14:22
Show Gist options
  • Select an option

  • Save dustyfresh/26f52351391d575f972c5fc2194607c0 to your computer and use it in GitHub Desktop.

Select an option

Save dustyfresh/26f52351391d575f972c5fc2194607c0 to your computer and use it in GitHub Desktop.
My conkyrc file. WOEID for Austin is 201198989. You will need to change this ID for different weather.
# Conky settings #
background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 10
# Window specifications #
gap_x 0
gap_y 0
minimum_size 268 1220
maximum_width 268
alignment top_right
own_window yes
own_window_type normal
own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 255
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_argb_visual yes
#own_window_argb_value 0
border_inner_margin 0
border_outer_margin 0
# Graphics settings #
draw_shades no
default_shade_color AAAAAA
draw_outline no
default_outline_color AAAAAA
draw_borders no
draw_graph_borders no
default_graph_size 26 80
show_graph_scale no
show_graph_range no
# Text settings #
use_xft yes
xftalpha 0
xftfont Droid Sans:size=8
text_buffer_size 256
override_utf8_locale yes
# Useful shortenings #
short_units yes
pad_percents 2
top_name_width 30
# Color scheme #
default_color FFFFFF
color1 FFFFFF
color2 FFFFFF
color3 FFFFFF
color4 FFFFFF
color5 FFFFFF
color6 FFFFFF
color7 FFFFFF
color8 FFFFFF
TEXT
# Fixed the weather parsing peice
# You can build the command here:
# https://developer.yahoo.com/yql/console/?q=select%20*%20from%20weather.forecast%20where%20woeid%20%3D%201198989&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&debug=true#h=select+*+from+weather.forecast+where+woeid%3D2502265
${execi 300 curl -s "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%3D2357536&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" -o ~/.cache/weather.xml}
\
# Weather
\
${goto 36}${voffset 0}${font Droid Sans :size=36}${color1}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font}${color}
\
${goto 36}${voffset 0}${color}It's ${execi 300 grep "yweather:condition" ~/.cache/weather.xml| grep -o "text=\"[^\"]*\""| tr -d text=\"| head -1} in Austin ${color}
\
${color3}${voffset 30}${alignc 77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1' | tr '[a-z]' '[A-Z]'}${color}
${color3}${voffset -13}${alignc}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2' | tr '[a-z]' '[A-Z]'}${color}
${color3}${voffset -13}${alignc -77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3' | tr '[a-z]' '[A-Z]'}${color}
\
${color2}${voffset 5}${alignc 77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°${color}
${color2}${voffset -13}${alignc}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°${color}
${color2}${voffset -13}${alignc -77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°${color}
${hr 2}
\
\
# Cpu, memory and disk IO
\
${voffset 10}
${goto 40}${execi 300 uptime -p}
${goto 40}${cpugraph 26,190 FFA500 FFA500 -l}
${goto 40}Cpu:${alignr 39}${cpu}%
${goto 40}${memgraph 26,190 FFA500 FFA500 -l}
${goto 40}Mem:${alignr 39}${memperc}%
${goto 40}${diskiograph 26,190 FFA500 FFA500 -l}
${goto 40}Disk I/O:${alignr 39}${diskio}
${hr 2}
\
# Network
\
${if_existing /proc/net/route wlan0}
${goto 40}wlan0
${goto 40}${upspeedgraph wlan0 26,80 FFA500 FFA500}${goto 150}${downspeedgraph wlan0 26,80 FFA500 FFA500}
${goto 40}${color5}Up: ${color2}${upspeed wlan0}${color5}${goto 150}Down: ${color2}${downspeed wlan0}
${goto 40}${color5}Sent: ${color2}${totalup wlan0}${color5}${goto 150}Received: ${color2}${totaldown wlan0}
${endif}
${if_existing /proc/net/route eth0}
${goto 40}eth0
${goto 40}Local: ${execi 300 ifconfig eth0| grep inet\ addr| cut -d : -f2| awk {'print $1'}}
${goto 40}Public: ${execi 300 curl -A conkydesktop https://icanhazip.com}
${goto 40}${upspeedgraph eth0 26,80 FFA500 FFA500}${goto 150}${downspeedgraph eth0 26,80 FFA500 FFA500}
${goto 40}${color5}Up: ${color2}${upspeed eth0}${color5}${goto 150}Down: ${color2}${downspeed eth0}
${goto 40}${color5}Sent: ${color2}${totalup eth0}${color5}${goto 150}Received: ${color2}${totaldown eth0}
${endif}
${hr 2}
\
# Proceses
\
${goto 40}${color1}Proc${color}${alignr 39}${color1}${color1}Mem${color}
${goto 40}${color2}${top_mem name 1}${color}${alignr 39}${top_mem mem_res 1}
${goto 40}${color2}${top_mem name 2}${color}${alignr 39}${top_mem mem_res 2}
${goto 40}${color2}${top_mem name 3}${color}${alignr 39}${top_mem mem_res 3}
${goto 40}${color1}Proc${color}${alignr 39}${color1}Cpu %${color}
${goto 40}${color2}${top_mem name 1}${color}${alignr 39}${top cpu 1} %
${goto 40}${color2}${top_mem name 2}${color}${alignr 39}${top cpu 2} %
${goto 40}${color2}${top_mem name 3}${color}${alignr 39}${top cpu 3} %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment