You are not logged in.

#2721 Today 03:46:26

WizardofCOR
Member
Registered: 2023-07-28
Posts: 75

Re: Show us your conky

ceeslans wrote:

Afaik the conky at the right is called 'MX-CoreBlue' ;  dunno the author, but this conky has been in the MX-Linux collection since 2014.
The standard width is based on only two CPU meters; @Yamato must have added three more in the 'clock1_rings.lua' script.

Fwiw, I've configured and customized the conkyrc and lua-script for use in devuan6, to humbly fit on my 10y old poor-man's hardware.
I'll gladly share the relevant conkyrc and lua script, should you be interested.

No clue what the center conky is called - nor where available...

https://i.postimg.cc/HVfL03JR/cheeese-20260706-192526.jpg

Oh wow, thank you!  That's 2/3 components - a solid win, IMO.   cool
Yeah ceeslans, I'll take it if you have it handy - if not I should be able to perform a search, so no worries.
Can't wait to dig into this - hopefully this weekend, we'll see.
Again, appreciate the help, guys - you rock!


Just a dude playing a dude, disguised as another dude...

Offline

#2722 Today 07:03:56

ceeslans
Member
Registered: 2015-09-30
Posts: 223

Re: Show us your conky

@WizardofCOR : I later found where you can download the updated MX-CoreBlue conky files, updated for the (trixie-based) MX-25 release:
https://github.com/MX-Linux/mx-conky-da … X-CoreBlue
That version uses the 'eth0/wlan0' network interface (adapt the conkyrc2core config-file to those applicable in your system)

The version I customized for Devuan Excalibur (which is also trixie-based but without systemd) uses the 'gw_iface' variable to display the default network interface. You may well need to check the .conkyrc file for any paths, execi commands etc to be modified and matching your own preferences. The selected fonts are pretty common and should be available in your bunsenlabs setup.

~/.conky/CoreBlue.conkyrc

-----------------
-- CoreBlue --
-----------------

conky.config = {

update_interval = 1,
cpu_avg_samples = 2,
net_avg_samples = 2,
double_buffer = true,
no_buffers = true,
text_buffer_size = 2048,
short_units = true,
temperature_unit = 'celsius',
top_name_width = 12,

background 	= false,
own_window 	= true,
own_window_type = 'normal',

own_window_transparent = false,
own_window_argb_visual = true,
own_window_argb_value = 0,

own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_colour = '000000',
own_window_class = 'Conky',
own_window_title = 'CoreBlueConky',

draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
border_inner_margin = 0,
border_outer_margin = 15,

use_xft = true,
override_utf8_locale = true,
font = 'DejaVu Sans:size=9', 
xftalpha = 0.5,
uppercase = false,

minimum_width = 250,
maximum_width = 250,
		-- minimum_height = 300,
		
gap_x = 40,
gap_y = 60,
alignment = 'top_right',

default_color = 'FFFFFF',	--## white
color1  = '0ABFFF',			--## blue
color2	= 'BBBBBB',			--## offwhite

-- ## Lua Load ##
-- ##############
    lua_load = '~/.conky/LUA/coreblue_rings.lua',
    lua_draw_hook_pre = 'clock_rings',

};

conky.text = [[
###------------
# Time and date     #### initial font for below DATE was: Radio Space
###------------
${voffset 2}${font DejaVu Sans:size=16}${color1}${time %A}${font}${color}${font DejaVu Sans:size=38}${alignr 10}${voffset -8} ${time %e}${font}
${font DejaVu Sans:size=16}${voffset -28}${time %B}${font}${voffset -3} ${font DejaVu Sans:size=20}${color1}${time %Y}${font} ${hr 1}
###-------------
# Battery Circle 
###-------------
${voffset 2}\
${color}${goto 208}${voffset 45}${battery_short BAT0}${color}
${color1}${voffset -2}${goto 208}${voffset 1}BAT${color} 
###------
# Uptime
###------
${voffset 100}\
${color1}${voffset 6}${alignr 5}Uptime: ${color}${uptime}
###--------
# CPU usage 
###--------
${color1}${hr 1}${color}
${color1}${voffset 5}Temp: ${color} ${hwmon coretemp temp 1}
${color1}${voffset 5}Processes:${color} ${processes}
${color1}${voffset 5}Running: ${color} ${running_processes}${goto 126}${voffset -5}${cpu cpu0}% ${color1}${goto 126}${voffset 14}CPU1${color}${goto 201}${voffset -14}${cpu cpu1}% ${color1}${goto 201}${voffset 14}CPU2${color}
${color #0ABFFF}${voffset -3}Freq:${color} ${freq}MHz
${color #0ABFFF}${voffset 5}Load:${color} ${loadavg}
###-------
# Network
###------
${color1}${voffset 1}${hr 1}
${color1}${voffset 7}Interface: ${color}${alignr 5}${gw_iface}
#${color1}${voffset 3}Current: ${color}${alignr 5}${execi 10 /sbin/iwconfig wlan0|grep Rate|cut -d"M" -f1|cut -b20-24}Mbits/sec
#${color1}${voffset 3}SSID: ${color}${alignr 5}${wireless_essid $gw_iface}
${color1}${voffset 3}Signal: ${color}${alignr 5}${wireless_link_qual_perc $gw_iface}%
${color1}${voffset 3}IP local: ${color}${alignr 5}${addr $gw_iface}
${color1}${voffset 6}Down : ${color}${downspeed $gw_iface}/s ${alignr 5}${color}Up : ${color}${upspeed $gw_iface}/s
${color2}${downspeedgraph $gw_iface 25,115 000000 0ABFFF} ${alignr 5}${upspeedgraph $gw_iface 25,115 000000 0ABFFF}${color}${voffset -2}
${color1}Total Down:${color} ${totaldown $gw_iface}${alignr 5}${color}Total Up:${color} ${totalup $gw_iface}
###------------------
# DISK/RAM/SWAP usage
###------------------
${color1}${voffset 1}${hr 1}${voffset 2}
${color}${goto 19}${voffset 37}${memperc}%
${color1}${goto 19}MEM
${color1}${goto 82}${voffset -45}used
${color}${goto 81}${voffset 0}${legacymem}
${color}${goto 128}${voffset -15}${fs_used_perc /}%
${color1}${goto 128}DISK
${color}${goto 202}${voffset -30}${fs_used_perc /mnt/DATA}%
${color1}${goto 202}DATA
###----------------
# Running processes
###----------------
${color1}${voffset 5}${hr 1}
${color1}${voffset 5}NAME${goto 125}PID${goto 170}CPU%${goto 222}MEM%${color}${voffset 5}
${top name 1}${goto 110}${top pid 1}${goto 170}${top cpu 1}${goto 222}${top mem 1}
${top name 2}${goto 110}${top pid 2}${goto 170}${top cpu 2}${goto 222}${top mem 2}
${top name 3}${goto 110}${top pid 3}${goto 170}${top cpu 3}${goto 222}${top mem 3}
${top name 4}${goto 110}${top pid 4}${goto 170}${top cpu 4}${goto 222}${top mem 4}
#${top name 5}${goto 110}${top pid 5}${goto 170}${top cpu 5}${goto 222}${top mem 5}
#${top name 6}${goto 110}${top pid 6}${goto 170}${top cpu 6}${goto 222}${top mem 6}
#${top name 7}${goto 110}${top pid 7}${goto 170}${top cpu 7}${goto 222}${top mem 7}
#${top name 8}${goto 110}${top pid 8}${goto 170}${top cpu 8}${goto 222}${top mem 8}
###------------
# Computer info
###------------
${color1}${voffset 5}${hr 1}
#${voffset 5}${color1}Distro:${color} ${alignr 5}${execi 86400 (. /etc/os-release; echo ${ID:?} ${VERSION:?})}  |  ${if_existing /run/systemd/system}Systemd${else}SysVinit${endif}
${voffset 5}${color1}Distro:${color} ${alignr 5}${execi 86400 (. /etc/os-release; echo ${ID:?} ${VERSION:?})} | ${execi 300 ps --no-headers -o comm 1}
${voffset 2}${color1}Session:${color} ${alignr 5}${execi 86400 printenv XDG_SESSION_DESKTOP}
${voffset 2}${color1}Kernel:${color}${alignr 5}${kernel}
${voffset 2}${color1}CPU:${color}${alignr 5}${exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 1-26}
#${voffset 2}${color1}CPU:${color}${alignr 5}${execi 86400 inxi -x -C | awk '/Info/ {print $5,$6,$7}'}
###----------
# Audioplayer
###----------
${if_running audacious}${color1}${voffset 5}${hr 1}
${color1}${voffset 5}Audacious ${font}${alignr 5}Now:  ${color2}${exec audtool --playback-status}
${voffset 8}${color1}Title: ${color}${alignr 5}${exec audtool --current-song-tuple-data title| cut -c1-35}
${voffset 2}${color1}Artist: ${color}${alignr 5}${exec audtool --current-song-tuple-data artist| cut -c1-34}
${voffset 2}${color1}Album: ${color}${alignr 5}${exec audtool --current-song-tuple-data album| cut -c1-33}
${voffset 2}${color1}Track nr:  ${exec audtool --current-song-tuple-data track-number} ${color}${alignr 5}${exec audtool --current-song-output-length} | ${exec audtool --current-song-length}${voffset 15}${endif}
${voffset -45}
]];

~/.conky/LUA/coreblue_rings.lua

--[[
# Clock Rings by Linux Mint (2012) reEdited by Altin.
# 
# This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. 
# This script is based off a combination of my clock.lua script and my rings.lua script.
#
# IMPORTANT: If you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. 
#                     The if statement on line 324 uses a delay to make sure that this doesn't happen. 
#                     It calculates the length of the delay by the number of updates since Conky started. 
#                     Generally, a value of 5s is long enough, so if you update Conky every 1s, 
#                     use update_num>5 in that if statement (the default). 
#                     If you only update Conky every 2s, you should change it to update_num>3; 
#                     conversely if you update Conky every 0.5s, you should use update_num>10. 
#                     ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, 
#                     otherwise the update_num will not be reset and you will get an error.
#
# To call this script in Conky, use the following in your conkyrc:
#
#	lua_load ~/.conky/clock01_rings.lua
#	lua_draw_hook_pre clock_rings
#
# Changelog:
#   * v1.0 -->  Original release (30.09.2009)
#   * v1.1p -->   Jpope edit londonali1010 (05.10.2009)
#   * vX 2011mint --> reEdit despot77 (18.02.2011)
#   * vX 2012 --> Altin reEdit (22.07.2012)
# 	* Added weather function (Accu Weather)
# 	* Added battery monitoring
# 	* Syslog monitoring
# 	* Running processes monitoring
# 	* Rearanged rings
# 	* Exctra network functions/monitoring
# 	* Changed Fonts
]]

--[[
        -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
        -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. 
        -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
        -- "bg_colour" is the colour of the base ring.
        -- "bg_alpha" is the alpha value of the base ring.
        -- "fg_colour" is the colour of the indicator part of the ring.
        -- "fg_alpha" is the alpha value of the indicator part of the ring.
        -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the window.
        -- "radius" is the radius of the ring.
        -- "thickness" is the thickness of the ring, centred around the radius.
        -- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Can be either positive or negative.
        -- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. 
        --   can be either positive or negative, but must be larger than start_angle.
]]
    
settings_table = {

	{
        name='time',
        arg='%I.%M',
        max=12,
        bg_colour=0xffffff,
        bg_alpha=0.15,
        fg_colour=0x0ABFFF,
        fg_alpha=0.3,
        x=100, y=180,
        radius=50,
        thickness=5,
        start_angle=0,
        end_angle=360
    },
    {
        name='battery_percent',
        arg='',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x0ABFFF,
        fg_alpha=0.6,
        x=235, y=120,
        radius=25,
        thickness=3,
        start_angle=-90,
        end_angle=180
    },
        {
        name='battery_percent',
        arg='',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0xffffff,
        fg_alpha=0.2,
        x=235, y=120,
        radius=22,
        thickness=2,
        start_angle=-90,
        end_angle=180
    },

    {
        name='time',
        arg='%M.%S',
        max=60,
        bg_colour=0xffffff,
        bg_alpha=0.1,
        fg_colour=0x0ABFFF,
        fg_alpha=0.4,
        x=100, y=180,
        radius=66,
        thickness=5,
        start_angle=0,
        end_angle=360
    },
    {
        name='time',
        arg='%S',
        max=60,
        bg_colour=0xffffff,
        bg_alpha=0.1,
        fg_colour=0x0ABFFF,
        fg_alpha=0.6,
        x=100, y=180,
        radius=72,
        thickness=5,
        start_angle=0,
        end_angle=360
    },
    {
        name='time',
        arg='%d',
        max=31,
        bg_colour=0xffffff,
        bg_alpha=0.1,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=100, y=180,
        radius=80,
        thickness=5,
        start_angle=-90,
        end_angle=90
    },
    {
        name='time',
        arg='%m',
        max=12,
        bg_colour=0xffffff,
        bg_alpha=0.1,
        fg_colour=0x0ABFFF,
        fg_alpha=1,
        x=100, y=180,
        radius=86,
        thickness=5,
        start_angle=-90,
        end_angle=90
    },
    {
        name='cpu',
        arg='cpu0',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=160, y=325,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='cpu',
        arg='cpu1',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=235, y=325,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=50, y=590,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=160, y=590,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='fs_used_perc',
        arg='/mnt/DATA',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=235, y=590,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=172
    },
}

	-- Use these settings to define the origin and extent of your clock.

clock_r=65

	-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.

clock_x=100
clock_y=175

show_seconds=true -- Change to true if you want the seconds hand

require 'cairo'
pcall(function() require('cairo_xlib') end)

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

function window_background(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 draw_clock_hands(cr,xc,yc)
    local secs,mins,hours,secs_arc,mins_arc,hours_arc
    local xh,yh,xm,ym,xs,ys
    
    secs=os.date("%S")    
    mins=os.date("%M")
    hours=os.date("%I")
        
    secs_arc=(2*math.pi/60)*secs
    mins_arc=(2*math.pi/60)*mins+secs_arc/60
    hours_arc=(2*math.pi/12)*hours+mins_arc/12
        
    -- Draw hour hand
    
    xh=xc+0.76*clock_r*math.sin(hours_arc)
    yh=yc-0.72*clock_r*math.cos(hours_arc)
    cairo_move_to(cr,xc,yc)
    cairo_line_to(cr,xh,yh)
    
    cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    cairo_set_line_width(cr,5)
    cairo_set_source_rgba(cr,1.0,1.0,1.0,0.9)
    cairo_stroke(cr)
    
    -- Draw minute hand
    
    xm=xc+0.98*clock_r*math.sin(mins_arc)
    ym=yc-1.02*clock_r*math.cos(mins_arc)
    cairo_move_to(cr,xc,yc)
    cairo_line_to(cr,xm,ym)
    
    cairo_set_line_width(cr,3)
    cairo_stroke(cr)
    
    -- Draw seconds hand
    
    if show_seconds then
        xs=xc+1.1*clock_r*math.sin(secs_arc)
        ys=yc-clock_r*math.cos(secs_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xs,ys)
    
        cairo_set_line_width(cr,1)
        cairo_stroke(cr)
    end
end

function conky_clock_rings()
    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)
        pct=value/pt['max']
        
        draw_ring(cr,pct,pt)
    end
    
    -- Check that Conky has been running for at least 5s

    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
    
    draw_clock_hands(cr,clock_x,clock_y)
end

Last edited by ceeslans (Today 07:36:13)

Offline

Board footer

Powered by FluxBB