Re: Conky Helps and Stuff
Posted: Fri May 04, 2018 3:49 am
Excellent links, especially the second one with all of the instructions & explanations.
Support for MX and antiX Linux distros
http://forum.mxlinux.org/
Code: Select all
#pkill -xf "conky -q -c /home/male/.conky/cli_weather/conkyrc9" &
# Elegance-beam conky by damo, July 2017
# Conky v1.10
alignment top_right
background yes
border_inner_margin 15
border_width 5
default_color ffffff
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
gap_x 25
gap_y 25
maximum_width 320
double_buffer yes
override_utf8_locale yes
own_window yes
#own_window_class Conky
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager #sticky
#own_window_argb_visual yes
#own_window_argb_value 150
text_buffer_size 8000
total_run_times 0
update_interval 1
uppercase no
use_xft yes
xftalpha 1
short_units no
xftfont AvantGarde LT ExtraLight:pixelsize=16
color1 678b8b
color2 284f63
color3 b72e3f
color4 668989
color5 dae1e3
color6 5d8185
color7 4f727b
TEXT
${color}${font AvantGarde LT ExtraLight:pixelsize=150}${alignr}${time %H}
${voffset -65}${alignr}${color3}${time %M}
${voffset -90}${color}${font AvantGarde LT ExtraLight:pixelsize=20}${alignr}${time %A} | ${alignr}${time %d.%B %Y}
${voffset 20}${color}${font}ram ${alignr}${mem} / ${memmax}
cpu ${alignr}${cpu cpu0}%
cpu temp ${alignr}${color}${hwmon 1 temp 2} °C
GPU ${alignr}${hwmon 2 temp 1} °C
fs ${alignr}${fs_used_perc /}% / ${fs_size /}
${voffset 30}${alignr}${kernel}
${hr}
${font Birdman:size=13}antiX 17.1 ${alignr} W E A T H E R
${goto 40}${font liberation mono:size=9}${execi 600 curl 'wttr.in/leipzig?q?0?T'}${font}
${hr}
#${font Birdman}Linux News DE ${alignr}F E E D
#${font AvantGarde LT ExtraLight:pixelsize=14}${rss http://feeds.feedburner.com/linuxnewsde/ 15 item_titles 4 2}
#${hr}
Code: Select all
-- Elegance-beam conky by damo, July 2017
-- Conky v1.10
conky.config = {
alignment = 'top_right',
background = false,
border_inner_margin = 15,
border_width = 5,
default_color = 'ffffff', --ffffff # grey 5f5f5f 3F3F3F 183149 3B3B3B 26211F
double_buffer = true,
draw_borders = false,
draw_graph_borders = false,
draw_outline = false,
draw_shades = false,
gap_x = 25,
gap_y = 25,
maximum_width = 320,
double_buffer = true,
override_utf8_locale = true,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'normal',
own_window_transparent = true,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager', --sticky',
own_window_argb_visual = true,
-- own_window_argb_value = 150,
text_buffer_size = 8000,
total_run_times = 0,
update_interval = 1,
uppercase = false,
use_xft = true,
xftalpha = 1,
short_units = false,
font = 'AvantGarde LT ExtraLight:pixelsize=16',
color1 = '678b8b',
color2 = '284f63',
color3 = 'b72e3f',
color4 = '668989',
color5 = 'dae1e3',
color6 = '5d8185',
color7 = '4f727b',
};
conky.text = [[
${color}${font AvantGarde LT ExtraLight:pixelsize=150}${alignr}${time %H}
${voffset -65}${alignr}${color3}${time %M}
${voffset -90}${color}${font AvantGarde LT ExtraLight:pixelsize=20}${alignr}${time %A} | ${alignr}${time %d.%B %Y}
${voffset 20}${color}${font}ram ${alignr}${mem} / ${memmax}
cpu ${alignr}${cpu cpu0}%
cpu temp ${alignr}${color}${hwmon 1 temp 2} °C
GPU ${alignr}${hwmon 2 temp 1} °C
fs ${alignr}${fs_used_perc /}% / ${fs_size /}
${voffset 30}${alignr}${kernel}
${hr}
${font Birdman}Siduction ${alignr} W E A T H E R
${goto 40}${font liberation mono:size=9}${execi 600 curl 'wttr.in/leipzig?q?0?T'}${font}
${hr}
${font Birdman}Linux News DE ${alignr}F E E D
${font AvantGarde LT ExtraLight:pixelsize=14}${rss http://feeds.feedburner.com/linuxnewsde/ 15 item_titles 4 2}
${hr}
]];
Code: Select all
require 'cairo'
home = os.getenv ('HOME')
--Fonction d'affichage
function conky_fDrawImage(path,x,y,w,h,arc)
path = string.gsub(path, "~", home)
path = string.gsub(path, "$HOME", home)
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local function fDrawImage(path,x,y,w,h,arc)
x=x+(w/2)
y=y+(h/2)
local img = cairo_image_surface_create_from_png(path)
local w_img, h_img = cairo_image_surface_get_width (img), cairo_image_surface_get_height (img)
local cr = cairo_create (cs)
cairo_translate (cr, x, y)
if arc then
cairo_rotate (cr, arc)
end
cairo_scale (cr, w/w_img, h/h_img)
cairo_set_source_surface (cr, img, -w_img/2, -h_img/2)
cairo_paint (cr)
cairo_destroy(cr)
cairo_surface_destroy (img)
end
fDrawImage(path,x,y,w,h,arc)
cairo_surface_destroy(cs)
return ""
end