Conky Showoff thread

Add functionality to your desktop
Forum rules
Before you post please read how to get help
User avatar
pilotbob42
Level 1
Level 1
Posts: 49
Joined: Mon Dec 16, 2019 11:45 am

Re: Conky Showoff thread

Post by pilotbob42 »

Nice set of arc gauges in Conky showing system load, mem usage, and disk and network I/O. Plus, temp and fan speeds for cpu, gpu, and mobo/case.

Screenshot from 2022-06-20 13-13-42.jpg

Config file (monitor.rc)

Code: Select all

# -- Conky settings -- #
update_interval 0.25
  
cpu_avg_samples 5
net_avg_samples 5
diskio_avg_samples 5

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
imlib_cache_size 0 

own_window_class Conky
own_window true
own_window_type desktop
own_window_argb_visual yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment middle_right
border_inner_margin 0
border_outer_margin 0

minimum_size 310 900
gap_x 30
gap_y 0

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

use_xft yes
xftfont Santana:size=8
xftalpha 0.8
 
uppercase no  
short_units yes

default_color FFFFFF

lua_load /home/bobl/.conky/monitor/monitor.lua
lua_draw_hook_pre main

TEXT
LUA file (monitor.lua)

Code: Select all

require 'cairo'

width = 310;
height = 900;

cols = {90, 180}
rows = {100, 250, 400, 550, 700, 850}

fg_alpha = 0.5;
mg_alpha = 0.15;
bg_alpha = 0.1;
fg_rgba = {1.0, 1.0, 1.0, fg_alpha};
mg_rgba = {1.0, 1.0, 1.0, mg_alpha};
bg_rgba = {1.0, 1.0, 1.0, bg_alpha};
red_rgb = {1.0, 0.0, 0.0};
amber_rgb = {1.0, 1.0, 0};
yellow_rgb = {1.0, 1.0, 1.0};

font_size = 20;
arc_thickness = 10;
line_thickness = 1;
graph_height = 25;
text_gap = arc_thickness * 7;
margin = 1;
radius_1 = 40;
radius_2 = radius_1 - arc_thickness - margin;
radius_3 = radius_2 - arc_thickness - margin;
radius_4 = radius_3 - arc_thickness - margin;
radii = {radius_1, radius_2, radius_3, radius_4};
start_angle = math.pi/2;
end_angle = math.pi*1.75;
label_org = radii[3] / 1.141;
gradient = 50
x_scale = 30;
y_scale = 6.25;

x = 1;
y = 2;
name = 3;
label = 3;
length = 3;
var = 4;
arg = 5;
max_value = 6;
ring = 7;
duration = 7;
red_value = 8;
data = 8;
amber_value = 9;
graph_scale = 9;
yellow_value = 10;
units = 11;
scale = 12;

system = {cols[2], rows[1], "System"};
storage = {cols[2], rows[2], "Storage"};
network = {cols[2], rows[3], "Network"};
cpu = {cols[2], rows[4], "Processor"};
gpu = {cols[2], rows[5], "Graphics"};
mbo = {cols[2], rows[6], "Mainboard"};

load_data = {};
memory_data = {};
root_data = {};
data_data = {};
down_data = {};
up_data = {};
cpu_tmp_data = {};
cpu_fan_data = {};
gpu_tmp_data = {};
gpu_fan_data = {};
mbo_tmp_data = {};
mbo_fan_data = {};

system_axis = {system[x], system[y], 90};
storage_axis = {storage[x], storage[y], 90};
network_axis = {network[x], network[y], 90};
cpu_axis = {cpu[x], cpu[y], 90};
gpu_axis = {gpu[x], gpu[y], 90};
mbo_axis = {mbo[x], mbo[y], 90};

axis = {system_axis, storage_axis, network_axis, cpu_axis, gpu_axis, mbo_axis};

load_graph={system_axis[x], system_axis[y], "load", "cpu", "cpu0", 100, system_axis[length], load_data, "P"};
memory_graph = {system_axis[x], system_axis[y], "mem", "memperc", "", 100, system_axis[length], memory_data, "P"};
root_graph = {storage_axis[x], storage_axis[y], "root", "diskio", "sdd", 10, storage_axis[length], root_data, "L"};
data_graph = {storage_axis[x], storage_axis[y], "data", "diskio", "sda", 10, storage_axis[length], data_data, "L"};
down_graph = {network_axis[x], network_axis[y], "down", "downspeed", "enp5s0", 10, network_axis[length], down_data, "L"}
up_graph = {network_axis[x], network_axis[y], "up", "upspeed", "enp5s0", 10, network_axis[length], up_data, "L"}
cpu_tmp_graph={cpu_axis[x], cpu_axis[y], "temp", "hwmon 3", "temp 1", 100, cpu_axis[length], cpu_tmp_data, "P"};
cpu_fan_graph={cpu_axis[x], cpu_axis[y], "fan", "hwmon 2", "fan 2", 2500, cpu_axis[length], cpu_fan_data, "P"};
gpu_tmp_graph={gpu_axis[x], gpu_axis[y], "temp", "hwmon 1", "temp 1", 100, gpu_axis[length], gpu_tmp_data, "P"};
gpu_fan_graph={gpu_axis[x], gpu_axis[y], "fan", "hwmon 1", "fan 1", 2500, gpu_axis[length], gpu_fan_data, "P"};
mbo_tmp_graph={mbo_axis[x], mbo_axis[y], "temp", "hwmon 2", "temp 3", 100, mbo_axis[length], mbo_tmp_data, "P"};
mbo_fan_graph={mbo_axis[x], mbo_axis[y], "fan", "hwmon 2", "fan 1", 2500, mbo_axis[length], mbo_fan_data, "P"};

graphs = {load_graph, memory_graph, root_graph, data_graph, down_graph, up_graph, cpu_tmp_graph, cpu_fan_graph, gpu_tmp_graph, gpu_fan_graph, mbo_tmp_graph, mbo_fan_graph};

load = {system[x], system[y], "load", "cpu", "cpu", 100, radii[1], 90, 80, 70, "%", "P"};
memory = {system[x], system[y], "mem", "memperc", "", 100, radii[2], 90, 80, 70, "%", "P"};
primary = {storage[x], storage[y], "root", "diskio", "sdd", 10, radii[1], 9.7, 9.4, 8.8, "", "L"};
secondary = {storage[x], storage[y], "data", "diskio", "sda", 10, radii[2], 9.7, 9.4, 8.8, "", "L"};
down = {network[x], network[y], "down", "downspeed", "enp5s0", 10, radii[1], 9.7, 9.4, 8.8, "", "L"}
up = {network[x], network[y], "up", "upspeed", "enp5s0", 10, radii[2], 9.7, 9.4, 8.8, "", "L"}
cpu_tmp = {cpu[x], cpu[y], "temp", "hwmon 3", "temp 1", 100, radii[1], 90, 80, 70, "°C", "P"};
cpu_fan = {cpu[x], cpu[y], "fan", "hwmon 2", "fan 2", 2500, radii[2], 2400, 2300, 2200, " rpm", "P"}
gpu_tmp = {gpu[x], gpu[y], "temp", "hwmon 1", "temp 1", 100, radii[1], 90, 80, 70, "°C", "P"};
gpu_fan = {gpu[x], gpu[y], "fan", "hwmon 1", "fan 1", 2500, radii[2], 2400, 2300, 2200, " rpm", "P"}
mbo_tmp = {mbo[x], mbo[y], "temp", "hwmon 2", "temp 3", 100, radii[1], 90, 80, 70, "°C", "P"};
mbo_fan = {mbo[x], mbo[y], "fan", "hwmon 2", "fan 1", 2500, radii[2], 2400, 2300, 2200, " rpm", "P"}

groups = {system, storage, network, cpu, gpu, mbo};
arcs = {load, memory, primary, secondary, down, up, cpu_tmp, cpu_fan, gpu_tmp, gpu_fan, mbo_tmp, mbo_fan}; 

function conky_setup()

end

function conky_main()

	if conky_window == nil then return end

	local updates = tonumber(conky_parse("${updates}"));
	if updates < 3 then return end	

	local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, width, height);
	cr = cairo_create(cs);

	local extents = cairo_text_extents_t:create();
	local text = "";

    for i in pairs(arcs) do
        draw_arc(arcs[i])
    end

    for i in pairs(groups) do
        write_label(groups[i]);
    end

    for i in pairs(axis) do
        draw_axis(axis[i]);
    end

    for i in pairs(graphs) do
        draw_graph(graphs[i]);
    end

    cairo_destroy(cr);
    cairo_surface_destroy(cs);
    cr = nil;
end

function write_label(label_set)
    set_colour(fg_rgba);
	cairo_select_font_face(cr, "Arial", 0 , 0);
	cairo_set_font_size(cr, font_size);

    text = label_set[label];
    label_x = label_set[x] + label_org + arc_thickness;
    label_y = label_set[y] - label_org + arc_thickness;
	cairo_move_to(cr, label_x, label_y);
	cairo_show_text(cr, text);

end

function draw_axis(data_set)
    local z_ = math.sqrt(2) * (radii[3]);
    local x_ = data_set[x] + z_ + arc_thickness;
    local y_ = data_set[y] - z_ ;
    local i = 0;
    while (i <= data_set[length]) do
        draw_line(x_ + i, y_, x_ + i, y_ - graph_height, bg_rgba);
        i = i + x_scale;
    end
    i = 0;
    while (i <= graph_height) do
        draw_line(x_, y_ - i, x_ + data_set[length], y_ - i, bg_rgba);
        i = i + y_scale;
    end
end

function draw_graph(data_set)
    local z_ = math.sqrt(2) * (radii[3]);
    local x_ = data_set[x] + z_ + arc_thickness;
    local y_ = data_set[y] - z_ ;
    local scaler = data_set[max_value] / graph_height;
    local array_length = #data_set[data];
    if array_length < data_set[duration] then
        array_length = array_length + 1;
        data_set[data][array_length] = 0;
    end
    local str = string.format('${%s %s}', data_set[var], data_set[arg]);
    str = conky_parse(str);

    local value = 0;
    local unit_ = "";
    if string.match(str, "%a*") then
        unit_ = string.match(str, "%a+");
    end

    local value_str = string.match(str, "%d*%p*%d*");
    value = tonumber(value_str);

    if string.find(data_set[graph_scale], "L") then
        value = get_log(value);
        if string.find(unit_, "K") then
            value = value + 3;
        end
        if string.find(unit_, "M") then
            value = value + 6;
        end
    end
    for i = array_length, 2, -1 do
        data_set[data][i] = data_set[data][i - 1];
    end
    data_set[data][1] = value / scaler;
    for i = 1, array_length - 1 do
        draw_line(x_ + i, y_ - data_set[data][i], x_ + i + 1, y_ - data_set[data][i + 1], fg_rgba);
    end
end

function draw_arc(data_set)
    local function get_angle(value_)
        return (end_angle - start_angle) * value_ / data_set[max_value] + start_angle;
        end
    local str, value = '', 0;
    local x_, y_ = data_set[x], data_set[y];
    local radius = data_set[ring];
    str = string.format('${%s %s}', data_set[var], data_set[arg]);
    str = conky_parse(str)
    local value = 0;
    local unit_ = "";
    if string.match(str, "%a*") then
        unit_ = string.match(str, "%a+");
    end

    value_str = string.match(str, "%d*%p*%d*");
    value = tonumber(value_str);

    if string.find(data_set[scale], "L") then
        value = get_log(value);
        if string.find(unit_, "K") then
            value = value + 3;
        end
        if string.find(unit_, "M") then
            value = value + 6;
        end
    end

    cairo_set_line_width(cr, arc_thickness);
	cairo_move_to(cr, x_, y_ + radius);
    cairo_arc(cr, x_, y_, radius,  start_angle, end_angle);
    set_colour(bg_rgba);
    cairo_stroke(cr);

    local white_max = get_angle(data_set[yellow_value]);
    local yellow_max = get_angle(data_set[amber_value]);
    local amber_max = get_angle(data_set[red_value]);
    local grad_angle = (end_angle - yellow_max) / gradient
    local draw_angle = yellow_max
    local r_ = 1.0
    local g_ = 1.0
    local b_ = 1.0
    local dec_ = 1.0 / gradient

    set_colour(fg_rgba);

    if string.find(data_set[scale], "-") then

        if value > data_set[yellow_value] then
            set_colour(fg_rgba);
        elseif value > data_set[amber_value] then
            set_colour(yellow_rgb);
        elseif value > data_set[red_value] then
            set_colour(amber_rgb);
        else
            set_colour(red_rgb);
        end
        cairo_arc(cr, x_, y_, radius,  start_angle, get_angle(value));
        cairo_stroke(cr);

    else

        if value < data_set[amber_value] then
            cairo_arc(cr, x_, y_, radius,  start_angle, get_angle(value));
            cairo_stroke(cr);
        else
            cairo_arc(cr, x_, y_, radius,  start_angle, yellow_max);
            cairo_stroke(cr);
            local value_angle = get_angle(value);
            local start_ = draw_angle
            while (draw_angle < value_angle) and (draw_angle < end_angle)
            do
                g_ = g_ - dec_;
                b_ = b_ - (dec_ * 3);
                cairo_set_source_rgba(cr, r_, g_, b_, fg_rgba[4]);
                start_ = draw_angle;
                draw_angle = draw_angle + grad_angle;
                cairo_arc(cr, x_, y_, radius, start_, draw_angle);
                cairo_stroke(cr);
            end
        end
    end

    write_two_columns(x_ + margin*5, y_ + radius + arc_thickness/2, data_set[name], str..data_set[units], 35)

end

function write_two_columns(tx, ty, first, second, gap)
    cairo_move_to(cr, tx, ty)
    set_colour(fg_rgba);
	cairo_set_font_size(cr, arc_thickness);
    text = first;
	cairo_show_text(cr, text);
    cairo_move_to(cr, tx + gap, ty)
    text = second;
	cairo_show_text(cr, text);
end

function set_colour(colour)
    if colour == fg_rgba then
        cairo_set_source_rgba(cr, fg_rgba[1], fg_rgba[2], fg_rgba[3], fg_rgba[4]);
    end
    if colour == bg_rgba then
        cairo_set_source_rgba(cr, bg_rgba[1], bg_rgba[2], bg_rgba[3], bg_rgba[4]);
    end
    if colour == red_rgb then
        cairo_set_source_rgba(cr, red_rgb[1], red_rgb[2], red_rgb[3], fg_rgba[4]);
    end
    if colour == amber_rgb then
        cairo_set_source_rgba(cr, amber_rgb[1], amber_rgb[2], amber_rgb[3], fg_rgba[4]);
    end
    if colour == yellow_rgb then
        cairo_set_source_rgba(cr, yellow_rgb[1], yellow_rgb[2], yellow_rgb[3], fg_rgba[4]);
    end
end

function draw_line(from_x, from_y, to_x, to_y, line_colour)
    cairo_set_line_width(cr, line_thickness);
    cairo_move_to(cr, from_x, from_y);
    set_colour(line_colour);
    cairo_line_to(cr, to_x, to_y);
    cairo_stroke(cr);
end

function get_log(number)
    local log_ = 0;
    local k = {10, 3.16, 1.77, 1.33, 1.15, 1.07, 1.03};
    local p = {1, 0.5, 0.25, 0.125, 0.063, 0.031, 0.016};
    local i = 1;
    while i < 8 do
        while number > k[i] do
            log_ = log_ + p[i];
            number = number / k[i]
        end
        i = i + i;
    end
    return log_;
end
alaneddy
Level 1
Level 1
Posts: 2
Joined: Sun Aug 21, 2022 11:10 pm

Re: Conky Showoff thread

Post by alaneddy »

My latest conky

Linux Mint 20.3 Mate x64 -- Decided to make a few conkys to spice up the desktop. Made 'em all transparent, so it makes the wallpaper appear 3D. Alien just kind of jumps out 'atcha :)

Image
Last edited by alaneddy on Mon Aug 22, 2022 12:34 am, edited 2 times in total.
Koentje
Level 4
Level 4
Posts: 444
Joined: Tue Jan 04, 2022 6:23 pm

Re: Conky Showoff thread

Post by Koentje »

Very nice!!
User avatar
trytip
Level 14
Level 14
Posts: 5302
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip »

alaneddy wrote:
Sun Aug 21, 2022 11:46 pm
i see your dns is 127.0.0.53, if you want to see your real dns instead of just internal server can you post:

Code: Select all

xed /etc/NetworkManager/NetworkManager.conf
Image
User avatar
trytip
Level 14
Level 14
Posts: 5302
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip »

conky using the old code language fortunes. you need apt install fortunes
Image

Code: Select all

###Settings###
background yes
cpu_avg_samples 10
default_bar_size 200 10
default_graph_size 200 100
diskio_avg_samples 10
double_buffer yes
extra_newline no
if_up_strictness address
net_avg_samples 10
no_buffers yes
temperature_unit celsius
text_buffer_size 2048
short_units yes
update_interval 1
###End Settings###

###Position###
alignment top_left
gap_x 10
gap_y 10
minimum_size 400 280
maximum_width 800
###End Position#####

###Borders###
border_inner_margin 0
border_outer_margin 10
border_width 0
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
###End Borders###

###Window###
own_window yes
own_window_argb_visual yes
own_window_argb_value 230
own_window_class systemConky
own_window_colour 2F343F
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
### all options for own_window_type are normal, desktop, dock, panel or override ###
own_window_type desktop
own_window_transparent no
own_window_title system_conky
###End Window###

###Font###
max_text_width 0
override_utf8_locale yes
uppercase no
use_spacer none
use_xft yes
xftfont Noto Sans:size=14
xftalpha 0.9
###End Font###

default_color EFEFEF
###Defining Colors###
###default_color 90EE90
default_outline_color 000000
default_shade_color 000000
#Shades of Gray#
color1 DDDDDD
color2 AAAAAA
color3 888888
#Orange#
color4 EF5A29
#MY Light Green#
color5 90EE90
#MY Blue Light TEXT#
color6 55ABFF
#Light Orange#
color7 FFA300
#MY Blue Light BARS#
color8 1E90FF
#MY Dark Gray#
color9 2E3436
#MY Dark Red#
color0 310000
#My Blue Graph#
#253558 0057FF#
#My Gray Graph#
#474747 E9E9E9#
#My Orange Graph#
#562E00 FF8800#
###End Color###

TEXT
#${color6}Fortunes:${color}
${voffset -15}${color3}${stippled_hr}${color}
${voffset -8}${color7}${execi 360 fortune -s | fold -w380}${color}
${voffset -10}${color3}${stippled_hr}${color}
${voffset -8}${color5}${execi 360 fortune -a | fold -w380}${color}
${voffset -10}${color3}${stippled_hr}${color}
${voffset -8}${color6}${execi 360 fortune /usr/share/games/fortunes/ -a | fold -w380}${color}
${voffset -10}${color3}${stippled_hr}${color}
${voffset -35}
Image
User avatar
zcot
Level 8
Level 8
Posts: 2106
Joined: Wed Oct 19, 2016 6:08 pm

Re: Conky Showoff thread

Post by zcot »

Just to make a note here, conky with legacy configs(pre-1.10, non-lua syntax) are failing on Mint 21.

Ubuntu compiled conky(1.12) against lua 5.3 when it should work with 5.4 instead and conky's automatic internal conversion script fails because of that. Maybe they'll repackage it at some point.

So the easy option is manually convert it using the provided convert script.

I do it for you, against the previous post: :D

Code: Select all

conky.config = {
--##Settings###
	background = true,
	cpu_avg_samples = 10,
	default_bar_width = 200, default_bar_height = 10,
	default_graph_width = 200, default_graph_height = 100,
	diskio_avg_samples = 10,
	double_buffer = true,
	extra_newline = false,
	if_up_strictness = 'address',
	net_avg_samples = 10,
	no_buffers = true,
	temperature_unit = 'celsius',
	text_buffer_size = 2048,
	short_units = true,
	update_interval = 1,
--##End Settings###

--##Position###
	alignment = 'top_left',
	gap_x = 10,
	gap_y = 10,
	minimum_width = 400, minimum_height = 280,
	maximum_width = 800,
--##End Position#####

--##Borders###
	border_inner_margin = 0,
	border_outer_margin = 10,
	border_width = 0,
	draw_borders = false,
	draw_graph_borders = true,
	draw_outline = false,
	draw_shades = false,
--##End Borders###

--##Window###
	own_window = true,
	own_window_argb_visual = true,
	own_window_argb_value = 230,
	own_window_class = 'systemConky',
	own_window_colour = '#2F343F',
	own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',
--## all options for own_window_type are normal, desktop, dock, panel or override ###
	own_window_type = 'desktop',
	own_window_transparent = false,
	own_window_title = 'system_conky',
--##End Window###

--##Font###
	max_text_width = 0,
	override_utf8_locale = true,
	uppercase = false,
	use_spacer = 'none',
	use_xft = true,
	font = 'Noto Sans:size=14',
	xftalpha = 0.9,
--##End Font###

	default_color = '#EFEFEF',
--##Defining Colors###
--##default_color 90EE90
	default_outline_color = '#000000',
	default_shade_color = '#000000',
--Shades of Gray#
	color1 = '#DDDDDD',
	color2 = '#AAAAAA',
	color3 = '#888888',
--Orange#
	color4 = '#EF5A29',
--MY Light Green#
	color5 = '#90EE90',
--MY Blue Light TEXT#
	color6 = '#55ABFF',
--Light Orange#
	color7 = '#FFA300',
--MY Blue Light BARS#
	color8 = '#1E90FF',
--MY Dark Gray#
	color9 = '#2E3436',
--MY Dark Red#
	color0 = '#310000',
--My Blue Graph#
--253558 0057FF#
--My Gray Graph#
--474747 E9E9E9#
--My Orange Graph#
--562E00 FF8800#
--##End Color###

};

conky.text = [[
#${color6}Fortunes:${color}
${voffset -15}${color3}${stippled_hr}${color}
${voffset -8}${color7}${execi 360 fortune -s | fold -w380}${color}
${voffset -10}${color3}${stippled_hr}${color}
${voffset -8}${color5}${execi 360 fortune -a | fold -w380}${color}
${voffset -10}${color3}${stippled_hr}${color}
${voffset -8}${color6}${execi 360 fortune /usr/share/games/fortunes/ -a | fold -w380}${color}
${voffset -10}${color3}${stippled_hr}${color}
${voffset -35}
]];
User avatar
AndyMH
Level 20
Level 20
Posts: 10774
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Conky Showoff thread

Post by AndyMH »

zcot wrote:
Tue Aug 23, 2022 12:20 am
Just to make a note here, conky with legacy configs(pre-1.10, non-lua syntax) are failing on Mint 21.
That may be the cause of the problem I have in another post with borders showing in LM21 but okay in LM20 and your fix to solve it washing out the images in my weather conky. The weather conky is in the old format, but will be a PITA to change, most of it is generated by a python script :(
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 4 x Thinkpad T430 Cinnamon 20.1, 2 x i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
User avatar
zcot
Level 8
Level 8
Posts: 2106
Joined: Wed Oct 19, 2016 6:08 pm

Re: Conky Showoff thread

Post by zcot »

AndyMH wrote:
Tue Aug 23, 2022 7:23 am
zcot wrote:
Tue Aug 23, 2022 12:20 am
Just to make a note here, conky with legacy configs(pre-1.10, non-lua syntax) are failing on Mint 21.
That may be the cause of the problem I have in another post with borders showing in LM21 but okay in LM20 and your fix to solve it washing out the images in my weather conky. The weather conky is in the old format, but will be a PITA to change, most of it is generated by a python script :(
No, the last config you posted is already in 1.10 lua-based format so that is fine. That issue with the shadow from the invisible window is either mutter or theme related. I'll try to dig up a fix.
User avatar
AndyMH
Level 20
Level 20
Posts: 10774
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Conky Showoff thread

Post by AndyMH »

I posted my standard conky, which I had converted to the new format. The weather conky is in the old format:

Code: Select all

# conky configuration
##############################################
#  Settings
##############################################
background false #doesn't seem to make any difference, yes/no, true/false
use_xft yes #anti aliased fonts
xftfont Sans:size=8
xftalpha 1
update_interval 2.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 0 0
#maximum_width 1000
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
default_color white
default_shade_color grey
default_outline_color white
alignment top_middle
no_buffers yes
uppercase no
override_utf8_locale no
text_buffer_size 4096
default_outline_color black
default_shade_color black
gap_y 0 
gap_x 0
##############################################
#  Output
##############################################
TEXT
${execpi 3600 python /home/andy/.conky/UKweather.py}

Homebrew i5-8400+GTX1080 Cinnamon 19.0, 4 x Thinkpad T430 Cinnamon 20.1, 2 x i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
User avatar
trytip
Level 14
Level 14
Posts: 5302
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip »

zcot wrote:
Tue Aug 23, 2022 12:20 am
it's very sad i can play windows3.1 games on windows10 but i can't use the same conly form 5 years ago. thanx for translating the code language, but it should be done automatically.
Image
User avatar
AndyMH
Level 20
Level 20
Posts: 10774
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Conky Showoff thread

Post by AndyMH »

trytip wrote:
Tue Aug 23, 2022 12:50 pm
thanx for translating the code language, but it should be done automatically.
It does, but sometimes it obviously gets it wrong.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 4 x Thinkpad T430 Cinnamon 20.1, 2 x i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
Koentje
Level 4
Level 4
Posts: 444
Joined: Tue Jan 04, 2022 6:23 pm

Re: Conky Showoff thread

Post by Koentje »

AndyMH wrote:
Tue Aug 23, 2022 10:53 am
I posted my standard conky, which I had converted to the new format. The weather conky is in the old format:
New format

Code: Select all

conky.config = {
-- conky configuration
--#############################################
--  Settings
--#############################################
	background = false,
--doesn't seem to make any difference, yes/no, true/false
	use_xft = true,
--anti aliased fonts
	font = 'Sans:size=8',
	xftalpha = 1,
	update_interval = 2.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
	own_window_type = 'desktop',
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 0, minimum_height = 0,
--maximum_width 1000
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	stippled_borders = 0,
	default_color = 'white',
	default_shade_color = 'grey',
	default_outline_color = 'white',
	alignment = 'top_middle',
	no_buffers = true,
	uppercase = false,
	override_utf8_locale = false,
	text_buffer_size = 4096,
	default_outline_color = 'black',
	default_shade_color = 'black',
	gap_y = 0,
	gap_x = 0,
--#############################################
--  Output
--#############################################
};

conky.text = [[
${execpi 3600 python /home/andy/.conky/UKweather.py}

]];
User avatar
AndyMH
Level 20
Level 20
Posts: 10774
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Conky Showoff thread

Post by AndyMH »

Just checked, conky statements appear unchanged between old and new syntax so ${execpi 3600 python /home/andy/.conky/UKweather.py} might work as is. The python script was one of my first - dreadful, really needs rewriting.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 4 x Thinkpad T430 Cinnamon 20.1, 2 x i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
Koentje
Level 4
Level 4
Posts: 444
Joined: Tue Jan 04, 2022 6:23 pm

Re: Conky Showoff thread

Post by Koentje »

AndyMH wrote:
Tue Aug 23, 2022 2:25 pm
Just checked, conky statements appear unchanged between old and new syntax so ${execpi 3600 python /home/andy/.conky/UKweather.py} might work as is. The python script was one of my first - dreadful, really needs rewriting.
Can (or will) you post that UKweather.py file, i like to test it on my machine..
User avatar
AndyMH
Level 20
Level 20
Posts: 10774
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Conky Showoff thread

Post by AndyMH »

It's unlikely to run without some hassle:
  • python2 (not installed, but you can install python2.7 in LM21)
Just two reasons why I ought to bite the bullet and redo it - download the data direct from the UK met office and parse it myself.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 4 x Thinkpad T430 Cinnamon 20.1, 2 x i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
User avatar
zcot
Level 8
Level 8
Posts: 2106
Joined: Wed Oct 19, 2016 6:08 pm

Re: Conky Showoff thread

Post by zcot »

trytip wrote:
Tue Aug 23, 2022 12:50 pm
it should be done automatically.
Yes, it has been doing that since conky 1.10 which was back all the way to Mint 18.x! It has been automatically translating since 1.10 when Brenden Matthews forked it.

And even on Mint 21 (Ubuntu 22.04) it is still translating! -except that Ubuntu repackaged it but used the wrong lua linkage, so hence the failure. My point was that conversion is easier than a recompile of the conky setup(although that's not that hard only much more time consuming). :wink:

They'll fix the package at some point I'm sure, but will it be in the next couple weeks, or more like 22.04.1 or .2?

you can't use fontN with the old config, or some of the other cooler features, but it still works.
User avatar
all41
Level 18
Level 18
Posts: 8438
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Conky Showoff thread

Post by all41 »

My conky stategy is simple: show analytics plainly--no further decorations necessary.
Everything is difficult before it gets easy.
User avatar
Bleys
Level 2
Level 2
Posts: 70
Joined: Wed Apr 20, 2022 4:17 am
Location: Essen, Germany

Re: Conky Showoff thread

Post by Bleys »

trytip wrote:
Tue Aug 23, 2022 12:50 pm
it's very sad i can play windows3.1 games on windows10 but i can't use the same conly form 5 years ago.
The Windows comparison is a bit unfair. There are countless hardware and software products from the Windows world from 2015 that no longer work under a current Windows. And not at all anymore. Convert, customize... does not work at all.

The change to LUA syntax is more than 7 years ago. Should be time enough to adapt. And it is still possible to adapt even Conky from 2005 to the current version.
Bildschirmfoto.jpg
Ryzen 5 3400G, 16GB RAM, SanDisk Extrem Pro 1TB nvme, ASUS Prime B450M-A, Samsung Odyssey 49", Linux Mint 21
Koentje
Level 4
Level 4
Posts: 444
Joined: Tue Jan 04, 2022 6:23 pm

Re: Conky Showoff thread

Post by Koentje »

Beautiful clock!
User avatar
MurphCID
Level 14
Level 14
Posts: 5171
Joined: Fri Sep 25, 2015 10:29 pm
Location: Within 100 miles of San Antonio, Texas

Re: Conky Showoff thread

Post by MurphCID »

Some of these are really, really nice, and inventive.
Post Reply

Return to “Compiz, Conky, Docks & Widgets”