See Stuff in Red
Image tags are not responsible to the where they are in the conky line. The -p (position) tag tells it where to line up. Bear in mind that if you put these image tags on a new line, the rest of your conky will move down accordingly. You can either use ${voffset}s to fix it, or place them all on one line somewhere [${image ...}${image ...}${image ...} ]
I also included a $if existing, so if you wanted to place a monitor on your thumbdrive or other multimedia device that you can plug and unplug, it is displayed in the conky.
You'll have to play with the -p tags to get them positioned correctly. Also, if you are going to size (-s tag), bear it mind it's better to scale the image yourself so conky doesn't have to every time it refreshed. As I noted above, the $offsets after the $image need to correlate to the size of the image, or they'll run behind the image because images are not verbatim as is the text.
Ubuntu User #29918 | Linux User #501271 |
I've found an easy way to do that just by adding " ${execpi 30 ~/.conky/conkyHD1.py} " and edit conkyHD1.py script acording to my partitions.
Thank you for help Mahngiel .
I think i can pass the alignment problem with cpu temperature, so here is my final conky script and screenshot.
Code:use_xft yes xftfont Liberation Sans:size=8 override_utf8_locale yes text_buffer_size 2048 update_interval 1 total_run_times 0 double_buffer yes no_buffers yes net_avg_samples 1 cpu_avg_samples 1 own_window yes own_window_type override own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager default_color D8D8D8 draw_borders no border_width 1 draw_graph_borders yes draw_outline no draw_shades no color0 E6E6E6 color1 3465A4 color2 E6E6E6 alignment top_right gap_x 25 gap_y 50 minimum_size 182 0 maximum_width 182 default_bar_size 60 8 imlib_cache_size 0 TEXT ${font Liberation Sans:style=Bold:size=8}SYSTEM $stippled_hr${font} ${color0}${voffset 6}${font OpenLogos:size=19}u${font}${color}${goto 38}${voffset -14}Kernel: ${alignr}${color2}${kernel}${color} ${goto 38}Uptime: ${alignr}${color2}${uptime}${color} ${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -16}${goto 38}CPU1 :${font Liberation Sans:style=Bold:size=8}${color1}${cpu cpu1}%${font} ${alignr}${font Liberation Sans:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core 0' | cut -c15-16}${hwmon 1 temp 1}°C${color}${font} ${color2}${cpugraph cpu1 8,50 204A87 3465A4}${color} ${goto 38}CPU2: ${font Liberation Sans:style=Bold:size=8}${color1}${cpu cpu2}%${font} ${alignr}${font Liberation Sans:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core 1' | cut -c15-16}${hwmon 1 temp 1}°C${color}${font} ${color2}${cpugraph cpu2 8,50 204A87 3465A4}${color} ${color0}${font Poky:size=16}M${font}${color}${goto 38}${voffset -7}RAM: ${font Liberation Sans:style=Bold:size=8}${color1}$memperc%${color}${font} ${offset 1}${voffset 2}${color2}${membar 4,18}${color}${goto 38}${voffset -2}F: ${color2}${memeasyfree}${color} U: ${color2}${mem}${color} ${voffset 2}${color0}${font Poky:size=15}a${font}${color}${goto 38}${voffset -10}Processes: ${color2}${alignr 13}CPU${alignr}RAM${color} ${voffset -1}${goto 46}${color2}${top name 1}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 127}${top cpu 1}${alignr }${top mem 1}${color}${font} ${voffset -1}${goto 46}${color2}${top name 2}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 127}${top cpu 2}${alignr }${top mem 2}${color}${font} ${voffset -1}${goto 46}${color2}${top name 3}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 127}${top cpu 3}${alignr }${top mem 3}${color}${font} ${voffset -1}${goto 46}${color2}${top name 4}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 127}${top cpu 4}${alignr }${top mem 4}${color}${font} ${voffset -1}${goto 46}${color2}${top name 5}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 127}${top cpu 5}${alignr }${top mem 5}${color}${font} ${voffset 4}${font Liberation Sans:style=Bold:size=8}DATE $stippled_hr${font} ${voffset -10}${alignc 46}${color2}${font Arial Black:size=30}${time %H:%M}${font}${color} ${alignc}${time %d %B %Y} ${voffset -2}${color0}${font Poky:size=15}d${font}${color}${voffset -8}${font Liberation Mono:size=8}${execpi 10800 DJS=`date +%-d`; cal -m | sed 's/^/${goto 38} /' | sed '1d' | sed s/" $DJS "/" "'${font Liberation Mono:style=bold:size=8}${color1}'"$DJS"'${color}${font}${font Liberation Mono:size=8}'" "/}${font}${font}${voffset -14} ${voffset 4}${font Liberation Sans:style=Bold:size=8}HDD $stippled_hr${font} ${execpi 30 ~/.conky/conkyHD1.py} ${voffset 4}${font Liberation Sans:style=Bold:size=8}NETWORK $stippled_hr${font} ${if_existing /proc/net/route ppp0} ${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 38}${voffset -6}Up: ${font Liberation Sans:style=Bold:size=8}${color1}${upspeed ppp0}${color}${font} ${alignr}${color2}${upspeedgraph ppp0 8,60 204A87 3465A4}${color} ${goto 38}Total: ${color2}${totalup ppp0}${color} ${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 38}${voffset -6}Down: ${font Liberation Sans:style=Bold:size=8}${color1}${downspeed ppp0}${color}${font} ${alignr}${color2}${downspeedgraph ppp0 8,60 204A87 3465A4}${color} ${goto 38}Total: ${color2}${totaldown ppp0}${color} ${voffset -2}${color0}${font Poky:size=14}Y${font}${color}${goto 38} ${voffset -2}#Signal: ${font Liberation Sans:style=Bold:size=8}${color1}${wireless_link_qual wlan0}%#${color}${font} ${alignr}${color2}${wireless_link_bar 8,60 wlan0}${color} #${voffset 4}${color0}${font Poky:size=13}w${font}${color}${goto 38}${voffset -8}Local IP: ${alignr}${color2}${addr wlan0}${color} ${goto 38}Public IP: ${alignr}${color2}${execi 10800 ~/.conkycolors/bin/conkyIp}${color} ${else}${if_existing /proc/net/route eth0} ${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 38}${voffset -6}Up: ${font Liberation Sans:style=Bold:size=8}${color1}${upspeed eth0}${color}${font} ${alignr}${color2}${upspeedgraph eth0 8,60 204A87 3465A4}${color} ${goto 38}Total: ${color2}${totalup eth0}${color} ${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 38}${voffset -6}Down: ${font Liberation Sans:style=Bold:size=8}${color1}${downspeed eth0}${color}${font} ${alignr}${color2}${downspeedgraph eth0 8,60 204A87 3465A4}${color} ${goto 38}Total: ${color2}${totaldown eth0}${color} ${voffset -2}${color0}${font Poky:size=13}w${font}${color}${goto 38}${voffset -4}Local IP: ${alignr}${color2}${addr eth0}${color} ${goto 38}Public IP: ${alignr}${color2}${execi 10800 ~/.conkycolors/bin/conkyIp}${color} ${endif}${else}${if_existing /proc/net/route ppp0} ${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 38}${voffset -6}Up: ${font Liberation Sans:style=Bold:size=8}${color1}${upspeed ppp0}${color}${font} ${alignr}${color2}${upspeedgraph ppp0 8,60 204A87 3465A4}${color} ${goto 38}Total: ${color2}${totalup ppp0}${color} ${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 38}${voffset -6}Down: ${font Liberation Sans:style=Bold:size=8}${color1}${downspeed ppp0}${color}${font} ${alignr}${color2}${downspeedgraph ppp0 8,60 204A87 3465A4}${color} ${goto 38}Total: ${color2}${totaldown ppp0}${color} ${voffset -2}${color0}${font Poky:size=13}w${font}${color}${goto 38}${voffset -4}Local IP: ${alignr}${color2}${addr ppp0}${color} ${endif}${else}${voffset 4}${color0}${font PizzaDude Bullets:size=12}4${font}${color}${goto 38}Network Unavailable${endif}${endif} ${voffset -8}${font Liberation Sans:style=Bold:size=8}WEATHER $stippled_hr${font} ${if_existing /proc/net/route wlan0} ${execpi 10800 ~/.conkycolors/bin/conkyForecast --location=ROXX0011 -t ~/.conkycolors/templates/conkyForecast.template} ${else}${if_existing /proc/net/route eth0} ${execpi 10800 ~/.conkycolors/bin/conkyForecast --location=ROXX0011 -t ~/.conkycolors/templates/conkyForecast.template} ${endif}${else}${if_existing /proc/net/route ppp0} ${execpi 10800 ~/.conkycolors/bin/conkyForecast --location=ROXX0011 -t ~/.conkycolors/templates/conkyForecast.template} ${endif}${else}${voffset 4}${color0}${font PizzaDude Bullets:size=12}4${font}${color}${goto 38}Weather Unavailable${endif}${endif}
Last edited by Aly007; February 24th, 2010 at 12:36 PM.
Anybody know how to put the Exaile progress bar in Conky?
I made this fake image in Gimp.
Greetings!
Microsoft gives you "windows", Linux a "home"!
No problem, here is my conkyHD1.py :
Code:#!/usr/bin/env python import sys import os import subprocess # root filesystem print "${voffset -2}${color0}${font Poky:size=15}y${font}${color}${offset 6}${voffset -7}Root: ${font Liberation Sans:style=Bold:size=8}${color1}${fs_free_perc /}%${color}${font}" print "${voffset 2}${color0}${fs_bar 4,20 /}${color}${offset 8}${voffset -2}Free:${color2}${fs_free /}${color} Used:${color2}${fs_used /}${color}" print "${voffset -2}${color0}${font Poky:size=15}y${font}${color}${offset 6}${voffset -7}E: ${font Liberation Sans:style=Bold:size=8}${color1}${fs_free_perc /media/EAD06F7DD06F4EBF}%${color}${font}" print "${voffset 2}${color0}${fs_bar 4,20 /media/EAD06F7DD06F4EBF}${color}${offset 8}${voffset -2}Free:${color2}${fs_free /media/EAD06F7DD06F4EBF}${color} Used:${color2}${fs_used /media/EAD06F7DD06F4EBF}${color}" print "${voffset -2}${color0}${font Poky:size=15}y${font}${color}${offset 6}${voffset -7}F: ${font Liberation Sans:style=Bold:size=8}${color1}${fs_free_perc /media/78B058F9B058BF76}%${color}${font}" print "${voffset 2}${color0}${fs_bar 4,20 /media/78B058F9B058BF76}${color}${offset 8}${voffset -2}Free:${color2}${fs_free /media/78B058F9B058BF76}${color} Used:${color2}${fs_used /media/78B058F9B058BF76}${color}" # /home folder (if its a separate mount point) if os.path.ismount("/home"): print "${voffset -2}${color0}${font Poky:size=15}y${font}${color}${offset 6}${voffset -7}Home: ${font Liberation Sans:style=Bold:size=8}${color1}${fs_free_perc /home}%${color}${font}" print "${voffset 2}${color0}${fs_bar 4,20 /home}${color}${offset 8}${voffset -2}F:${color2}${fs_free /home}${color} U:${color2}${fs_used /home}${color}" # folder in /media #for device in os.listdir("/media/"): #if (not device.startswith("cdrom")) and (os.path.ismount('/media/'+device)): # print "${voffset -2}${color0}${font Poky:size=15}y${font}${color}${offset 6}${voffset -7}"+device.capitalize()+": ${font Liberation Sans:style=Bold:size=8}${color1}${fs_free_perc /media/"+device+"}%${color}${font}" # print "${voffset 2}${color0}${fs_bar 4,20 /media/"+device+"}${color}${offset 8}${voffset -2}Free:${color2}${fs_free /media/"+device+"}${color} Used:${color2}${fs_used /media/"+device+"}${color}"
Go [here] to get K's ppa, then apt-get conkyExail
Ubuntu User #29918 | Linux User #501271 |
Does anyone know why the colors aren't working?Code:# Conky, a system monitor, based on torsmo # # Any original torsmo code is licensed under the BSD license # # All code written since the fork of torsmo is licensed under the GPL # # Please see COPYING for details # # Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen # Copyright (c) 2005-2007 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS) # All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # $Id: conky.conf 1193 2008-06-21 20:37:58Z ngarofil $ background yes use_xft yes xftfont HandelGotD:size=9 xftalpha 0.5 update_interval 1.0 total_run_times 0 own_window yes own_window_type normal own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager double_buffer yes minimum_size 200 5 maximum_width 219 draw_shades no draw_outline no draw_borders no draw_graph_borders no default_color #e04614 default_shade_color #e04614 default_outline_color #e04614 alignment top_right gap_x 12 gap_y 48 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale yes text_buffer_size 1024 TEXT $sysname $kernel on $machine Uptime $alignr $uptime Load $alignr $loadavg Hostname $alignr $nodename ${if_up wlan0}${color #e04614}WIRELESS (IP: ${addr wlan0}- : ${wireless_link_qual_perc wlan0}%) ${hr 2}${color #e04614} ${color #e04614} ${alignr}Rate: ${wireless_bitrate wlan0}${color #e04614} ${color #e04614}Down: ${downspeed wlan0} kB/s ${alignr}Up: ${upspeed wlan0} kB/s ${color #e04614} ${color #e04614}${downspeedgraph wlan0 25,140 000000 970300} ${alignr}${upspeedgraph wlan0 25,140 000000 297F00}${color #e04614} ${color #e04614}Total: ${totaldown wlan0} ${alignr}Total: ${totalup wlan}$color$endif $processes processes ($running_processes running) CPU $alignr ${cpu cpu0}% ${cpubar cpu0} MEM $alignc $mem / $memmax $alignr $memperc% $membar /Ubuntu $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_free_perc /}% ${fs_bar /} /Windows $alignc ${fs_used /host} / ${fs_size /host} $alignr ${fs_free_perc /host}% ${fs_bar /host} /Media1 $alignc ${fs_used /mnt/sda2/} / ${fs_size /mnt/sda2/} $alignr ${fs_free_perc /mnt/sda2/}% ${fs_bar /mnt/sda2/} /Media2 $alignc ${fs_used /mnt/sda1/} / ${fs_size /mnt/sda1/} $alignr ${fs_free_perc /mnt/sda1/}% ${fs_bar /mnt/sda1/} swap $alignc $swap / $swapmax $alignr $swapperc% ${swapbar}
Bookmarks