Conky Showoff thread

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Handsome Rob

Re: Conky Showoff thread

Post by Handsome Rob »

mmesantos1 wrote:Ok new conky mod. :D

Download Link: http://mmesantos1.deviantart.com/#/d5f1xyq
Image
Kanged!

Thanks.

Image
Handsome Rob

Re: Conky Showoff thread

Post by Handsome Rob »

dbl
Orbmiser

Re: Conky Showoff thread

Post by Orbmiser »

Handsome Rob wrote:
mmesantos1 wrote:Ok new conky mod. :D

Download Link: http://mmesantos1.deviantart.com/#/d5f1xyq
Image
Wasn't transparent on my Kde setup until I added:
So I imagine if your running any kind of compositor then those lines may be needed for transparency.

Code: Select all

own_window_argb_visual yes	# true transparency, a compositor has to be active
own_window_argb_value 0	# make the background semi-transparent
Adjust the own_window_argb_value 0-100 depending on how much tinting you are wanting.

On Dual Displays you will need to add:

Code: Select all

alignment top_left
#alignment top_right
gap_x 2250
gap_y 0
Have alignment top_left selected and top_right commented out. So adjust whether you want it on left display or right.
Also the gap_x 2250 is for center of 2nd right display 1680x1050. Adjust to your preference for monitor size and resolution.

As usual mmesantos1 does Outstanding works and is a Demon with his collection of themes,conky's,etc..
Good Works mmesantos!
.
Earro

Re: Conky Showoff thread

Post by Earro »

Screenshot.png
My attempt at "lightweight" mint
Sector11

Re: Conky Showoff thread

Post by Sector11 »

This is my current setup
Image
1920x1080
  • Conky on the right uses mrpeachy's 'mounted.lua' to monitor external mounted devices only, of which there are 4 in the image.
  • "mounted.lua" does monitor ALL devices if you want it to.
  • Add your own images or delete the calls.

Code: Select all

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Top Left

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes # Options: yes or no

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 255

minimum_size 230 0	## width, height
maximum_width 230	## width

gap_x 10	### left &right
gap_y 10	### up & down

alignment tr
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=12 ##14
#xftfont White Rabbit:size=9

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10conky -c /media/5/Conky/S11-Top_Left.conky &
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

default_color DCDCDC #220 220 220	Gainsboro
color0 8FBC8F #143 188 143	DarkSeaGreen
color1 778899 #119 136 153	LightSlateGray
color2 FF8C00 #255 140   0	DarkOrange
color3 7FFF00 #127 255   0	Chartreuse
color4 FFA07A #255 160 122	LightSalmon
color5 FFDEAD #255 222 173	NavajoWhite
color6 00BFFF #  0 191 255	DeepSkyBlue
color7 00FFFF #  0 255 255	Cyan
color8 FFFF00 #255 255   0	Yellow
color9 B22222 #178  34  34	FireBrick ##FF0000 #255   0   0	Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.

imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.2
#lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.2
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
##
#
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###

update_interval 1
TEXT
${lua get_mounted_data 3}${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}\
${image /media/5/Conky/images/EVE.png -p 15,0 -s 60x60}\
${image /media/5/Conky/images/Wall.E.png -p 55,0 -s 60x60}\
${image /media/5/Conky/images/S11_128.png -p 0,100 -s 60x60}\
${color5}${alignr 5}${time %x}
${alignr 5}${time %T}
${alignr 5}${uptime_short}${color}

${alignc}${kernel}
${color7}${hr}${color}
${alignc}${font Dock 51:size=18}${color1}${nodename}${color}${font}

${goto 65}%   Used${goto 170}${color}  Total
Root ${color5}${fs_used_perc /}${goto 100}${fs_used /}${goto 170}${color7} ${alignr 5}${color5} ${fs_size /}${color}
Home ${color5}${fs_used_perc /home}${goto 100}${fs_used /home}${goto 170}${color7} ${alignr 5}${color5} ${fs_size /home}${color}
 M|5 ${color5}${fs_used_perc /media/5}${goto 100}${fs_used /media/5}${goto 170}${color7} ${alignr 5}${color5} ${fs_size /media/5}${color}${font Monofur:size=6}

${font} RAM ${color5}${memperc}${goto 100}${mem}${goto 170}${color7} ${alignr 5}${color5} ${memmax}${color}${font Monofur:size=6}

${font}${alignc}Avg CPU % in use ${if_match ${cpu cpu0}<10}${color1}00${color5}${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100}${color1}0${color7}${cpu cpu0}\
${else}${color9}${cpu cpu0}${endif}${endif}${color}${font Monofur:size=6}

${font}${alignc}1 ${if_match ${cpu cpu1}<10}${color1}00${color5}${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100}${color1}0${color7}${cpu cpu1}\
${else}${color9}${cpu cpu1}${endif}${endif}${color}\
    2 ${if_match ${cpu cpu2}<10}${color1}00${color5}${cpu cpu2}\
${else}${if_match ${cpu cpu2}<100}${color1}0${color7}${cpu cpu2}\
${else}${color9}${cpu cpu2}${endif}${endif}${color}\
    3 ${if_match ${cpu cpu3}<10}${color1}00${color5}${cpu cpu3}\
${else}${if_match ${cpu cpu3}<100}${color1}0${color7}${cpu cpu3}\
${else}${color9}${cpu cpu3}${endif}${endif}${color}${font Monofur:size=6}

${font}CPU Fan${alignr 5}${color5}${platform f71882fg.2560 fan 1} ${color}rpm${font Monofur:size=6}

${font}Temperatures ${color7}${hr}${color}
${alignc}CPU  ${color5}${platform f71882fg.2560 temp 1}${color}°\
     MB  ${color5}${platform f71882fg.2560 temp 2}${color}°
${alignc}GPU  ${color5}${nvidia temp}${color}°\
     HD  ${color5}${execi 5 hddtemp -n /dev/sda}${color}°${font Monofur:size=6}

${font}Graphics GPU ${color5}${nvidia temp}${color}° ${color7}${hr}${color}
GPU ${color5}${nvidia gpufreq} ${color}MHz${alignr 5}MEM ${color5}${nvidia memfreq} ${color}MHz${font Monofur:size=6}

${font}Disk Activity ${color7}${hr}${color}
R${goto 40}${diskiograph_read /dev/sda 14,130 00ffff ff0000 5 -lt}${alignr 5}${color5}${diskio_read /dev/sda}${color}
W${goto 40}${diskiograph_write /dev/sda 14,130 ff0000 00ffff 5 -lt}${alignr 5}${color5}${diskio_write /dev/sda}${color}${font Monofur:size=6}

${font}Network ${color7}${hr}${color}
Dn${goto 40}${downspeedgraph eth0 14,130 00ffff ff0000 5 -lt}${alignr 5}${color5}${downspeedf eth0}${color}
Up${goto 40}${upspeedgraph eth0 14,130 ff0000 00ffff 5 -lt}${alignr 5}${color5}${upspeedf eth0}${color}${font Monofur:size=6}

${font}Transfer Totals ${color7}${hr}${color}
${color5}rx ↓${goto 85}${color0}tx ↑${goto 170}${color5}Total
${goto 5}${color}${execpi 3600 date --date="-1 day" | awk '{print $3" "$2" "$6}'}
${color5}${execpi 300 vnstat | grep "yesterday" | awk '{print $2" "$3"\
${color0}${goto 85}"$5" "$6 "\
${color5}${goto 170}" $8" "$9}'}
${goto 5}${color}${exec date --date="0 day" | awk '{print $3" "$2" "$6}'}
${color5}${execpi 300 vnstat | grep "today" | awk '{print $2" "$3"\
${color0}${goto 85}"$5" "$6"\
${color5}${goto 170}"$8" "$9}'}
${goto 5}${color}Current Week
${color5}${execpi 300 vnstat -w | grep "current week" | awk '{print $3" "$4 "\
${color0}${goto 85}" $6" "$7 "\
${color5}${goto 170}" $9" "$10}'}
${goto 5}${color}Last Week
${color5}${execpi 300 vnstat -w | grep "last week" | awk '{print $3" "$4"\
${color0}${goto 85}" $6" "$7 "\
${color5}${goto 170}" $9" "$10}'}
${goto 5}${color}Last 7 Days
${color5}${execpi 300 vnstat -w | grep "last 7 days" | awk '{print $4" "$5 "\
${color0}${goto 85}" $7" "$8 "\
${color5}${goto 170}" $10" "$11}'}
${goto 5}${color}${time %b %Y}
${color5}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $3" "$4}'}\
${color0}${goto 85}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $6" "$7}'}\
${color5}${goto 170}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $9" "$10}'}${font Monofur:size=6}

${font}${color}External Mounted fsys ${color7}${hr}${color}
${goto 5}${color}Size${goto 60}${color0}Free${goto 110}${color4}Used${goto 160}
${color5}${lua mount 6 mount}
${goto 5}${color}${lua mount 6 size}${goto 60}${color0}${lua mount 6 free}${goto 110}${color4}${lua mount 6 use%}${goto 160}${color5}${lua mount 6 fsys 9}
${color5}${lua mount 7 mount}
${goto 5}${color}${lua mount 7 size}${goto 60}${color0}${lua mount 7 free}${goto 110}${color4}${lua mount 7 use%}${goto 160}${color5}${lua mount 7 fsys 9}
${color5}${lua mount 8 mount}
${goto 5}${color}${lua mount 8 size}${goto 60}${color0}${lua mount 8 free}${goto 110}${color4}${lua mount 8 use%}${goto 160}${color5}${lua mount 8 fsys 9}
${color5}${lua mount 9 mount}
${goto 5}${color}${lua mount 9 size}${goto 60}${color0}${lua mount 9 free}${goto 110}${color4}${lua mount 9 use%}${goto 160}${color5}${lua mount 9 fsys 9}${font}
${color7}${hr 1}${color}
${color}Trash ${color9}${execi 15 du -sh ~/.local/share/Trash/files/ | awk '{print $1}' | sed '/^4.0K/ d'  | sed 's/$/ of trash!/'}
mounted.lua

Code: Select all

--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
	for line in file:lines() do
		if string.find(line,"/dev/")~=nil then
		local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
		table.insert(fsys,fs)
		local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(size,sz)
		local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(used,us)
		local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(avail,av)
		local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(uperc,up)
		local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
		table.insert(mount,mn)
		end
	end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
else
data="check data type"
end
return data
end--end main function
Conky on the left uses mrpeachy's v9000 LUA weather script, you will need to get that if you do not have it.

Code: Select all

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal #override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title Vert_Right

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 50 760     ## width, height
maximum_width 50       ## width, usually a good idea to equal minimum width

gap_x 10 # left-right
gap_y 10 # up-down

alignment tl #top_right
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Anonymous Pro:bold:size=8
xftfont Monofur:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220	Gainsboro
color0 8FBC8F #143 188 143	DarkSeaGreen
color1 F0FFFF #240 255 255	Azure
color2 FF8C00 #255 140   0	DarkOrange
color3 7FFF00 #127 255   0	Chartreuse
color4 FFA07A #255 160 122	LightSalmon
color5 FFDEAD #255 222 173	NavajoWhite
color6 00BFFF #  0 191 255	DeepSkyBlue
color7 00FFFF #  0 255 255	Cyan
color8 FFFF00 #255 255   0	Yellow
color9 FF0000 #255   0   0    Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no #yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 1028

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
############### V9000 ########################################################
#starts the lua weather data gathering function, call once at top of conkyrc
 lua_load ~/v9000/v9000.lua
 lua_draw_hook_post weather
 lua_load /media/5/Conky/templates/S11_V9_R-template.lua
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.3}
S11_V9_R-template.lua

Code: Select all

--[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

 the file:
 http://dl.dropbox.com/u/19008369/current%20v9000/v9000.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
-- default_font="CorporateMonoExtraBold"--font must be in quotes
-- default_font_size=10
default_font="monofur"	--font must be in quotes
default_font_size=13
default_color=0xffffff	--white
default_alpha=1		--fully opaque
default_image_width=20
default_image_height=20
-- ## New Options ###
-- ##################
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
datay=15		-- ↑↓
datayh=55
datayf=75
datayy=13		--datay+(datayy*1)

imgyh=165
imgyf=190
imgyy=39		-- imgy+(imgyy*1)

 out({c=0x00FFFF,a=1,x=12,y=15,txt="BsAs"})
-- today is
out({c=0x00FFFF,a=1,x=5,y=28,txt=forecast_day_short[1]})
out({c=0x00FFFF,a=1,x=35,y=datay+datayy,txt=forecast_date[1]})
-- out({c=0x00FFFF,,a=1,x=6,y=50,txt="cpu:"..conky_parse("${cpu}")})

out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*2),txt=low_temp[1]})
out({c=0xFF8C00,a=1,x=30,y=datay+(datayy*2),txt=high_temp[1]})
  image({x=5,y=45,h=45,w=45,file=weather_icon[1]})
--image({x=5,y=45,h=45,w=45,file="/media/5/Conky/images/red+x.png"})

out({c=0xFFDEAD,a=1,x=15,y=datay+(datayy*7),txt="NOW"})
out({c=0xF0FFFF,a=1,x=7,y=datay+(datayy*8),txt=now["temp"]})
out({c=0xFFDEAD,a=1,x=30,y=datay+(datayy*8),txt=now["feels_like"]})
image({x=5,y=120,h=45,w=45,file=now["weather_icon"]})
--image({x=5,y=120,h=45,w=45,file="/media/5/Conky/images/red+x.png"})

out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*12.5),txt="B.P."})
out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*13.4),txt=now["pressure_mb"]})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*14.5),txt="Hum"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*14.5),txt=now["humidity"].."%"})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*15.5),txt="DP"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*15.5),txt=now["dew_point"].."°"})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*16.5),txt="UV"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*16.5),txt=uv_index_num[1]})
out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*17.5),txt=uv_index_txt[1]})

-- yellow line
image({w=45,h=1,x=5,y=datayh+(datayy*15),file="/media/5/Conky/images/yellow_1.png"})
out({c=0xFFDEAD,a=1,x=10,y=datayh+(datayy*16),txt="3 HRS"})
-- 3 hour output
-- 1st hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*17),txt=now["fc_hour1_time_24"]..":00"})
image({x=25,y=imgyh+(imgyy*3),file=now["fc_hour1_wicon"]})
--image({x=25,y=imgyh+(imgyy*3),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*18.5),txt=now["fc_hour1_temp"]})

-- 2nd hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*20),txt=now["fc_hour2_time_24"]..":00"})
image({x=25,y=imgyh+(imgyy*4),file=now["fc_hour2_wicon"]})
--image({x=25,y=imgyh+(imgyy*4),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*21.5),txt=now["fc_hour2_temp"]})

-- 3rd hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*23),txt=now["fc_hour3_time_24"]..":00"})
image({x=25,y=imgyh+(imgyy*5),file=now["fc_hour3_wicon"]})
--image({x=25,y=imgyh+(imgyy*5),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*24.5),txt=now["fc_hour3_temp"]})

-- start of forcast days
-- yellow line
image({w=45,h=1,x=5,y=datayf+(datayy*24.5),file="/media/5/Conky/images/yellow_1.png"})

out({c=0xFFDEAD,a=1,x=10,y=datayf+(datayy*25.5),txt="9 DAY"})
out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*26.5),txt=forecast_day_short[2]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*26.5),txt=forecast_date[2]})
image({x=25,y=imgyf+(imgyy*6),file=weather_icon[2]})
--image({x=25,y=imgyf+(imgyy*6),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*27.5),txt=high_temp[2]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*28.5),txt=low_temp[2]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*29.5),txt=forecast_day_short[3]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*29.5),txt=forecast_date[3]})
image({x=25,y=imgyf+(imgyy*7),file=weather_icon[3]})
--image({x=25,y=imgyf+(imgyy*7),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*30.5),txt=high_temp[3]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*31.5),txt=low_temp[3]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*32.5),txt=forecast_day_short[4]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*32.5),txt=forecast_date[4]})
image({x=25,y=imgyf+(imgyy*8),file=weather_icon[4]})
--image({x=25,y=imgyf+(imgyy*8),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*33.5),txt=high_temp[4]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*34.5),txt=low_temp[4]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*35.5),txt=forecast_day_short[5]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*35.5),txt=forecast_date[5]})
image({x=25,y=imgyf+(imgyy*9),file=weather_icon[5]})
--image({x=25,y=imgyf+(imgyy*9),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*36.5),txt=high_temp[5]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*37.5),txt=low_temp[5]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*38.5),txt=forecast_day_short[6]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*38.5),txt=forecast_date[6]})
image({x=25,y=imgyf+(imgyy*10),file=weather_icon[6]})
--image({x=25,y=imgyf+(imgyy*10),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*39.5),txt=high_temp[6]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*40.5),txt=low_temp[6]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*41.5),txt=forecast_day_short[7]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*41.5),txt=forecast_date[7]})
image({x=25,y=imgyf+(imgyy*11),file=weather_icon[7]})
--image({x=25,y=imgyf+(imgyy*11),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*42.5),txt=high_temp[7]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*43.5),txt=low_temp[7]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*44.5),txt=forecast_day_short[8]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*44.5),txt=forecast_date[8]})
image({x=25,y=imgyf+(imgyy*12),file=weather_icon[8]})
--image({x=25,y=imgyf+(imgyy*12),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*45.5),txt=high_temp[8]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*46.5),txt=low_temp[8]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*47.5),txt=forecast_day_short[9]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*47.5),txt=forecast_date[9]})
image({x=25,y=imgyf+(imgyy*13),file=weather_icon[9]})
--image({x=25,y=imgyf+(imgyy*13),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*48.5),txt=high_temp[9]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*49.5),txt=low_temp[9]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*50.5),txt=forecast_day_short[10]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*50.5),txt=forecast_date[10]})
image({x=25,y=imgyf+(imgyy*14),file=weather_icon[10]})
--image({x=25,y=imgyf+(imgyy*14),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*51.5),txt=high_temp[10]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*52.5),txt=low_temp[10]})

-- yellow line
--image({w=45,h=1,x=5,y=550,file="/media/5/Conky/images/yellow_1.png"})

--#######################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
The bottom conky
  • Uses conkyEmail and is designed for 4 email accounts with a max of 99 new unread emails for each account, I'll never reach that - the Desktop I'm on at the time and the currency exchange rate.

Code: Select all

# To use #! in a conky use: ${exec echo '#!'}
# killall conky && conky -c /media/5/Conky/S11_Email_1.conky &
# WARNING: Change name and passwords on e-mail code if posting!!

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Email 1 Line

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes # Options: yes or no

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 255

minimum_size 730 0  ##420 420   ## width, height
maximum_width 730     ##420       ## width

gap_x 0		### left &right
gap_y 35		### up & down

alignment bm
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=16
#xftfont White Rabbit:size=9

# 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-*-*-*-*-*-*-*

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

default_color DCDCDC #220 220 220	Gainsboro
color0 8FBC8F #143 188 143	DarkSeaGreen
color1 778899 #119 136 153	LightSlateGray
color2 FF8C00 #255 140   0	DarkOrange
color3 7FFF00 #127 255   0	Chartreuse
color4 FFA07A #255 160 122	LightSalmon
color5 FFDEAD #255 222 173	NavajoWhite
color6 00BFFF #  0 191 255	DeepSkyBlue
color7 00FFFF #  0 255 255	Cyan
color8 FFFF00 #255 255   0	Yellow
color9 B22222 #178  34  34	FireBrick ##FF0000 #255   0   0	Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.

imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.2
#lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.2
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
##
#
#######################################################  End LUA Settings  ###
update_interval 1

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}\
Email   ${color5}C ${color7}${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD} == 0}\
00${else}\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD} < 9}0\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD}${else}\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD}\
${endif}${endif}\
:\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD} == 0}\
00${else}\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD} < 10}0\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD}${else}\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD}\
${endif}${endif}\
   ${color5}S ${color7}${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD} == 0}\
00${else}\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD} < 9}0\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD}${else}\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD}\
${endif}${endif}\
:\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD} == 0}\
00${else}\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD} < 10}0\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD}${else}\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD}\
${endif}${endif}\
   ${color5}D ${color6}${desktop_name}\
   ${color5}1 CAD ${color}=${color7} ${execi 1800 wget --timeout=1.0 --tries=1 -O - http://themoneyconverter.com/rss-feed/CAD/rss.xml | grep "Argentine Peso" | cut -c 40-47}\
   ${color5}1 ARS ${color}=${color7} ${execi 1800 wget --timeout=1.0 --tries=1 -O - http://themoneyconverter.com/rss-feed/ARS/rss.xml | grep "Canadian Dollar" | cut -c 39-45}
draw-bg.lua - used by all conkys.

Code: Select all

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

 lua_load ~/wea_conky/draw_bg.lua
 TEXT
 ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}

OR Both above TEXT (no composite manager required - no blinking!)

 lua_load ~/wea_conky/draw_bg.lua
 lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
 TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
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(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf		or "mono"
local tfontsize=caltab.tfs	or 12
local tc=caltab.tc			or 0xffffff
local ta=caltab.ta			or 1
local bfont=caltab.bf		or "mono"
local bfontsize=caltab.bfs	or 12
local bc=caltab.bc			or 0xffffff
local ba=caltab.ba			or 1
local hfont=caltab.hf		or "mono"
local hfontsize=caltab.hfs	or 12
local hc=caltab.hc			or 0xff0000
local ha=caltab.ha			or 1
local spacer=caltab.sp		or " "
local gaph=caltab.gh		or 20
local gapt=caltab.gt		or 15
local gapl=caltab.gv		or 15
local sday=caltab.sd		or 0
local hstyle=caltab.hstyle	or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end
-- end main function #########################################################
MGDAVIE
Level 1
Level 1
Posts: 1
Joined: Fri Jan 25, 2013 6:04 pm

Re: Conky Showoff thread

Post by MGDAVIE »

Nice! The Conky-Infinity isn't a easy one to configure. I'm a newb to Conky and that's the one I started with. I finally got every thing lined up and managed to get the network SSID under the IP Address.

Sent from my ADR6400L using Tapatalk 2
grandtheft_jiujitsu

Re: Conky Showoff thread

Post by grandtheft_jiujitsu »

conky.jpg
Desktop.jpg
Note: I DID NOT make this conky myself. I installed it from (link below) and modified it to my liking. All development credit goes to NoobsLab. Also, I am aware that my "/" and "/home" directories are the same but I didn't realize that they should/could be different when I first installed linux and haven't gotten around to changing it.

Code: Select all

http://www.noobslab.com/2012/07/install-conky-two-gadget-in-ubuntulinux.html
~/.conkyrc reads...

Code: Select all

# Conky settings #
background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
#imlib_cache_size 0

temperature_unit fahrenheit

# Window specifications #
own_window_class Conky
own_window yes
own_window_type conky
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 350 550
maximum_width 550

alignment tr
gap_x -20
gap_y 22

# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# Text settings #
use_xft yes
override_utf8_locale yes
xftfont Pf Tempesta Five:bold:size=6
xftalpha 0.8
uppercase no

temperature_unit fahrenheit

default_color 333333
color0 6cde4b
color1 d5d5d5
color2 1994D1
color3 1994D1 

# Lua Load  ##${voffset 750}
lua_load ~/two-noobslab-wgs/.conky/rings-v1.2.1.lua
lua_draw_hook_pre ring_stats


TEXT
${font Xirod:size=10}${goto 25}${color0}System Info${alignr 145}${font Pf Tempesta Five:bold:size=6}${alignr 145}${color1}${machine}
${font Pf Tempesta Five:bold:size=6}${goto 85}CPU ${alignr 145}${color1}${cpu}%
${font Pf Tempesta Five:bold:size=6}${goto 75}RAM${alignr 145}${memperc}% / ${memmax}
${font Pf Tempesta Five:bold:size=6}${goto 65}Temp${alignr 145}${acpitemp}°F
${font Pf Tempesta Five:bold:size=6}${goto 55}Uptime${alignr 145}${uptime_short}
${font Pf Tempesta Five:bold:size=6}${goto 45}Governor${alignr 145}${pre_exec cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}
${font Pf Tempesta Five:bold:size=6}${goto 45}I/O Scheduler${alignr 145}${ioscheduler sda}
${font Xirod:size=10}${alignr 100}${color0}${pre_exec cat /etc/issue.net}${font Pf Tempesta Five:bold:size=6}
${font Pf Tempesta:bold:size=6}${alignr 100}${color1}${kernel}
${font Xirod:size=8}${goto 115}${voffset 100}${color0}${time %A} - ${color0}${time %D}
${font Xirod:size=18}${goto 95}${color1}${time %H}:${time %M}
${font Xirod:size=10}${alignr 40}${voffset 10}${color0}INTERNET INFO
${font Pf Tempesta Five:bold:size=6}${goto 100}${color0}Network:  ${color1}${wireless_essid wlan0}
${font Pf Tempesta Five:bold:size=6}${goto 100}${color0}External IP: ${color1}${execi 3600 wget -O - http://ip.tupeux.com | tail}
${font Pf Tempesta Five:bold:size=6}${goto 100}${color1}Wfi Dwn:  ${downspeed wlan0} / ${color1}${totaldown wlan0}
${font Pf Tempesta Five:bold:size=6}${goto 100}Wifi Up:  ${upspeed wlan0} / ${color1}${totalup wlan0}
${font Pf Tempesta Five:bold:size=6}${goto 100}${color0}Eth0 IP: ${color1}${addr eth0}
${font PF Tempesta Five:bold:size=6}${goto 100}${color1}Eth0 Dwn:  ${downspeed eth0} / ${color1}${totaldown eth0}
${font PF Tempesta Five:bold:size=6}${goto 100}Eth0 Up:  ${upspeed eth0} / ${color1}${totalup eth0}
${font Xirod:size=10}${color0}${alignr 25}${voffset 20}BATERY
${font Xirod:size=8}${color1}${alignr 25}${color1}${battery BAT0}
${font Xirod:size=8}${alignr 25}${battery_time BAT0}
${font Pf Tempesta Five:bold:size=6}${goto 75}${voffset 20}${color0}Root:  ${color1}${fs_used_perc /}% / ${color1}${fs_size /}
${font Pf Tempesta Five:bold:size=6}${goto 75}${color0}Home:  ${color1}${fs_used_perc /home}% / ${color1}${fs_size /home}
${font Xirod:size=10}${color0}${goto 65}${voffset 2}HARD DRIVE
~/two-noobslab-wgs/.conky/rings-v1.2.1.lua reads...

Code: Select all

settings_table = {
    
    {
        name='cpu',
        arg='cpu0',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=215, y=100,
        radius=80,
        thickness=20,
        start_angle=0,
        end_angle=270
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=215, y=100,
        radius=60,
        thickness=15,
        start_angle=0,
        end_angle=270
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=195, y=495,
        radius=30,
        thickness=15,
        start_angle=0,
        end_angle=270
    },
    {
        name='fs_used_perc',
        arg='/home',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cd34b,
        fg_alpha=0.8,
        x=195, y=495,
        radius=15,
        thickness=10,
        start_angle=0,
        end_angle=270
    },
    {
        name='time',
        arg='%S',
        max=60,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=90, y=200,
        radius=40,
        thickness=12,
        start_angle=180,
        end_angle=450
    },
     {
        name='time',
        arg='%M',
        max=60,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=90, y=200,
        radius=25,
        thickness=10,
        start_angle=180,
        end_angle=450
    },
    {
        name='time',
        arg='%H',
        max=24,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=90, y=200,
        radius=10,
        thickness=8,
        start_angle=180,
        end_angle=540
    },
       {
        name='battery_percent',
        arg='BAT0',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=300, y=460,
        radius=18,
        thickness=10,
        start_angle=0,
	end_angle=360
    },
}

require 'cairo'

function rgb_to_r_g_b(colour,alpha)
	return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
	local w,h=conky_window.width,conky_window.height
	
	local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
	local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

	local angle_0=sa*(2*math.pi/360)-math.pi/2
	local angle_f=ea*(2*math.pi/360)-math.pi/2
	local t_arc=t*(angle_f-angle_0)

	-- Draw background ring

	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
	cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
	cairo_set_line_width(cr,ring_w)
	cairo_stroke(cr)
	
	-- Draw indicator ring

	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
	cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
	cairo_stroke(cr)		
end

function conky_ring_stats()
	local function setup_rings(cr,pt)
		local str=''
		local value=0
		
		str=string.format('${%s %s}',pt['name'],pt['arg'])
		str=conky_parse(str)
		
		value=tonumber(str)
		if value == nil then value = 0 end
		pct=value/pt['max']
		
		draw_ring(cr,pct,pt)
	end

	if conky_window==nil then return end
	local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
	
	local cr=cairo_create(cs)	
	
	local updates=conky_parse('${updates}')
	update_num=tonumber(updates)
	
	if update_num>5 then
		for i in pairs(settings_table) do
			setup_rings(cr,settings_table[i])
		end
	end
   cairo_surface_destroy(cs)
  cairo_destroy(cr)
end
rimbaum

Re: Conky Showoff thread

Post by rimbaum »

I just got conky today, and the Infinity theme for it caught my eye immediately. So here's some of the changes I made to it.

Image
d00med

Re: Conky Showoff thread

Post by d00med »

Whoah. Those are nice, clean conky configs.
rimbaum

Re: Conky Showoff thread

Post by rimbaum »

I'm adding a separate battery ring to my conky config, and the battery percentage won't show up on the ring? I tried uncommenting the standard one that came with the lua script that you could use in place of cpu2, but that didn't work either. Can someone point me in the right direction? Here's the section for the battery ring.

Code: Select all

	{
		name='battery_percent',
		arg='bat1',
		max=100,
		bg_colour=0xffffff,
		bg_alpha=0.1,
		fg_colour=0xe00707,
		fg_alpha=0.8,
		x=165, y=170,
		radius=90,
		thickness=5,
		start_angle=210,
		end_angle=300
	},
I'm using an Asus x501a laptop with a standard battery. Do I need to use a different battery argument for my particular hardware?

EDIT: Turns out that the BAT1 that was included in the script, which I (incorrectly) assumed would work, wasn't default. I found the default battery object and it's working great now!

Image
grandtheft_jiujitsu

Re: Conky Showoff thread

Post by grandtheft_jiujitsu »

Here is another I modified from

Code: Select all

http://www.noobslab.com/2012/11/install-conky123-in-ubuntulinux.html
Conky.jpg
Desktop.jpg
.conkrc

Code: Select all

#==============================================================================
#                                  conkyrc
#
#  display : horizontal ring gauge
#
#  author  : SLK
#  version : v20121005-01
#  license : Distributed under the terms of GNU GPL version 2 or later
#
#  Modified by : Umair - http://www.NoobsLab.com
#  Modified May 3013 : Grandtheft_JiuJitsu - Linux Mint Forums
#==============================================================================

background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit fahrenheit

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 0
gap_y 20
minimum_size 1850 300
maximum_width 1850
own_window yes
own_window_type conky
own_window_transparent yes
own_window_argb_visual yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment top_middle

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

override_utf8_locale yes
use_xft yes
xftfont Sans:size=8
xftalpha 0.5
uppercase no

default_color FFFFFF
color0 6cde4b
color1 d5d5d5
color3 ffffff

lua_load ~/.conky/conky_grey.lua
lua_draw_hook_post main

TEXT
${font Sans:size=8}${alignc}${color1}${uid_name 1000} @ ${nodename} - for ${uptime_short}
${font Sans:size=18}${alignc}${color0}${pre_exec cat /etc/issue.net}${font Pf Tempesta Five:bold:size=6}
${font Sans:size=8}${alignc}${voffset 5}${color1}${kernel}
${font Sans:size=6}${alignc}${color1}${machine}
${font Sans:size=24}${alignc}${voffset 20}${color0}${time %H}:${time %M}
${font Sans:size=8}${alignc}${voffset -20}${color1}${time %A} - ${time %B %d}, ${time %Y} 
${font Sans:bold:size=8}${voffset -130}${color0}Process${goto 105}PID${goto 152}CPU
${font Ubuntu Light:size=8}${color1}${top name 1}${goto 100}${top pid 1}${goto 150}${top cpu 1}
${font Ubuntu Light:size=8}${color1}${top name 2}${goto 100}${top pid 2}${goto 150}${top cpu 2}
${font Ubuntu Light:size=8}${color1}${top name 3}${goto 100}${top pid 3}${goto 150}${top cpu 3}
${font Ubuntu Light:size=8}${color1}${top name 4}${goto 100}${top pid 4}${goto 150}${top cpu 4}
${font Ubuntu Light:size=8}${color1}${top name 5}${goto 100}${top pid 5}${goto 150}${top cpu 5}
${font Ubuntu Light:size=8}${color1}${top name 6}${goto 100}${top pid 6}${goto 150}${top cpu 6}
${font Ubuntu Light:size=8}${color1}${top name 7}${goto 100}${top pid 7}${goto 150}${top cpu 7}
${font Ubuntu Light:size=10}${color1}${goto 320}${voffset -45}CPU${offset 200}RAM
${font Ubuntu Light:size=8}${color0}${goto 320}${cpu}% ${offset 210}${memperc}%
${font Sans:bold:size=8}${alignr}${voffset -95}${color0}Internet Info
${font Ubuntu Light:size=8}${alignr}${color1}${wireless_essid wlan0}${color0} - Network
${font Ubuntu Light:size=8}${alignr}${color1}${execi 3600 wget -O - http://ip.tupeux.com | tail}${color0} - External IP
${font Ubuntu Light:size=8}${alignr}${color1}${downspeed wlan0} / ${totaldown wlan0}${color0} - Wifi Down
${font Ubuntu Light:size=8}${alignr}${color1}${upspeed wlan0} / ${color1}${totalup wlan0}${color0} - Wifi Up
${font Ubuntu Light:size=8}${alignr}${color1}${addr eth0}${color0}${color0} - Eth0 IP
${font Ubuntu Light:size=8}${alignr}${color1}${downspeed eth0} / ${color1}${totaldown eth0}${color0} - Eth0 Dwn
${font Ubuntu Light:size=8}${alignr}${color1}${upspeed eth0} / ${color1}${totalup eth0}${color0} - Eth0 Up
${font Ubuntu Light:size=10}${color1}${alignr 270}${voffset -40}Home${offset -280}Root
${font Ubuntu Light:size=8}${color0}${alignr 190}${color0}${fs_used /home}/${fs_size /home}${offset -330}${fs_used /} / ${fs_size /}
${font Sans:size=8}${voffset -100}${color1}${goto 375}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 1-26}
${font Sans:size=8}${color0}${goto 430}${acpitemp}°F
${font Sans:size=8}${voffset -20}${alignr 380}${color1}Governor - ${pre_exec cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}
${font Sans:size=8}${alignr 370}${color0}I/O Scheduler - ${ioscheduler sda}
${font Sans:size=10}${alignc}${voffset 175}${color1}Battery
${font Sans:size=8}${alignc}${battery_percent}%
.conky/conky_grey.lua
* I haven't edited out all of the extra code from this, but the below will produce the above results

Code: Select all

--==============================================================================
--                                 conky_grey.lua
-- 
--  display : horizontal ring gauge
--
--  author  : SLK
--  version : v20121005-01
--  license : Distributed under the terms of GNU GPL version 2 or later
--
--  Modified May 15, 2013 by GrandTheft_JiuJitsu - Linux Mint Forums
--==============================================================================

require 'cairo'
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu',                  max_value=100,
    x=330,                          y=90,
    graph_radius=70,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xd5d5d5,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},
{
    name='memperc',                    arg='',                  max_value=100,
    x=560,                          y=90,
    graph_radius=70,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xd5d5d5,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},

{
    name='fs_used_perc',                    arg='/',                  max_value=100,
    x=1290,                          y=90,
    graph_radius=70,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},
{
    name='fs_used_perc',                    arg='/home',                  max_value=100,
    x=1540,                          y=90,
    graph_radius=70,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},
{
    name='battery_percent',                    arg='BAT0',                  max_value=100,
    x=927,                          y=225,
    graph_radius=50,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},
}

-------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_clock_ring
-- displays clock
--
function draw_clock_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']

    -- background ring
    cairo_arc(display, x, y, graph_radius, 0, 2 * math.pi)
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value % max_value)
    local i = 1
    while i <= val do
        cairo_arc(display, x, y, graph_radius,(  ((graph_unit_angle * i) - graph_unit_thickness)*(2*math.pi/360)  )-(math.pi/2),((graph_unit_angle * i) * (2*math.pi/360))-(math.pi/2))
        cairo_set_source_rgba(display,rgb_to_r_g_b(graph_fg_colour,graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = (graph_unit_angle * i) - graph_unit_thickness

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = 360 / graduation_unit_angle
        local i = 1
        while i <= nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            cairo_arc(display, x, y, graduation_radius, (((graduation_unit_angle * i)-(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2),(((graduation_unit_angle * i)+(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
    local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display, txt_size);
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha));
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
    cairo_show_text (display, value);
    cairo_stroke (display);
end

-------------------------------------------------------------------------------
--                                                              draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_start_angle = data['graph_start_angle']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
    local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
    local graph_end_angle = (max_value * graph_unit_angle) % 360

    -- background ring
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = value % (max_value + 1)
    local start_arc = 0
    local stop_arc = 0
    local i = 1
    while i <= val do
        start_arc = (graph_unit_angle * i) - graph_unit_thickness
        stop_arc = (graph_unit_angle * i)
        cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
        cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = start_arc

    -- hand
    start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
    stop_arc = (graph_unit_angle * val)
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
    cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
    cairo_stroke(display)

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = graph_end_angle / graduation_unit_angle
        local i = 0
        while i < nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
            stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
            cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
    local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
    cairo_set_font_size (display, txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
    cairo_show_text (display, value)
    cairo_stroke (display)

    -- caption
    local caption = data['caption']
    local caption_weight, caption_size = data['caption_weight'], data['caption_size']
    local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
    local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
    cairo_set_font_size (display, caption_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
    cairo_move_to (display, x + tox + 5, y + toy + 1)
    -- bad hack but not enough time !
    if graph_start_angle < 105 then
        cairo_move_to (display, x + tox - 30, y + toy + 1)
    end
    cairo_show_text (display, caption)
    cairo_stroke (display)
end

-------------------------------------------------------------------------------
--                                                               go_clock_rings
-- loads data and displays clock
--
function go_clock_rings(display)
    local function load_clock_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_clock_ring(display, data, value)
    end
    
    for i in pairs(clock_h) do
        load_clock_rings(display, clock_h[i])
    end
    for i in pairs(clock_m) do
        load_clock_rings(display, clock_m[i])
    end
    for i in pairs(clock_s) do
        load_clock_rings(display, clock_s[i])
    end
end

-------------------------------------------------------------------------------
--                                                               go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
    local function load_gauge_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_gauge_ring(display, data, value)
    end
    
    for i in pairs(gauge) do
        load_gauge_rings(display, gauge[i])
    end
end

-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    if conky_window == nil then 
        return
    end

    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local display = cairo_create(cs)
    
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
    
    if update_num > 5 then
--        go_clock_rings(display)
        go_gauge_rings(display)
    end

    cairo_surface_destroy(cs)
    cairo_destroy(display)
end
Finwe

Re: Conky Showoff thread

Post by Finwe »

Ta-da! Now if only I could get it to keep running...
[rimg]http://i.imgur.com/Jj7YjXH.jpg[/rimg]
The problem is that as soon as I minimize the terminal window (or any window that is open on the desktop, or that I open and then close), conky disappears. Any ideas?

Here's the code:

Code: Select all

background yes
use_xft yes
xftfont Ubuntu:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 500
maximum_width 200
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 10
gap_y 10

no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no

TEXT
${font Ubuntu:light:size=38}${alignc}${time %H:%M:}${font Ubuntu:light:size=38}${color lightgray}${time %S}
${font Ubuntu:normal:size=15}${alignc}${voffset -30}${color white}${Time %a %d %B %Y}

${font Ubuntu:bold:size=8}SYSTEM ${hr 2}
${font Ubuntu:normal:size=8}Distribution: $alignr ${font Ubuntu:light:size=8}${execp /home/aliosha/Desktop/Scripts/cat.sh} 
${font Ubuntu:normal:size=8}Kernel: ${font Ubuntu:light:size=8}$alignr $kernel
${font Ubuntu:normal:size=8}Host:${font Ubuntu:light:size=8}$alignr$nodename
${font Ubuntu:normal:size=8}Uptime:${font Ubuntu:light:size=8}$alignr$uptime

${font Ubuntu:bold:size=8}BATTERY $hr
${font Ubuntu:light:size=8}${alignr} ${battery BAT1} $alignr
${battery_bar BAT1}

${font Ubuntu:bold:size=8}PROCESSORS ${hr 2}
${cpugraph cpu0 -l}
${font Ubuntu:normal:size=8}CPU: ${font Ubuntu:light:size=8}${cpu cpu0}% ${cpubar cpu0}

${font Ubuntu:bold:size=8}MEMORY ${hr 2}
${font Ubuntu:normal:size=8}RAM ${font Ubuntu:light:size=8}$alignc $mem / $memmax $alignr $memperc%
$membar

${font Ubuntu:bold:size=8}DISKS ${hr 2}
${font Ubuntu:normal:size=8}File System ${font Ubuntu:light:size=8}$alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
${fs_bar /}
${font Ubuntu:normal:size=8}Data ${font Ubuntu:light:size=8}$alignc ${fs_used /media/Data} / ${fs_size /media/Data} $alignr ${fs_used_perc /media/Data}%
${fs_bar /media/Data}

${font Ubuntu:bold:size=8}TOP PROCESSES ${hr 2}
${font Ubuntu:normal:size=8}Name ${goto 85} PID ${goto 125} CPU% ${alignr}MEM%
${font Ubuntu:light:size=8}${top name 1} ${goto 85} ${top pid 1} ${goto 125} ${top cpu 1} ${alignr} ${top mem 1}
${top name 2} ${goto 85} ${top pid 2} ${goto 125} ${top cpu 2} ${alignr} ${top mem 2}
${top name 3} ${goto 85} ${top pid 3} ${goto 125} ${top cpu 3} ${alignr} ${top mem 3}
${top name 4} ${goto 85} ${top pid 4} ${goto 125} ${top cpu 4} ${alignr} ${top mem 4}

${font Ubuntu:bold:size=8}NETWORK ${hr 2}
${font Ubuntu:normal:size=8}IP address: ${font Ubuntu:light:size=8}$alignr ${addr wlan0}
${font Ubuntu:normal:size=8}ESSID: ${font Ubuntu:light:size=8}$alignr ${wireless_essid wlan0}
${font Ubuntu:normal:size=8}Connection quality: ${font Ubuntu:light:size=8}$alignr ${wireless_link_qual_perc wlan0}%
${downspeedgraph wlan0}
${font Ubuntu:normal:size=8}DLS: ${font Ubuntu:light:size=8}${downspeed wlan0 -l}/s $alignr total: ${totaldown wlan0}
${upspeedgraph wlan0}
${font Ubuntu:normal:size=8}ULS: ${font Ubuntu:light:size=8}${upspeed wlan0 -l}/s $alignr total: ${totalup wlan0}
samriggs

Re: Conky Showoff thread

Post by samriggs »

Finwe wrote: The problem is that as soon as I minimize the terminal window (or any window that is open on the desktop, or that I open and then close), conky disappears. Any ideas?
add conky to your start up programs that should do it and you wont have to use the terminal to open it
Finwe

Re: Conky Showoff thread

Post by Finwe »

samriggs wrote:add conky to your start up programs that should do it and you wont have to use the terminal to open it
I did that, but as soon as I open a window and close it again conky goes away. And I don't know why!
DragonDon

Re: Conky Showoff thread

Post by DragonDon »

Greetings all,

I'm new to Conky and now addicted to getting a decent setup happening.

As for why Conky dissapears when he closes a window, I really can't say but I saw an option for running Conky in a window ("own_window_transparent") mine is set to no and doesn't have that issue. Maybe this might help? Just tossing a random idea out there from utterly basic experience :)

I really need Conky to display a Korean font and I can't get it to do it. Any suggestions would be great.
uzername

Re: Conky Showoff thread

Post by uzername »

Finwe wrote:Ta-da! Now if only I could get it to keep running...

The problem is that as soon as I minimize the terminal window (or any window that is open on the desktop, or that I open and then close), conky disappears. Any ideas?
If you haven't fixed it already, comment out "own_window_type desktop." That should do it.

Code: Select all

#own_window_type desktop
Finwe

Re: Conky Showoff thread

Post by Finwe »

Perfect! After commenting out, conky stays put. Thanks!
Now for a totally different issue: I have a monitor that I intermittently connect to my laptop. I got conky to stay on the right side by adjusting gap_x, but when I disconnect the monitor, conky goes to the left side of the laptop screen (because gap_x stays the same, I presume). Is there a solution to this?
n1ghtnite

Re: Conky Showoff thread

Post by n1ghtnite »

Hello,

i just installed ConkyInfinitySVG-master
it is shown nicely, but i can't click on any icons on my desktop, when i run conky.

Code: Select all

###############################################################################
#	Conky Theme	: InfinitySVG
#
#	Updates and SVG by:				Eric Weik
#	Original Infinity theme by:		Harshit Yadav
#	Includes lua code:				Clock Rings by londonali1010 (2009)
#	Feel Free to distribute
#	For Installation Instructions see README
#
#	Colors from haunted.lua and .conkyrc:
#	b7b7b7 (light grey)
#	6f6f6f (medium grey)
#	2c2c2c (dark grey)
#
#	4a89a7 (blue)		hardware / memory / root
#	468626 (blue alt)	
#	e83737 (red)		swap
#	46a646 (green)		user / cpu / home
#	f4732d (orange)		network
#	ebff46 (yellow)		network
#	FFA300 (br. orange)	text highlights
#
#	Changelog:
#	 + v1.0.1:	Initial version by Harshit Yadav
#	 + [All further changes tracked in the git repository.]
###############################################################################



## Conky settings
background yes
update_interval 5.0

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048

#imlib_cache_size 0

default_color b7b7b7



## Window specifications

# Allow conky to handle transparency -- all or nothing
#own_window yes
#own_window_type conky
#own_window_transparent yes

# Allow compiz to handle transparency manually (you will need to add Conky to compiz)
#own_window yes
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

# Allow conky to handle transparency (with percentages) with a compositor
# From http://blog.mmassonnet.info/2011/08/xfce-48-with-conky.html)
own_window yes
window_own_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager	# make it behave like it belongs to the desktop
own_window_argb_visual yes	# true transparency, a compositor has to be active
own_window_argb_value 70	# make the background semi-transparent



## This Resolution is set according to the screen resolution of 1920 1080
## Adjust According to yours

#minimum_size 800 560
#maximum_width 1366

minimum_size 1920 1080

#alignment top_left
alignment top_right
gap_x 0
gap_y 0



## Graphics settings
border_inner_margin 0
border_outer_margin 0

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes



## Text settings
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
uppercase no

#temperature_unit fahrenheit
temperature_unit celsius



## Lua: load clock rings.
lua_load ~/.conky/scripts/haunted.lua
lua_draw_hook_pre clock_rings



## Possible variables to be used:
#
# 	Variable          Arguments     Description

# 	addr              (interface)   IP address for an interface
# 	acpiacadapter                   ACPI ac adapter state.                   
# 	acpifan                         ACPI fan state                           
# 	acpitemp                        ACPI temperature.                        
# 	adt746xcpu                      CPU temperature from therm_adt746x       
# 	adt746xfan                      Fan speed from therm_adt746x             
# 	alignr            (num)         Right-justify text, with space of N
# 	alignc                          Align text to centre
# 	battery           (num)         Remaining capasity in ACPI or APM        
# 					battery. ACPI battery number can be      
# 					given as argument (default is BAT0).     
# 	buffers                         Amount of memory buffered                
# 	cached                          Amount of memory cached                  
# 	color             (color)       Change drawing color to color            
# 	cpu                             CPU usage in percents                    
# 	cpubar            (height)      Bar that shows CPU usage, height is      
# 					bar's height in pixels                 
# 	cpugraph          (height),(width) (gradient colour 1) (gradient colour 2)
# 					CPU usage graph, with optional colours in hex,
# 					minus the #.
# 	downspeed         net           Download speed in kilobytes              
# 	downspeedf        net           Download speed in kilobytes with one     
# 					decimal                                  
# 	downspeedgraph    net (height),(width) (gradient colour 1) (gradient colour 2)
# 					Download speed graph, colours defined in
# 					hex, minus the #.
# 	exec              shell command Executes a shell command and displays    
# 					the output in conky. warning: this      
# 					takes a lot more resources than other    
# 					variables. I'd recommend coding wanted   
# 					behaviour in C and posting a patch :-).  
# 	execbar           shell command Same as exec, except if the first value
# 					return is a value between 0-100, it
# 					will use that number for a bar.
# 					The size for the bar is currently fixed,
# 					but that may change in the future.
# 	execgraph         shell command Same as execbar, but graphs values
# 	execi             interval, shell command
#  					Same as exec but with specific interval. 
# 					Interval can't be less than              
# 					update_interval in configuration.        
#	font		  font		Specify a different font.  Only applies
#					to one line.
# 	fs_bar            (height), (fs)Bar that shows how much space is used on 
# 					a file system. height is the height in   
# 					pixels. fs is any file on that file      
# 					system.                                  
# 	fs_free           (fs)          Free space on a file system available    
# 					for users.                               
# 	fs_free_perc      (fs)          Free percentage of space on a file       
# 					system available for users.              
# 	fs_size           (fs)          File system size                         
# 	fs_used           (fs)          File system used space                   
# 	hr                (height)      Horizontal line, height is the height in 
# 					pixels                                   
# 	i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev   
# 					may be omitted if you have only one I2C  
# 					device. type is either in (or vol)       
# 					meaning voltage, fan meaning fan or
# 					temp/tempf (first in C, second in F)
# 					meaning temperature. n is number of the  
# 					sensor. See /sys/bus/i2c/devices/ on     
# 					your local computer.                     
# 	if_running        (process)     if PROCESS is running, display
# 					everything if_running and the matching $endif
# 	if_existing       (file)        if FILE exists, display everything between
# 					if_existing and the matching $endif
# 	if_mounted        (mountpoint)  if MOUNTPOINT is mounted, display everything between
# 					if_mounted and the matching $endif
# 	else                            Text to show if any of the above are not true
# 	kernel                          Kernel version                          
# 	linkstatus        (interface)   Get the link status for wireless connections
# 	loadavg           (1), (2), (3) System load average, 1 is for past 1     
# 					minute, 2 for past 5 minutes and 3 for   
# 					past 15 minutes.                         
# 	machine                         Machine, i686 for example                
# 	mails                           Mail count in mail spool. You can use    
# 					program like fetchmail to get mails from 
# 					some server using your favourite         
# 					protocol. See also new_mails.            
# 	mem                             Amount of memory in use                  
# 	membar            (height)      Bar that shows amount of memory in use   
# 	memmax                          Total amount of memory                   
# 	memperc                         Percentage of memory in use
# 	
# 	metar_ob_time
# 	metar_temp
# 	metar_tempf                     Temp in F
# 	metar_windchill
# 	metar_dew_point                 There are a bunch of these
# 	metar_rh                        and they are self-explanatory
# 	metar_windspeed
# 	metar_winddir
# 	metar_swinddir
# 	metar_cloud
# 	metar_u2d_time
# 	
# 	ml_upload_counter               total session upload in mb
# 	ml_download_counter             total session download in mb
# 	ml_nshared_files                number of shared files
# 	ml_shared_counter               total session shared in mb, buggy
# 					in some mldonkey versions
# 	ml_tcp_upload_rate              tcp upload rate in kb/s
# 	ml_tcp_download_rate            tcp download rate in kb/s
# 	ml_udp_upload_rate              udp upload rate in kb/s
# 	ml_udp_download_rate            udp download rate in kb/s
# 	ml_ndownloaded_files            number of completed files
# 	ml_ndownloading_files           number of downloading files
# 	
# 	mpd_artist			Artist in current MPD song
# 					(must be enabled at compile)
# 	mpd_album			Album in current MPD song
# 	mpd_bar           (height)      Bar of mpd's progress
# 	mpd_bitrate                     Bitrate of current song
# 	mpd_status                      Playing, stopped, et cetera.
# 	mpd_title			Title of current MPD song
# 	mpd_vol				MPD's volume
# 	mpd_elapsed                     Song's elapsed time
# 	mpd_length                      Song's length
# 	mpd_percent                     Percent of song's progress
# 	new_mails                       Unread mail count in mail spool.         
# 	nodename                        Hostname                                 
# 	outlinecolor      (color)       Change outline color                     
# 	pre_exec          shell command Executes a shell command one time before 
# 					conky displays anything and puts output 
# 					as text.                                 
# 	processes                       Total processes (sleeping and running)   
# 	running_processes               Running processes (not sleeping),        
# 					requires Linux 2.6                       
# 	shadecolor        (color)       Change shading color                     
# 	stippled_hr       (space),      Stippled (dashed) horizontal line        
# 			(height)        
# 	swapbar           (height)      Bar that shows amount of swap in use     
# 	swap                            Amount of swap in use                    
# 	swapmax                         Total amount of swap                     
# 	swapperc                        Percentage of swap in use                
# 	sysname                         System name, Linux for example           
# 	offset            pixels        Move text over by N pixels
# 	tail              logfile, lines (interval)
# 					Displays last N lines of supplied text
# 					text file.  If interval is not supplied,
# 					Conky assumes 2x Conky's interval.
# 					Max of 30 lines.
# 					Max of 30 lines can be displayed.
# 	time              (format)      Local time, see man strftime to get more 
# 					information about format                 
# 	totaldown         net           Total download, overflows at 4 GB on     
# 					Linux with 32-bit arch and there doesn't 
# 					seem to be a way to know how many times  
# 					it has already done that before conky   
# 					has started.                            
# 	top               type, num     This takes arguments in the form:
# 					top <name> <number>
# 					Basically, processes are ranked from 
# 					highest to lowest in terms of cpu
# 					usage, which is what <num> represents.
# 					The types are: "name", "pid", "cpu", and
# 					"mem".
# 					There can be a max of 10 processes listed.
# 	top_mem           type, num     Same as top, except sorted by mem usage
# 					instead of cpu
# 	totalup           net           Total upload, this one too, may overflow 
# 	updates                         Number of updates (for debugging)        
# 	upspeed           net           Upload speed in kilobytes                
# 	upspeedf          net           Upload speed in kilobytes with one       
# 					decimal                                  
# 	upspeedgraph      net (height),(width)  (gradient colour 1) (gradient colour 2)
# 					Upload speed graph, colours defined in
# 					hex, minus the #.
# 	uptime                          Uptime                                   
# 	uptime_short                    Uptime in a shorter format               
# 	
# 	seti_prog                       Seti@home current progress
# 	seti_progbar      (height)      Seti@home current progress bar
# 	seti_credit                     Seti@home total user credit
#
# 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 argument



# stuff after 'TEXT' will be formatted on screen
TEXT
# Clock and header
 ${offset 700}${color EAEAEA}${font GE Inspira:pixelsize=120}${time %H:%M}${font}${voffset -84}${voffset 10}${color FFA300}${font GE Inspira:pixelsize=42}${time %d} ${voffset -15}${color EAEAEA}${font GE Inspira:pixelsize=22}${time  %B} ${time %Y}${font}${voffset 124}${font GE Inspira:pixelsize=58}${offset -547}${time %A}${font}
${offset 720}${voffset -100}${font Ubuntu:pixelsize=10}${color FFA300}HD ${offset 9}$color${fs_free /} / ${fs_size /}${offset 30}${color FFA300}RAM ${offset 9}$color$mem / $memmax${offset 30}${color FFA300}CPU ${offset 9}$color${cpu cpu0}%
${voffset 10}${offset 295}${color 2c2c2c}${hr 4}
${image ~/.conky/background.png}


# Disk usage node
${offset 120}${voffset 223}${color 4a89a7}${font Santana:size=8:style=Bold}root$color${font Santana:size=8} : ${offset 16}${fs_used /}/${fs_size /}
${offset 120}${voffset 12}${color 46a646}${font Santana:size=8:style=Bold}home$color${font Santana:size=8} : ${offset 7}${fs_used /home}/${fs_size /home}$font
${offset 120}${voffset 12}${color e83737}${font Santana:size=8:style=Bold}swap$color${font Santana:size=8} : ${offset 10}${swap} / ${swapfree}$font
# "Home" node (kernel, etc.)
${offset 583}${voffset -108}$color${font Santana:size=9:style=Bold}Linux ${kernel} kernel
${offset 585}${voffset 0}${color 4a89a7}${font Santana:size=8}Uptime : ${offset 9}$color${uptime}
# "User" node (whoami, top process, etc.)
${offset 833}${voffset -78}$color${font Santana:size=9:style=Bold}${exec whoami}@${nodename}
${offset 835}${voffset 0}$color${font Santana:size=8}${color 46a646}Top (cpu) :  ${offset 9}$color${top name 5} ${top cpu 5}
${offset 835}${voffset 0}$color${font Santana:size=8}${color 46a646}Top (RAM) : ${offset 9}$color${top_mem name 5} ${top_mem mem 5}
${offset 835}${voffset 0}${color 6f6f6f}CPU Usage (${cpu}%) :
${offset 835}${voffset -2}$color${font Santana:size=8}${color 2c2c2c}${cpugraph 32,200 2c2c2c 46a646}
# "Network" node (IP, connections, etc.)
${offset 713}${voffset 88}$color${font Santana:size=9:style=Bold}IP Address : ${addr eth0}
${offset 715}${voffset 0}$color${font Santana:size=8}TCP Connections : ${tcp_portmon 1 65535 count}
${offset 715}${voffset 0}${font Santana:size=8}${color f4732d}Down : ${offset 9}$color${downspeed eth0}/s ${offset 8}${color ebff46}Up : ${offset 9}$color${upspeed eth0} /s
${offset 715}${voffset 0}${color 6f6f6f}${font Santana:size=8}Interface eth0 Usage :
${offset 715}${voffset -2}$color${font Santana:size=8}${color 2c2c2c}${downspeedgraph eth0 32,200 b7b7b7 f4732d}
${offset 715}${voffset -5}${color 2c2c2c}${upspeedgraph eth0 32,200 b7b7b7 ebff46}
# Positioning eset for static text examples below
${voffset -158}
# Static text example: Logo
${offset 120}${color EAEAEA}${font Ubuntu:pixelsize=20}${color f4732d}Ubuntu$color 12.10
# Static text example: Multi-line
#${offset 120}$font${color 6f6f6f}random text can go here
#${offset 120}and here...
#${offset 120}and here...
NM5TF

Re: Conky Showoff thread

Post by NM5TF »

have you tried changing own_window_type from desktop to normal ???

just a guess, but I had to do it in LM 14

Tommy
ninomrki
Level 3
Level 3
Posts: 100
Joined: Wed Jan 16, 2013 7:49 pm
Location: Zagreb, Croatia
Contact:

Re: Conky Showoff thread

Post by ninomrki »

I gave it a go. This is my first one:

[rimg]http://i350.removed/albums/q419/ninomrki/conky_screenshot_zpsbe570b2b.png[/rimg]
Home is where the Wi-Fi is.

Registered Linux user #562302
Locked

Return to “Compiz, Conky, Docks & Widgets”