Re: Conky Showoff thread
Posted: Wed Oct 12, 2011 8:37 am
Welcome to the Linux Mint forums!
https://forums.linuxmint.com/
Code: Select all
temp1: +37.0°C (high = +85.0°C, hyst = +81.0°C)
temp2: +36.0°C (high = +85.0°C, hyst = +81.0°C)
Code: Select all
### LUA Settings ###########################################################
##
## The HowTo - so simple:
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## Above and After TEXT - requires a composite manager or the background blinks.
## ----------------------------------------------------------------------------------------------
## lua_load ~/Conky/LUA/draw_bg.lua ### the path to the LUA script
## TEXT
## ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}start conky commands here
##
##
## OR Both above TEXT (No composite manager required - no blinking!)
##
lua_load ~/Conky/LUA/draw_bg.lua
lua_draw_hook_pre draw_bg 0 0 0 0 0 0x000000 0.5
## TEXT
##
####################################################### End LUA Settings ###
TEXT
start conky commands ...
Code: Select all
${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
0 - 0 is square corners - 10 = 10 pixels etc etc
0 - similar to gap_x - placing the top left corner of the background
0 - similar to gay_y - placing the top left corner of the background
0 - 0 here and ...
0 - 0 here fills the entire conky window - or you can set the height & width
0x000000 - this is the colour (without the # = black)
0.5 - the "alpha setting" must be between 0 and 1
Code: Select all
lua_load ~/Conky/LUA/draw_bg.lua ### the path to the LUA script
TEXT
${lua conky_draw_bg 50 0 0 0 0 0x000000 0.4}${lua conky_draw_bg 0 50 50 50 50 0xFFFFFF 0.5}start conky commands here
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:
lua_load ~/Conky/LUA/draw_bg.lua
TEXT
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
${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
20 corner_radius
0 x_position
0 y_position
0 width
0 height
0x000000 color
0.4 alpha
]]
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
Code: Select all
# Monitor VGA Load
${execpi 30 /usr/bin/aticonfig --adapter=0 --od-getclocks | grep -Eo "[[:digit:]]\%"}
#Monitor VGA Temparature
${execpi 30 /usr/bin/aticonfig --adapter=0 --od-gettemperature | grep -Eo "[[:digit:]]{1,}\.[[:digit:]]{1,}"}°C
Code: Select all
######################
# - Conky settings - #
######################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
imlib_cache_size 0
double_buffer yes
no_buffers yes
format_human_readable
#####################
# - Text settings - #
#####################
use_xft yes
xftfont Ubuntu:size=10
override_utf8_locale yes
text_buffer_size 2048
#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type normal
own_window_argb_visual yes
own_window_argb_value 180
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
alignment top_right
gap_x 25
gap_y 40
minimum_size 182 600
maximum_width 182
default_bar_size 60 8
#########################
# - Graphics settings - #
#########################
draw_shades no
default_color cccccc
color0 white
color1 white
color2 white
TEXT
${font Ubuntu:style=Bold:size=10}SYSTEM $stippled_hr${font}
##############
# - SYSTEM - #
##############
${color0}${voffset 6}${font ConkySymbols:size=19}U${font}${color}${goto 32}${voffset -14}Kernel: ${alignr}${color2}${kernel}${color}
${goto 32}uptime: ${alignr}${color2}${uptime}${color}
# |--UPDATES
${goto 32}Updates: ${alignr}${font Ubuntu:style=Bold:size=10}${color1}${execi 360 aptitude search "~U" | wc -l | tail}${color}${font} ${color2}Packages${color}
# |--CPU
${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -16}${goto 32}CPU1: ${font Ubuntu:style=Bold:size=10}${color1}${cpu cpu1}%${font} ${alignr}${color2}${cpugraph cpu1 8,50 white white}${color}
${goto 32}CPU2: ${font Ubuntu:style=Bold:size=10}${color1}${cpu cpu2}%${font} ${alignr}${color2}${cpugraph cpu2 8,50 white white}${color}
# |--MEM
${color0}${font Poky:size=16}M${font}${color}${goto 32}${voffset -7}RAM: ${font Ubuntu:style=Bold:size=10}${color1}$memperc%${colo r}${font}
${offset 1}${voffset 2}${color0}${membar 4,18}${color}${goto 32}${voffset -2}F: ${font Ubuntu:style=Bold:size=10}${color2}${memeasyfree}$ {color}${font} U: ${font Ubuntu:style=Bold:size=10}${color2}${mem}${color}$ {font}
# |--VGA
${color0}${font Poky:size=14}A${font}${color}${goto 32}${voffset -7}VGA: ${font Ubuntu:style=Bold:size=10}${color1}${execpi 30 /usr/bin/aticonfig --adapter=0 --od-getclocks | grep -Eo "[[:digit:]]\%"}${color}${font}
${goto 32}${voffset -5}Temp: ${font Ubuntu:style=Bold:size=10}${color1}${execpi 30 /usr/bin/aticonfig --adapter=0 --od-gettemperature | grep -Eo "[[:digit:]]{1,}\.[[:digit:]]{1,}"}°C${color}${font}
1. It's a conky - it's the right thread.rsys wrote:Sorry if I post this at the wrong thread
1. Install ATI Driver, you can do that from Additional Driver or Install manually
2. Put the command bellow to your conkyrc file (you can customize the interval as you like)3. After you put the code above in your conkyrc file you can customize by change the location or the font.Code: Select all
# Monitor VGA Load ${execpi 30 /usr/bin/aticonfig --adapter=0 --od-getclocks | grep -Eo "[[:digit:]]\%"} #Monitor VGA Temparature ${execpi 30 /usr/bin/aticonfig --adapter=0 --od-gettemperature | grep -Eo "[[:digit:]]{1,}\.[[:digit:]]{1,}"}°C
conkyrc example, I use conky-colors to generate the conkyrc file. After that I customize the fileAnd here what it's look like on my desktopCode: Select all
###################### # - Conky settings - # ###################### update_interval 1 total_run_times 0 net_avg_samples 1 cpu_avg_samples 1 imlib_cache_size 0 double_buffer yes no_buffers yes format_human_readable ##################### # - Text settings - # ##################### use_xft yes xftfont Ubuntu:size=10 override_utf8_locale yes text_buffer_size 2048 ############################# # - Window specifications - # ############################# own_window_class Conky own_window yes own_window_type normal own_window_argb_visual yes own_window_argb_value 180 own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager alignment top_right gap_x 25 gap_y 40 minimum_size 182 600 maximum_width 182 default_bar_size 60 8 ######################### # - Graphics settings - # ######################### draw_shades no default_color cccccc color0 white color1 white color2 white TEXT ${font Ubuntu:style=Bold:size=10}SYSTEM $stippled_hr${font} ############## # - SYSTEM - # ############## ${color0}${voffset 6}${font ConkySymbols:size=19}U${font}${color}${goto 32}${voffset -14}Kernel: ${alignr}${color2}${kernel}${color} ${goto 32}uptime: ${alignr}${color2}${uptime}${color} # |--UPDATES ${goto 32}Updates: ${alignr}${font Ubuntu:style=Bold:size=10}${color1}${execi 360 aptitude search "~U" | wc -l | tail}${color}${font} ${color2}Packages${color} # |--CPU ${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -16}${goto 32}CPU1: ${font Ubuntu:style=Bold:size=10}${color1}${cpu cpu1}%${font} ${alignr}${color2}${cpugraph cpu1 8,50 white white}${color} ${goto 32}CPU2: ${font Ubuntu:style=Bold:size=10}${color1}${cpu cpu2}%${font} ${alignr}${color2}${cpugraph cpu2 8,50 white white}${color} # |--MEM ${color0}${font Poky:size=16}M${font}${color}${goto 32}${voffset -7}RAM: ${font Ubuntu:style=Bold:size=10}${color1}$memperc%${colo r}${font} ${offset 1}${voffset 2}${color0}${membar 4,18}${color}${goto 32}${voffset -2}F: ${font Ubuntu:style=Bold:size=10}${color2}${memeasyfree}$ {color}${font} U: ${font Ubuntu:style=Bold:size=10}${color2}${mem}${color}$ {font} # |--VGA ${color0}${font Poky:size=14}A${font}${color}${goto 32}${voffset -7}VGA: ${font Ubuntu:style=Bold:size=10}${color1}${execpi 30 /usr/bin/aticonfig --adapter=0 --od-getclocks | grep -Eo "[[:digit:]]\%"}${color}${font} ${goto 32}${voffset -5}Temp: ${font Ubuntu:style=Bold:size=10}${color1}${execpi 30 /usr/bin/aticonfig --adapter=0 --od-gettemperature | grep -Eo "[[:digit:]]{1,}\.[[:digit:]]{1,}"}°C${color}${font}
Note: Sorry for my bad english.
Code: Select all
##############################################
# Settings
##############################################
background yes
use_xft yes
xftfont Orbitron: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 220 100
maximum_width 221
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
default_bar_size 77 3
alignment top_left
gap_x 40
gap_y 40
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
##############################################
# Output
##############################################
Text
${font Orbitron:bold:size=15}$alignc - S P E C S - ${font}
${font Orbitron:size=20} RAM = ${font}${voffset -5}${font Orbitron:size=16}$mem ${font}
${voffset -3}${membar 3,100}
${voffset 16} ${font Orbitron:size=16} CPU =${font} ${voffset -5}${font Orbitron:size=16} ${cpu cpu0}% ${font}
${font Orbitron:size=12} DISK ${font}
${fs_bar /} ${font Orbitron:size=12} ${fs_used_perc /}%${font}
${font Orbitron:size=12} SWAP ${font}
${swapbar} ${font Orbitron:size=12} $swapperc% ${font}
${alignr 85}${font Orbitron:size=18}${color green}${time %I:%M %p}${font}${color}
${font Orbitron:bold:size=12}$alignc - N e t w o r k -${font}
${hr 2}
${font PizzaDude Bullets:size=16}U ${font}${font Orbitron:size=12}$alignr${downspeed eth0} kbs${font}
${font Orbitron:size=14} Total = ${font}${voffset -5}${font Orbitron:size=12}${totaldown eth0}${font}
${font PizzaDude Bullets:size=16}O ${font}${font Orbitron:size=12}$alignr${upspeed eth0} kbs${font}
${font Orbitron:size=14} Total = ${font}${voffset -5}${font Orbitron:size=12}${totalup eth0}${font}
Thanks for the kind words, I'm just helping were I can. There are a lot of people more conky wise than I am, it's just I'm here more often.lmintnewb wrote:Hiya's 2 Sector11, I see you are still one of the gnu/linux worlds leading guru's and fans of all things conky. Tips hat ... Dang people have some really nice conky configs going on here. Cool.
Code: Select all
conky -c /home/bushi12/.conky/scripts/conkyrcConky: llua_load: /home/bushi12/.conky/scripts/clock_rings.lua:262: unexpected symbol near '='
Conky: desktop window (1000024) is subwindow of root window (18e)
Conky: window type - override
Conky: drawing to created window (0x2a00001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_clock_rings execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_clock_rings execution failed: attempt to call a nil value
Code: Select all
clock_x=190
clock_y=297
show_seconds=true
require 'cairo'
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
Luckydog wrote:I know its not mine, however I stumpled upon this. It has a couple cool ones on it.
Under each one there was a link that said something like "download and configuration settings". So you should be able to use them if you like.minitrucker wrote:Luckydog wrote:I know its not mine, however I stumpled upon this. It has a couple cool ones on it.
sooooo jelli of all those
My conky setup that worked in LMDE doesn't work in Mint 12 either. Anyone has a solution?jpr928 wrote:Hi! my name is Jean-Pierre, I have a question, is lua difference between LM 12 and LMDE , because the same conky-lua is not working in LM 12
but work on LMDE.
The shell response on every symbol '=' is :
but the symbol '=' is important :Code: Select all
conky -c /home/bushi12/.conky/scripts/conkyrcConky: llua_load: /home/bushi12/.conky/scripts/clock_rings.lua:262: unexpected symbol near '=' Conky: desktop window (1000024) is subwindow of root window (18e) Conky: window type - override Conky: drawing to created window (0x2a00001) Conky: drawing to double buffer Conky: llua_do_call: function conky_clock_rings execution failed: attempt to call a nil value Conky: llua_do_call: function conky_clock_rings execution failed: attempt to call a nil value
Somebody know this problem and how to fix it ?Code: Select all
clock_x=190 clock_y=297 show_seconds=true require 'cairo' function rgb_to_r_g_b(colour,alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end
Thanks
Check your conky version.jompa89 wrote:I didn't install ant fonts on LMDE while I used that, and I don't know if there are any differences between this in LMDE and Mint 12.
Code: Select all
23:20:45 ~
$ conky --version
Conky 1.8.1 compiled Wed Sep 7 23:22:15 UTC 2011 for Linux 3.0.0-1-amd64 (x86_64)
Compiled in features:
System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky
X11:
* Xdamage extension
* XDBE (double buffer extension)
* Xft
* ARGB visual
Music detection:
* Audacious
* MPD
* MOC
* XMMS2
General:
* math
* hddtemp
* portmon
* Curl
* RSS
* Weather (METAR)
* Weather (XOAP)
* wireless
* support for IBM/Lenovo notebooks
* nvidia
* eve-online
* config-output
* Imlib2
* apcupsd
* iostats
* ncurses
* Lua
Lua bindings:
* Cairo
* Imlib2
23:20:55 ~
$
Code: Select all
* Lua
Lua bindings:
* Cairo
* Imlib2