After starting to migrate to linux, I selected Linux Mint 16 and ultimately went with Xfce. So I soon discovered conky and began poking around. I have no programming ability, but I am rumored to have at least two (2) active braincells - so I mangled various other scripts out there and came up with three (3) conky scripts. My desktop is 1920x1080, with one (1) 24-pixel panel (bar) at the bottom.
The result looks like this (right-side of desktop):
Now, I have a horizontal gradient desktop going from black (right) to burnt orange (left), thus the orange colors in the conky (ff6600). The white smudge is just blocking my external IP (at the time).
I have the lua Clock Rings (reEdited by despot77) that I changed to show all 8 cores of my i7 the "top half" for cores 1-4, the bottom half for cores 5-8. Clunky, but was the best to fit the theme and design. I also added a bit more weather details and other tweaks. This was my first script, .conky_tr, and used a photo of my dog (transparent bg/clipped out) in the clock.
Code for conky_tr:
Code:
# conky_tr -> analog clock/date/weather/sysinfo circles
# mangled by myrkat
# Basic Settings
background no
cpu_avg_samples 3
double_buffer yes
imlib_cache_size 0
net_avg_samples 3
no_buffers yes
override_utf8_locale yes
temperature_unit fahrenheit
text_buffer_size 2048
total_run_times 0
update_interval 1
uppercase no
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
# Window specifications #
own_window_class Conky
own_window yes
own_window_type desktop
own_window_transparent yes
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
draw_outline no
draw_borders no
draw_graph_borders no
# Positioning & Colors
alignment tr
gap_x 10
gap_y 10
minimum_size 200 250
maximum_width 200
default_color FF6600
color0 FFFFFF
color1 DD5500
color2 BB4400
color3 993300
color4 772200
color5 DDDDDD
color6 BBBBBB
color7 999999
color8 777777
color9 555555
# Lua Load #
lua_load ~/.conky/clock_rings.lua
lua_draw_hook_pre clock_rings
TEXT
${voffset 8}${font caviar dreams:size=16}${time %A}${font}${voffset -8}${alignr 50}${color5}${font caviar dreams:size=38}${time %e}${font}
${color5}${voffset -30}${color6}${font caviar dreams:size=18}${time %b}${font}${voffset -3} ${color8}${font caviar dreams:size=20}${time %Y}${font}${color FF6600}${hr}
${color 995500}${alignr} ${time %l}:${time %M}${time %P}
${voffset 140}${font caviar dreams:size=10}${color FF6600}${alignr}San Luis Obispo${font}
${font caviar dreams:size=12}${color0}${voffset -2}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KSBP temperature 30} °F${font}
${font caviar dreams:size=8}${color6}${voffset -4}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KSBP cloud_cover 30}${font}
${font caviar dreams:size=10}${color5}${voffset -4}${goto 127}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KSBP humidity 30}${font caviar dreams:size=8}${color6}${alignr}${voffset 0}% humidity${font}
${font caviar dreams:size=8}${color6}${voffset 0}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KSBP weather 30}${font}
${image ~/.conky/roy.png -p 64,110 -s 70x70}
${color9}${goto 78}${voffset -19}cores 1-4
${color0}${goto 85}${voffset -1}${cpu cpu}%
${color}${goto 85}${voffset -2}CPU
${color9}${goto 78}${voffset -4}cores 5-8
${color0}${goto 65}${voffset 18}${memperc}%
${color}${goto 65}RAM
${color0}${goto 90}${voffset 23}${swapperc}%
${color}${goto 90}Swap
${color0}${goto 115}${voffset 26}${fs_used_perc /}%
${color}${goto 115}Disk
${color0}${alignr 32}${voffset 24}${if_up wlan0}${downspeed wlan0}${endif}${if_up eth0}${downspeed eth0}
${color0}${alignr 32}${if_up wlan0}${upspeed wlan0}${endif}${if_up eth0}${upspeed eth0}
${color}${alignr 58}Net
Then I wanted some simple calendar display, but realized I like to keep a month or two nearby... rather than just using cal -3s, I wanted to see if I could have the previous 2 months and next 2 months = for a total of 5 months, with the current month in the middle (brightest) with current day highlighted. This was tricky (again, no programming experience, just poking around and trial-and-error). Finally got it like I wanted, then moved it in tight with .conky_tr to keep it aligned with .conky_br (next script). I called it .conky_tm because originally I had it in the top middle, but it ultimately got moved to top right, but I kept the name. Oh well. Two brain cells, right?
Code for conky_tm:
Code:
# conky_tr -> calendars/previous 2/next 2/fading
# mangled by myrkat
# Basic Settings
background no
cpu_avg_samples 3
double_buffer yes
imlib_cache_size 0
net_avg_samples 3
no_buffers yes
override_utf8_locale yes
temperature_unit celsius # fahrenheit
text_buffer_size 2048
total_run_times 0
update_interval 1
uppercase no
use_xft yes
xftfont Ubuntu Mono:size=9.5 # caviar dreams:size=8
xftalpha 0.5
# Window specifications #
own_window_class Conky
own_window yes
own_window_type desktop
own_window_transparent yes
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
draw_outline no
draw_borders no
draw_graph_borders no
# Positioning & Colors
alignment tr
gap_x 192
gap_y 55
# minimum_size 200 250
# maximum_width 200
default_color FF6600
color0 FF6600
color1 DD5500
color2 BB4400
color3 993300
color4 772200
color5 DDDDDD
color6 BBBBBB
color7 999999
color8 777777
color9 555555
TEXT
${color 551100}${execpi 3600 YEAR=`date --date='2 months ago' +%_Y`; MONTH=`date --date='2 months ago' +%_m`; cal -m $MONTH $YEAR}
${hr}
${color4}${execpi 3600 YEAR=`date --date='1 month ago' +%_Y`; MONTH=`date --date='1 month ago' +%_m`; cal -m $MONTH $YEAR}
${hr}
${alignc}${color6}${time %B %G}
${color2}${execpi 3600 DJS=`date +%_d`; cal -h | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/ /' | sed /" $DJS "/s/" $DJS "/" "'${color5}'"$DJS"'${color2}'" "/}
${hr}
${color4}${execpi 3600 YEAR=`date --date='1 month' +%_Y`; MONTH=`date --date='1 month' +%_m`; cal -m $MONTH $YEAR}
${hr}
${color 551100}${execpi 3600 YEAR=`date --date='2 months' +%_Y`; MONTH=`date --date='2 months' +%_m`; cal -m $MONTH $YEAR}
Finally, I had two other scripts, one with the system info and one with clementine info via anowplaying.py script... then I realized I could just combine them. I commented out redundant bars (that are in the lua rings in .conky_tr) which allowed it all to fit on my 1920x1080 screen. I grabbed a copy of the Danish flag and the Californian flag for the times at the bottom (I'm in CA, a friend in DK). I'm still used to seeing the time in the lower-right, but I removed it from my panel so I can use it in conky and have both times with flags near them.
Code for conky_br:
Code:
# conky_br -> clementine/detailed sysinfo/top-processes/multi-clock
# mangled by myrkat
# Basic Settings
background no
cpu_avg_samples 3
double_buffer yes
imlib_cache_size 0
net_avg_samples 3
no_buffers yes
override_utf8_locale yes
temperature_unit celsius # fahrenheit
text_buffer_size 2048
total_run_times 0
update_interval 1
uppercase no
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
# Window specifications #
own_window_class Conky
own_window yes
own_window_type desktop
own_window_transparent yes
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
draw_outline no
draw_borders no
draw_graph_borders yes # just for conky_br
# Positioning & Colors
alignment br
gap_x 15
gap_y 15
minimum_size 310 300
maximum_width 310
default_color FFFFFF
color0 FF6600
color1 DD5500
color2 BB4400
color3 993300
color4 772200
color5 DDDDDD
color6 BBBBBB
color7 999999
color8 777777
color9 555555
TEXT
${color1}${voffset -1}$hr
${color0}${font :size=9}${goto 76}${execi 5 python2 ./.conky/anowplaying.py -a}
${color7}${font :bold:size=10}${goto 76}${execi 5 python2 ./.conky/anowplaying.py -t}
${color2}${font :size=8}${goto 76}${execi 5 python2 ./.conky/anowplaying.py -l} (${execi 5 python2 ./.conky/anowplaying.py -y})
${color8}${font :italic:size=7}${goto 76}Track ${execi 5 python2 ./.conky/anowplaying.py -n} -> ${execi 5 python2 ./.conky/anowplaying.py -m} total time
${color1}${voffset 3}$hr
${execi 5 python2 ./.conky/anowplaying.py -c /tmp/cover.jpg}${image /tmp/cover.jpg -p 0,7 -s 73x73 -n}
${color1}${font :size=9}$alignr $nodename ($machine) uptime: $uptime
${color2}$alignr${pre_exec cat /etc/issue.net} ~ $kernel
${color1}${voffset -8}$hr
${color0}CPU Usage: ${alignr}${color1}$cpu% @${freq_g cpu}GHz
#${color2}${cpubar 8}
${color9}${voffset -4}${cpugraph 16,310 000000 ff6600}
${color0}RAM ${alignr}${color1}$mem / $memmax ($memperc%)
#${color2}${membar 8}
${color0}SWAP ${alignr}${color1}$swap / $swapmax ($swapperc%)
#${color2}${swapbar 8}
${color1}${voffset -6}$hr
${color0}Highest CPU & Memory $alignr CPU% MEM%
${color6}${top name 1}$alignr${top cpu 1} ${top mem 1}
${color7}${top name 2}$alignr${top cpu 2} ${top mem 2}
${color8}${top name 3}$alignr${top cpu 3} ${top mem 3}
${color9}${top name 4}$alignr${top cpu 4} ${top mem 4}
${color 333333}${top name 5}$alignr${top cpu 5} ${top mem 5}
${color 222222}${top name 6}$alignr${top cpu 6} ${top mem 6}
${color2}${voffset -6}${hr}
${color1}HDD Read: ${alignc}${color2}${diskio_read}/s ${alignr}${color2}${diskio_write}/s ${color1} :HDD Write
${color9}${voffset -4}${diskiograph_read 16,150 000000 ff6600} ${alignr}${color9}${diskiograph_write 16,150 000000 ff6600}
${color2}${voffset -6}Ext IP: ${color0}${execpi 3600 wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//';} ${alignr}${color2}Int IP: ${color0}${addr eth0}
${color2}Download: ${color3}${downspeed eth0} k/s ${alignr}${color3}${upspeed eth0} k/s ${color2}:Upload
${color9}${voffset -4}${downspeedgraph eth0 16,150 000000 ff6600} ${alignr}${upspeedgraph eth0 16,150 000000 ff6600}
${color1}${voffset -6}Total Download: ${color7}${totaldown eth0} ${alignr}${color1}Total Upload: ${color7}${totalup eth0}
#${color}${font caviar dreams:size=14}${alignr}${time %H}:${time %M}
${color8}${font caviar dreams:size=14}${goto 0}${tztime Europe/Copenhagen %H:%M}${color6}${alignr}${tztime America/Los_Angeles %H:%M}${image /home/myrkat/.conky/denmark.png -p 56,411}${image /home/myrkat/.conky/california.png -p 228,411}
I suppose I could do this all in one giant conky if I knew lua or python or something, yeah? Or maybe even if I really got into the voffset and goto stuff... not sure; what I do know is that it all works this way! I keep everything in the .conky directory (clock_rings.lua, anowplaying.py, the graphic images, the scripts) and I have a #! /bin/bash that I added to the auto-start apps:
Code:
#! /bin/bash
sleep 6 &
conky -c ./.conky/.conky_tr &
conky -c ./.conky/.conky_br &
conky -c ./.conky/.conky_tm
(the sleep 6 is there to let the desktop fully start up, etc.)
Thank you for reading/viewing. PM me if you have questions, comments or snide remarks!
Bookmarks