
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Conky Basic displays only the most basic information about your system.
In the lua file you can change the color scheme used by Conky Basic, show all CPU cores or not and set a battery alert level.
You can also choose what to display, only CPU, storage, memory , details about storage etc..
Thanks to autocrosser1 and soundrolf for their ideas and code contributions
When using a laptop don't forget to set the show_battery option to yes.
If you modified Conky Basic make a backup of your files first before installing this version !!!
Installation
- unpack source file
- copy the file .conkybasic to your home directory
- copy the file .conkybasic_c110 to your home directory
- copy the basic folder into ~/.lua
- install the Unique font in ~/.lua/basic
Start conky via 'conky -c .conkybasic -q'
If you are using Conky version 1.10.0 start conky via 'conky -c .conkybasic_c110 -q'
Keep in mind that Conky 1.10.0 uses a new configuration file format and is still work in progress. That's why I used some work-arounds to get things working, so your mileage may vary.
Version 1.6 3 years ago
- Changed network and battery detection
Version 1.6 3 years ago
- Changed network and battery detection
Changelog 1.5 3 years ago
v 1.5 Added network interface display. Rearranged high CPU temperature check
v 1.4 IP address fix, distribution name fix, some minor fixes.
v 1.3 Changed disk detection so CD/DVD devices are also shown correctly
Version 1.2 4 years ago
Changed CPU high temperature limit detection
Changelog v1.1 4 years ago
Added check for eth1 and wlan1
Changed own_prexec function to prevent running out of file handles
Limit displayed diskname to 15 characters
Changelog v 1.0
Added system CPU speed and temperature details
Added disk details
Added network details
5 years ago
Version 0.9
Changed text scroller
Changed system information
Added Audacious extended information
Version 0.8.1
Added Audacious detection in Radiotray
Version 0.8
Added LAN text to fixed network
Changed Radiotray text
Added clock to radiotray when not active
Added system information to the radiotray. This is visible when not listening to music
Added user preference for showing system information or not.
Added user preference for the maximum number of processes to show
Added rhythmbox detection in Radiotray
Changed text_buffer_size to 512 in .conkyrc to accommodate Rhythmbox metadata
Added extra battery location
Minor cosmetic changes
Version 0.7
Added process tab
Version 0.6
Moved Conky 1.10.0 CPU workaround from configuration file to lua file
Change / detection as it also displayed /home as / instead of home
Minor cosmetic changes
Added Radio Tray tab as per request by soundrolf
Version 0.5.1
Change CPU display code. Should work fine in Conky 1.10 now, with a work-around in the conkybasic_c110 file
Version 0.4
Minor change in CPU detect function
Corrected display for only 1 CPU present
Changed CPU value pass-through to other functions
Tested with conky 1.10.0
Add conky version detection and 1.10.0 workarounds
Version 0.3
Major code overhaul. Every tab now has it's own function
Added disklabel length check
Changed battery display
Changed CPU detection from 'core id' to 'processor'. Core i7 processors should be correctly shown now.
Version 0.1 new
Moob
5 years ago
Report
Moob
5 years ago
Report
Moob
5 years ago
When it's ready I put it in the next version.
Report
Moob
5 years ago
I will look if the radio part is possible autocrosser :)
Report
Moob
5 years ago
Report
autocrosser1
5 years ago
For some reason my /home is being shown as a separate "Root"--not sure why.
I wrote a couple of additional segments "CPU_Processes" & MEM_Processes"...they work, but when I move them around I get errors..Not sure how to add extra segments in....The cpu segment looks like this:
-- parameters idem conky_wired_tab_cpu_proc
function conky_wired_tab_cpu_proc(x,y,width,height,text,font,font_size,r,g,b)
local vuheight=15 --VU barheight
local onebarheight=vuheight+8
local basey=y
local barfs=12 -- VU bar fontsize
if height <= 60 then
print("ERROR conky_wired_tab_cpu_proc: insufficient height. Must be higher than 60")
return
end
local aspect=math.floor(height/60)
local corner_radius = height / 10.0
local radius = corner_radius / aspect
local degrees = math.pi / 180.0
-- draw text
conky_lctexta(x+width,y+15,text,font,font_size,r,g,b)
-- draw tab
cairo_new_sub_path (cr)
cairo_arc (cr, x + width - radius, y + radius, radius, -90 * degrees, 0 * degrees)
cairo_arc (cr, x + width - radius, y + height - radius, radius, 0 * degrees, 90 * degrees)
cairo_arc (cr, x + radius, y + height - radius, radius, 90 * degrees, 180 * degrees)
cairo_arc (cr, x + radius, y + radius, radius, 180 * degrees, 270 * degrees)
cairo_close_path (cr)
cairo_set_source_rgba (cr, r,g,b,.6)
cairo_set_line_width (cr, 2)
cairo_stroke (cr)
conky_lctext(x+6,y+onebarheight+8,conky_parse("${top name 1}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+onebarheight+8,conky_parse("${top cpu 1}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+44,conky_parse("${top name 2}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+44,conky_parse("${top cpu 2}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+56,conky_parse("${top name 3}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+56,conky_parse("${top cpu 3}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+68,conky_parse("${top name 4}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+68,conky_parse("${top cpu 4}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctext(x+6,y+80,conky_parse("${top name 5}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
conky_lctexta(x+150,y+80,conky_parse("${top cpu 5}"),"Arial",11,themes.tred,themes.tgreen,themes.tblue)
return (x+width),(y+height)
end -- conky_wired_tab_cpu_proc
Second question is what is the easiest way to shuffle the order of the segments?
Report
Moob
5 years ago
I only checked for the existance of a forward slash in a mountpoint name so it also caught /home as well.
On row 866 change the if statement in "if string.len(v) == 1 and r == 1 then" should fix that.
I will add this fix in the next release.
[what is the easiest way to shuffle the order of the segments?]
At the top of the code you find several "if show_memory == "yes" then [[code]] end" blocks to determine if a tab must be shown or not.
To rearrange the order of the tabs just cut and past a "if show_* then [[code]] end" block and place it below or above an other if/end block.
If you want to put a tab above the 'Processor' tab change the starty variable in the conky_wired_tab_cpu call to "rety+tabvsep"
I will add this change in the next release
I will add the "own_window_argb_visual = true" configuration option in the next release
Thanks for your feedback.
Report
autocrosser1
5 years ago
I also did a string search & that one is not showing up.
Clarify please.
Report
autocrosser1
5 years ago
Report
autocrosser1
5 years ago
Report
autocrosser1
5 years ago
Thanks for trying!!!!
Report
autocrosser1
5 years ago
dean@linux:~$ '/home/dean/.conky/conky-startup.sh'
conky: invalid option -- '1'
dean@linux:~$ '/home/dean/.conky/conky-startup.sh'
conky: no process found
conky: desktop window (a00033) is subwindow of root window (293)
conky: window type - desktop
conky: drawing to created window (0x1000001)
conky: drawing to double buffer
conky: obj->data.i 6 info.cpu_count 0
conky: attempting to use more CPUs than you have!
Report
Moob
5 years ago
I had the same error about 'conky: attempting to use more CPUs than you have!' and thought I had it fixed. It does seem to work on my Ubuntu 15.10 though. You could try to set the squash_cpu option.
Otherwise it's time to go back to version 1.9.0
Report
autocrosser1
5 years ago
Mod for 1.10 (anointed for editing):
conky.config = {
-- ------------------------- Windows Settings
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
own_window_argb_visual = true,
own_window_argb_value = 0,
double_buffer = true,
background = false,
-- ------------------------- Font
use_xft = true,
xftalpha = 0.1,
override_utf8_locale = true,
font = 'DejaVu Sans Mono:size=12',
uppercase = false,
draw_borders = false,
draw_outline = false,
draw_shades = false,
border_width = 0,
stippled_borders = 0,
-- ------------------------- Color
default_color = 'white',
-- ------------------------- Other
update_interval = 1,
cpu_avg_samples = 2,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
show_graph_scale = false,
show_graph_range = false,
draw_graph_borders = false,
-- ------------------------- Position
alignment = 'top_right',
minimum_width = 200,
minimum_height = 750,
maximum_width = 200,
gap_x = 5,
gap_y = 30,
-- ------------------------- Lua scripts
lua_load = '~/.conky/basic.lua',
lua_draw_hook_pre = 'main',
};
conky.text = [[
]]
Report
Moob
5 years ago
Report
autocrosser1
5 years ago
conky.config = {
alignment = top_right,
background = no,
double_buffer = yes,
border_width = 0,
cpu_avg_samples = 2,
default_color = white,
draw_borders = no,
draw_graph_borders = no,
draw_outline = no,
draw_shades = no,
use_xft = yes,
font = 'DejaVu Sans Mono:size=12',
gap_x = 5,
gap_y = 30,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
no_buffers = yes,
out_to_console = no,
out_to_stderr = no,
extra_newline = no,
own_window = yes,
own_window_class = Conky,
own_window_type = desktop,
own_window_transparent = yes,
stippled_borders = 0,
update_interval = 1.0,
uppercase = no,
use_spacer = no,
show_graph_scale = no,
show_graph_range = no,
maximum_width = 200,
--lua_load ~/.lua/basic/basic.lua,
--lua_draw_hook_pre main,
}
conky.text = [[
]]
The errors I get are:
dean@linux:~$ '/home/dean/.conky/conky-startup.sh'
conky: no process found
conky: desktop window (a00033) is subwindow of root window (293)
conky: drawing to desktop window
conky: can't load font 'DejaVu Sans Mono:size=12'
conky: can't load font 'DejaVu Sans Mono:size=12'
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 55 (X_CreateGC)
Serial number of failed request: 196
Current serial number in output stream: 198
Report
autocrosser1
5 years ago
Looks promising.
Report
autocrosser1
5 years ago
REAL problem is now:
$ '/home/dean/.conky/conky-startup.sh'
conky: Syntax error (/home/dean/.conky/conkyrc_basic:1: '=' expected near 'top_right') while reading config file.
conky: Assuming it's in old syntax and attempting conversion.
conky: desktop window (a00037) is subwindow of root window (293)
conky: window type - desktop
conky: drawing to created window (0xe00001)
conky: drawing to double buffer
conky: unknown variable '$pre_exec'
conky: unknown variable '$pre_exec'
conky: llua_do_call: function conky_main execution failed: /home/dean/.conky/basic.lua:670: 'for' limit must be a number
conky: unknown variable '$pre_exec'
conky: unknown variable '$pre_exec'
conky: llua_do_call: function conky_main execution failed: /home/dean/.conky/basic.lua:670: 'for' limit must be a number
This repeats until conky is killed.
Report
autocrosser1
5 years ago
conky: llua_do_call: function conky_main execution failed: /home/dean/.conky/basic.lua:670: 'for' limit must be a number
Is referring to for i=1,tonumber(hardware.cpucores) do
cpucores[i]=i
is not converting to a number-staying as text?
Report
Moob
5 years ago
I will look in to it to see what needs to be changed.
In the mean time this script will only function correctly with conky version 1.9
Report
autocrosser1
5 years ago
Report
Moob
5 years ago
The $pre_exec, for 'limit must be a number' errors I solved but now it keeps giving me errors on cpu. For some reason ${cpu cpu0} works wel but ${cpu cpu1} keeps on exiting conky
Still busy testing on conky 1.10.0
Report
autocrosser1
5 years ago
Report
Moob
5 years ago
hardware.cpucores =tonumber(conky_parse("${pre_exec cat /proc/cpuinfo | grep 'processor' | wc -l}"))
for i=1,hardware.cpucores do
cpucores[i]=i
end
Do you still get the 'as a number' error message than ?
Report
Moob
5 years ago
I will see if I can test my script with conky 1.10 as it complains about the top_right parameter in the conkyrc file. My guess is that it has something to do with a difference between conky versions.
Report