Simple one line conky


#1

This is the simple one liner conky I’ve been using for ages. Basic system information; this is running on my laptop so it has the core temps which need monitoring (curse you HP!) and the battery. The output is colored so it will get your attention when something critical happens.

conkyrc:

conky.config = {
--#############################################
-- Settings
--#############################################
	background = true,
	use_xft = true,
	font = 'Fantasque Sans Mono:Regular:size=11',
--	font = 'Ubuntu:Medium:size=10',
--	font = 'Inconsolata LGC:regular:size=10',
	xftalpha = 1.0,
	update_interval = 3.0,
	update_interval_on_battery = 30.0,
	total_run_times = 0,

	own_window = true,
	own_window_colour = '#070707',
	own_window_transparent = false,
--  set to panel for xfce4, dock for fluxbox/openbox
--  own_window_type = 'panel'	
    own_window_type = 'desktop',
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	own_window_class = 'ConkyXfc4',
	own_window_title = 'ConkyXfce4',

	own_window_argb_visual = true,
	own_window_argb_value = 160,

	no_buffers = true,
	uppercase = true,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
	short_units = true,
	imlib_cache_size = 0,
	pad_percents = 1,
	-- max_specials = '2048',
	max_user_text = 3200,
	text_buffer_size = 1024,
	no_buffers = true,
	if_up_strictness = 'address',
	double_buffer = true,
	minimum_width = 1366, minimum_height = 0,
	maximum_width = 1366,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	border_inner_margin = 1,
	border_outer_margin = 1,

	default_color = '#DAC79C',
	default_shade_color = '#000000',
	default_outline_color = '#828282',
	color0 = '#FFFFFF',
	color1 = '#000000',
	color2 = '#FF0000',-- - red
	color3 = '#FFFF00',-- - yellow
	color4 = '#0000FF',-- - blue
	color5 = '#00FF00',-- - green
	color6 = '#FFA500',-- - orange
	color7 = '#00CDCD',-- - cyan3
	color8 = '#FFD700',-- - gold
	color9 = '#F00F16',-- - reddish

	alignment = 'top_middle',
	gap_x = 0,
	gap_y = 0,

--  semi-transparent background
--  doesn't seem to work when docked in the slit or as panel --#
--	lua_load = '~/conky/transbg.lua',
--	lua_draw_hook_pre = 'draw_bg 4 0 0 0 0 0x070707 0.58',

-- Mem:${offset 8}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}${memperc}%${color}${offset 32}\

};

conky.text = [[
${goto 12}Uptime:${offset 8}${uptime_short} \
${goto 264}Core0:${offset 8}${if_match ${hwmon 0 temp 2}<=50}${color7}${else}${if_match ${hwmon 0 temp 2}<=70}${color8}${else}${if_match ${hwmon 0 temp 2}>70}${color9}${endif}${endif}${endif}${hwmon 0 temp 2}${offset 2}°C${color}${offset 16} \
Core1:${offset 8}${if_match ${hwmon 0 temp 4}<=50}${color7}${else}${if_match ${hwmon 0 temp 4}<=70}${color8}${else}${if_match ${hwmon 0 temp 4}>70}${color9}${endif}${endif}${endif}${hwmon 0 temp 4}${offset 2}°C${color}${offset 16} \
CPU:${offset 8}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}${offset 16}${loadavg 1}${offset 8}${loadavg 2}${offset 8}${loadavg 3}${offset 16} \
Batt:${offset 8}${execpi 60 acpi -b | awk '/Battery 0/ {print $3}' | cut -c1-4}${offset 8}${if_match ${battery_percent BAT0}<=15}${color9}${blink ${battery_percent BAT0}%}${color}${else}${if_match ${battery_percent BAT0}<=33}${color8}${battery_percent BAT0}%${else}${if_match ${battery_percent BAT0}>33}${color7}${battery_percent BAT0}%${endif}${endif}${endif}${color}${offset 16} \
Net:${if_up wlo1}${offset 8}${wireless_bitrate wlo1}${endif}${offset 16}${if_match ${wireless_link_qual_perc wlo1}<=30}${color9}${blink ${wireless_link_qual_perc wlo1}%}${color}${else}${if_match ${wireless_link_qual_perc wlo1}<=50}${color8}${wireless_link_qual_perc wlo1}%${else}${if_match ${wireless_link_qual_perc wlo1}>50}${color7}${wireless_link_qual_perc wlo1}%${endif}${endif}${endif}${color}${offset 16}${if_up wlo1}U:${offset 8}${upspeedf wlo1}${offset 24}D:${offset 8}${downspeedf wlo1}${endif}${color}\
${alignr 12}${time %a %e %b}
]];

#2

There is nothing quite like a one line conky.