Intel ® P4 Extreme Edition 3.4 (Gallatin) || DFI ® LanParty PRO875B rev B1
Crucial ® Ballistix Tracer PC4000 1GB || Mountain Mods U2-UFO Opti-1203
XFX 7600GT 560M AGP (PV-T73A-UDF3) || Corsair HX520W Modular PSU
I'm trying to use ${if_match to make my updates be more standoutish when there's new updates and no new updates.
the bit above the space is the experimental part, it's just defaulting to Red "No Updates" although it should be displaying light blue "6 Updates", I posted a screen pic.Code:TEXT ############################## ## SYSTEM ## ############################## ${voffset -6}${font DroidSans:bold:size=8.25}${color4}SYSTEM${color8}${hr 2}${font} ${if_match ${execi 1700 aptitude search "~U" | wc -l | tail} == "0"}${font DroidSansFallback:size=8.3}${color red} No Updates ${else}${font DroidSansFallback:size=8.3}${color light blue}${execi 1700 aptitude search "~U" | wc -l | tail} Updates ${font}${endif} ${color brown}Updates Available: ${execi 1700 aptitude search "~U" | wc -l | tail}${font DroidSans:size=8.65}${goto 119}Ubuntu Version: ${pre_exec lsb_release -r -s}${goto 244}Uptime: $uptime ${voffset -23}
Last edited by Aquix; April 19th, 2011 at 10:07 AM.
Here is my conky...
conkyrc
Code:update_interval 2 cpu_avg_samples 2 net_avg_samples 2 temperature_unit celsius double_buffer yes no_buffers yes text_buffer_size 2048 gap_x 30 gap_y 20 minimum_size 120 maximum_width 120 own_window yes own_window_type override own_window_transparent yes own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below border_inner_margin 30 border_outer_margin 0 alignment tr draw_shades yes draw_outline no draw_borders no draw_graph_borders no override_utf8_locale yes use_xft yes xftfont ubuntu:size=7 xftalpha 1.0 uppercase no top_name_width 10 default_color FFFFFF color1 DDDDDD color2 BBBBBB color3 999999 color4 BBBBBB lua_load ~/.conky/conky.lua lua_draw_hook_pre draw_bg #ACER #${goto 55}${font Ubuntu:size=7,weight:normal}${color}CPU: ${alignr}${execi 8 sensors | grep "temp1:" | cut -c15-16}°C TEXT ${voffset 45}${font Ubuntu:size=18,weight:bold}${color4}SYSTEM${font Ubuntu:size=7,weight:normal}${voffset 5} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}${alignr}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2- | sed 's#Processor ##'} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Freq: ${alignr}${freq} Mhz ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Mem: ${alignr}$memmax ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Gpu: ${alignr}${execi 99999 nvidia-settings -q gpus |grep '0] (' | cut -d '(' -f 2,2 | sed -e 's/.\{1\}$//'} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Linux: ${alignr}$kernel ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Hostname: ${alignr}$nodename ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Uptime: ${alignr}$uptime #CPU ${font Ubuntu:size=18,weight:bold}${color4}CPU${font Ubuntu:size=7,weight:normal}${voffset 5} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}In uso${alignr}${cpu}% ${goto 50}${font Ubuntu:size=7,weight:normal}${color1}${top name 1}${alignr}${top cpu 1}% ${goto 50}${font Ubuntu:size=7,weight:normal}${color2}${top name 2}${alignr}${top cpu 2}% ${goto 50}${font Ubuntu:size=7,weight:normal}${color3}${top name 3}${alignr}${top cpu 3}% #MEM ${font Ubuntu:size=18,weight:bold}${color4}MEM${font Ubuntu:size=7,weight:normal}${voffset 5} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Swap${alignr}${swapperc}% ${goto 50}${font Ubuntu:size=7,weight:normal}${color}In uso${alignr}${mem} ${goto 50}${font Ubuntu:size=7,weight:normal}${color1}${top_mem name 1}${alignr}${top_mem mem_res 1} ${goto 50}${font Ubuntu:size=7,weight:normal}${color2}${top_mem name 2}${alignr}${top_mem mem_res 2} ${goto 50}${font Ubuntu:size=7,weight:normal}${color3}${top_mem name 3}${alignr}${top_mem mem_res 3} #HDD ${font Ubuntu:size=18,weight:bold}${color4}HDD${font Ubuntu:size=7,weight:normal}${voffset 5} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Home: ${alignr}${fs_free /home} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Estesa: ${alignr}${fs_free /media/Estesa} #NET ${font Ubuntu:size=18,weight:bold}${color4}NET${font Ubuntu:size=7,weight:normal}${voffset 5} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}IP: ${alignr}${alignr}${addr eth1} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Download: ${alignr}${downspeed eth0}/s ${goto 50}${font Ubuntu:size=7,weight:normal}${color}Upload: ${alignr}${upspeed eth0}/s #TEMP ${font Ubuntu:size=18,weight:bold}${color4}TEMP${font Ubuntu:size=7,weight:normal}${voffset 5} ${goto 50}${font Ubuntu:size=7,weight:normal}${color}CPU: ${alignr}${execi 8 sensors | grep "CPU Temperature:" | cut -c21-22}°C ${goto 50}${font Ubuntu:size=7,weight:normal}${color}MB: ${alignr}${execi 8 sensors | grep "MB Temperature:" | cut -c21-22}°C ${goto 50}${font Ubuntu:size=7,weight:normal}${color}GPU: ${alignr}${nvidia temp}°C ${goto 50}${font Ubuntu:size=7,weight:normal}${color}HD1: ${alignr}${hddtemp /dev/sda}°C ${goto 50}${font Ubuntu:size=7,weight:normal}${color}HD2: ${alignr}${hddtemp /dev/sdb}°C ${voffset 297}
conky.lua
I'd like to add a lightweigth calendar and weather, any hints? ... nevermind, found itCode:require 'cairo' corner_r=0 bg_colour=0x000 bg_alpha=0.2 function rgb_to_r_g_b(colour, alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end function conky_draw_bg() if conky_window==nil then return end local w=conky_window.width local h=conky_window.height local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h) cr=cairo_create(cs) cairo_move_to(cr,corner_r,0) cairo_line_to(cr,w-corner_r,0) cairo_curve_to(cr,w,0,w,0,w,corner_r) cairo_line_to(cr,w,h-corner_r) cairo_curve_to(cr,w,h,w,h,w-corner_r,h) cairo_line_to(cr,corner_r,h) cairo_curve_to(cr,0,h,0,h,0,h-corner_r) cairo_line_to(cr,0,corner_r) cairo_curve_to(cr,0,0,0,0,corner_r,0) cairo_close_path(cr) cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha)) cairo_fill(cr) end
Last edited by lucazade; April 19th, 2011 at 12:37 PM.
I'm a super power user
here's my conky setup, i'll have the script on later.. been up all night configuring it to my tasting
The configuration file:
Need to add --imperial for degrees F.Code:# conky configuration # edited by (Kaivalagi) # set to yes if you want Conky to be forked in the background background yes # X font when Xft is disabled, you can pick one with program xfontsel #font 5x7 #font 6x10 #font 7x13 #font 8x13 #font 9x15 #font *mintsmild.se* #font -*-*-*-*-*-*-34-*-*-*-*-*-*-* # Use Xft? use_xft yes # Xft font when Xft is enabled #xftfont Droid Sans Mono:pixelsize=10 xftfont Ubuntu:pixelsize=12 # Text alpha when using Xft xftalpha 0.9 # Update interval in seconds update_interval 3600 # This is the number of times Conky will update before quitting. # Set to zero to run forever. total_run_times 0 # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # Minimum size of text area77 minimum_size 290 0 maximum_width 290 # Draw shades? draw_shades no # Draw outlines? draw_outline no # Draw borders around text draw_borders no draw_graph_borders no # Stippled borders? stippled_borders 8 border_inner_margin 2 border_outer_margin 1 border_width 1 # Default colors and also border colors default_color 040404 default_shade_color black default_outline_color white # own window options own_window yes own_window_transparent yes own_window_type normal own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Text alignment, other possible values are commented #alignment tl alignment top_right #alignment bottom_left #alignment br # Gap between borders of screen and text # same thing as passing -x at command line gap_x 20 gap_y 56 # Subtract file system buffers from used memory? no_buffers yes # set to yes if you want all text to be in uppercase uppercase no # number of cpu samples to average # set to 1 to disable averaging cpu_avg_samples 2 # number of net samples to average # set to 1 to disable averaging net_avg_samples 2 # Force UTF8? note that UTF8 support required XFT override_utf8_locale yes # Add spaces to keep things from moving about? This only affects certain objects. use_spacer right # colours color1 white # light blue color2 6892C6 # orange #E77320 color3 FC8820 # green color4 78BF39 # red color5 CC0000 text_buffer_size 2048 lua_load ~/conky/conky_luabgw.lua lua_draw_hook_pre draw_bg # variable is given either in format $variable or in ${variable}. Latter # allows characters right after the variable and must be used in network # stuff because of an argumentsss # stuff after 'TEXT' will be formatted on screen TEXT ${execpi 1200 conkyForecast --location=<Your Location> --imperial --template=~/conky/Weather}
The (messy) template:
and the script to get the tinybuddha quote:Code:emp:${goto 140}[--datatype=HT]${offset 10}[--datatype=CC] Humidity:${goto 140}[--datatype=HM] Wind:${goto 140}[--datatype=WS --imperial]${offset 10}[--datatype=WD] Sunrise:${goto 140}[--datatype=SR] Sunset:${goto 140}[--datatype=SS] Four Day Forecast:${goto 140}[--datatype=LU] ${voffset 4}${goto 14}[--datatype=DW --startday=1 --endday=4 --shortweekday --spaces=16] ${voffset 4}${goto 10}${font ConkyWeather:size=24}[--datatype=WF --startday=1 --endday=4 --spaces=5]${font ubuntu:pixelsize=10} [--datatype=HT --startday=1]/[--datatype=LT --startday=1] [--datatype=HT --startday=2]/[--datatype=LT --startday=2] [--datatype=HT --startday=3]/[--datatype=LT --startday=3] [--datatype=HT --startday=4]/[--datatype=LT --startday=4]
Code:#!/bin/bash # tinybuddha.sh # copyright 2010 by Mobilediesel #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/>. if ping -c1 tinybuddha.com 1>/dev/null then tinybuddha=$(curl --silent --connect-timeout 45 'http://tinybuddha.com/category/quotes/' | grep -m 1 '<blockquote>' | tr -d '\n\r' | sed -e 's/<[^>]*>//g' -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//' | fold -sw 55) else tinybuddha= fi echo "$tinybuddha"
The mark of an honest man ... is that he means what he says and knows what he means.
A.R.
Code:${voffset 5}${goto 10}${color slate grey}${font ConkyWeather:style=Bold:size=40}[--datatype=WF]${font} ${voffset 5}${goto 20}${color white}[--datatype=HT --hideunits --imperial --centeredwidth=3]/[--datatype=LT --hideunits --imperial --centeredwidth=3] ${voffset 10}${goto 10}${color slate grey}${font ConkyWindNESW:size=40}[--datatype=BS]${font} ${voffset 5}${goto 10}${color white}[--datatype=WS --imperial] - [--datatype=WD] ${voffset -145}${goto 100}${color white}${font Bitstream Vera Sans Mono:style=Bold:size=14}[--datatype=CT]${font} ${voffset 10}${goto 100}${color light blue}Station: ${color1}[--datatype=OB] ${goto 100}${color light blue}Rain: ${color1}[--datatype=PC] ${goto 100}${color light blue}UV: ${color1}[--datatype=UI] - [--datatype=UT] ${goto 100}${color light blue}Humidity: ${color1}[--datatype=HM] ${goto 100}${color light blue}Dew Point: ${color1}[--datatype=DP --imperial] ${goto 100}${color light blue}Sunrise/Set: ${color1}[--datatype=SR] / [--datatype=SS] ${goto 100}${color light blue}Bar: ${color1}[--datatype=BR] - [--datatype=BD] ${goto 100}${color light blue}Moon: ${color1}[--datatype=MP] ${voffset 25}${color slate grey}${goto 25}[--datatype=DW --startday=1 --shortweekday]${goto 100}[--datatype=DW --startday=2 --shortweekday]${goto 175}[--datatype=DW --startday=3 --shortweekday]${goto 250}[--datatype=DW --startday=4 --shortweekday] ${voffset 10}${goto 10}${font ConkyWeather:size=32}[--datatype=WF --startday=1 --endday=4 --spaces=3]${font} ${voffset 15}${goto 15}${color white}[--datatype=HT --hideunits --imperial --startday=1 --centeredwidth=3]/[--datatype=LT --hideunits --imperial --startday=1 --centeredwidth=3]${goto 90}[--datatype=HT --hideunits --imperial --startday=2 --centeredwidth=3]/[--datatype=LT --hideunits --imperial --startday=2 --centeredwidth=3]${goto 170}[--datatype=HT --hideunits --imperial --startday=3 --centeredwidth=3]/[--datatype=LT --hideunits --imperial --startday=3 --centeredwidth=3]${goto 245}[--datatype=HT --hideunits --imperial --startday=4 --centeredwidth=3]/[--datatype=LT --hideunits --imperial --startday=4 --centeredwidth=3]
just tried this out and all you have to do is remove the " around the 0
if you ever get something that you think should work but doesn't try launching conky via the terminal, thats what gave me the solution this time
Code:Conky: trying to compare args '15 ' and ' "0"' of different type Conky: compare failed for expression '15 == "0"'
Bookmarks