Work desktop .conkyrc

  • Posted on: 25 May 2018
  • By: charm
Conky

I recently changed up my desktop system at work for an almost "stock" Gateway DX4860-EF11P (I changed the graphics card). The system I had prior was overkill for what I use my desktop for and was better suited as a server (it had 32GB of RAM). The Gateway is powered by a Core i5 processor and is powerful in its own right. The exact specs are:

Processor: Intel Core i5-2320 @ 3.30GHz (4 Cores)
Motherboard: Gateway IPISB-VR v1.01
Memory: 8192MB
Disk: 500GB Western Digital WD5000AAKX-7 + 250GB Portable
Graphics: NVIDIA Quadro K2000 2048MB (954/2000MHz)

I backed up the mozilla directory and sent a few other files from my old system over to a SAMBA server. On the new Gateway I installed Xubuntu 18.04. I wanted to do something a bit different from what we use as a desktop at The Working Centre's Computer Recycling Project. On the Linux systems we sell we have a slightly modded version of Xubuntu 16.04. The modifications are for ease-of-use and support (we have a script called gethelp that people can use to get help from us). There's no beautification or aesthetics beyond what the Xubuntu.org project does themselves.

Conky has always been one of my favourite information programs, there's something about conky that just looks cool. That said the default .conkyrc doesn't really look great on our systems and is in a spot on the screen that we normally reserve for icons. I searched around and found a neat conky configuration on Deviant Art by wim6 called conky-info-V5. It's a great config file, but it's aimed more at laptops. I modified the file for my desktop and added a couple more cores to the display:

--[[
#################################################
# conky-sys-info V5.1				#
# by +WillemO					#
# 26-june-16					#
#						#
# modified by chaslinux@gmail.com 25-05-2018    #
# for 4 core desktop                            #
#################################################

# save as ~/.config/conky/conky.conf	then you can just type conky in terminal to start

 # Warning! do not show external ip address in screenshots you post, disable or obscure in your screenshot #

]]
conky.config = {

	background = true,
	double_buffer = true,
	no_buffers = true,
	text_buffer_size = 2048,
	update_interval = 1,
	cpu_avg_samples = 2,
	net_avg_samples = 2,

	alignment = 'top_right',
	gap_x = 21,
	gap_y = 45,

	minimum_width = 280, minimum_height = 500,
	maximum_width = 280,

	border_inner_margin = 9,
	border_outer_margin = 1,
	draw_borders = false,
	stippled_borders = 0,

	override_utf8_locale = true,
	use_xft = true,
	font = 'ubuntu:size=11:oblique',
	xftalpha = 1,
	uppercase = false,
	extra_newline = false,
	short_units = true,
	top_name_width = 21,
	top_name_verbose = false,

	draw_shades = false,
	default_shade_color = '#000000',
	draw_outline = false,
	default_outline_color = '#000000',

	draw_graph_borders = true,
	default_graph_width = 280, default_graph_height = 40,
	default_bar_width = 280, default_bar_height = 10,

	own_window = true,
	own_window_type = 'normal',-- # options are: normal/override/dock/desktop/panel
	own_window_class = 'Conky',
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	own_window_argb_value = 210,
	own_window_transparent = false,
	own_window_argb_visual = false,
	own_window_colour = '#34495E',

	default_color = '#00ffff', -- # effects border only
	color1 = 'cyan',
	color2 = '#FCA053', -- # bars
	color3 = 'green',
	color4 = 'green',
	color5 = '#fce94f',
	color6 = '#eeeeec', -- # graph borders
	color7 = '#ffffff',

};

conky.text = [[
${color1}User: ${voffset 0}${color7}$user_names${font}
${voffset 5}${color1}OS: ${color7}$distribution $sysname $kernel
#${voffset 5}${color1}OS: ${color7}${execi 10000 lsb_release -d | cut -f 2| tr "[:upper:]" "[:upper:]"} $kernel
${voffset 0}${color1}Boot time:${color7} ${execi 10000 who -b |awk '{print $3}'}${color1} on ${color7}${execi 10000 who -b |awk '{print $2}'}
${voffset 0}${color1}Uptime:${color7} $uptime
#

${voffset 5}${color5}CPU  Frequency: ${freq_g} GHz  ${stippled_hr 3 3}
${voffset 5}${color1}CPU1  ${color7}${cpu cpu1}%  ${color3}${execi 5 sensors|grep 'Core 0'|awk '{print $3}'}${goto 150}${color1}CPU2  ${color7}${cpu cpu2}%  ${color3}${execi 5 sensors|grep 'Core 2'|awk '{print $3}'}
${voffset 4}${color1}CPU3  ${color7}${cpu cpu3}%  ${color3}${execi 5 sensors|grep 'Core 2'|awk '{print $3}'}${goto 150}${color1}CPU4  ${color7}${cpu cpu4}%  ${color3}${execi 5 sensors|grep 'Core 3'|awk '{print $3}'}

${voffset 5}${color1}RAM usage: ${color7}$mem${color1}${alignr}Free: ${color7}$memeasyfree
${color2}${membar}
#

${voffset 5}${color5}Disk  ${stippled_hr 3 3}
${voffset 5}${color1}ROOT: ${color7}${fs_used /}${color1}${alignr}Free: ${color7}${fs_free /}
${color2}${fs_bar /}
${voffset 5}${color1}HOME: ${color7}${fs_used /home}${color1}${alignr}Free: ${color7}${fs_free /home}
${color2}${fs_bar /home}
${color1}HDD Temp: ${color7}$hddtemp°C
#
# disk graphs
${color6}${diskiograph_read sda 35,135 34495E ffffff} ${alignr}${diskiograph_write sda 35,135 34495E ffffff}
${voffset -5}${color1}Reads: ${color7}${diskio_read sda} ${goto 158}${color1}Writes: ${color7}${diskio_write sda}

#
${color5}Network ${stippled_hr 3 3}
${color1}IP address: ${color7}${addr enp3s0}
#
# Warning! do not show external ip address in screenshots you post, disable or obscure in your screenshot
${color1}External IP: ${color7}${execi 3600 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}
#
# ${color1}Wireless signal: ${color7}${wireless_link_qual_perc wlp3s0}%
# ${color1}Connections: ${color7}${tcp_portmon 1 65535 count}
# ${color1}Download speed: ${color7}${downspeed wlp3s0}
#
# netw graphs
${voffset 5}${color6}${downspeedgraph enp3s0 35,135 34495E ffffff 17000 -l} $alignr${upspeedgraph enp3s0 35,135 34495E ffffff 3000 -l}
#
${voffset -5}${color1}Received: ${alignr 5}Sent:
${color1}Session:${color7}${goto 75}${totaldown wlp3s0} ${alignr 5}${totalup wlp3s0}
${color1}Today:${color7}${goto 75}${execi 60 vnstat -i wlp3s0 | grep "today" | awk '{print $2 $3}'}${alignr 5}${execi 60 vnstat -i wlp3s0 | grep "today" | awk '{print $5 $6}'}
${color1}Week:${color7}${goto 75}${execi 60 vnstat -i wlp3s0 -w | grep "current week" | awk '{print $3 $4}'}${alignr 5}${execi 60 vnstat -i wlp3s0 -w | grep "current week" | awk '{print $6 $7}'}
${color1}Month:${color7}${goto 75}${execi 60 vnstat -i wlp3s0 -m | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}${alignr 5}${execi 60 vnstat -i wlp3s0 -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}
#
# Processes
${voffset 5}${color5}Processes  ${stippled_hr 3 3}
${color1}Name${goto 180}CPU%${alignr}MEM%
${color4}${top name 1} ${goto 180}${top cpu 1}${alignr}${top mem 1}${color7}
${top name 2} ${goto 180}${top cpu 2}${alignr}${top mem 2}
${top name 3} ${goto 180}${top cpu 3}${alignr}${top mem 3}
${top name 4} ${goto 180}${top cpu 4}${alignr}${top mem 4}
${top name 5} ${goto 180}${top cpu 5}${alignr}${top mem 5}
${voffset 5}${color5}Memory  ${stippled_hr 3 3}
${color1}Name${goto 180}MEM%${alignr}MEM
${color4}${top_mem name 1} ${goto 180}${top mem 1}${alignr}${top mem_res 1}${color7}
${top_mem name 2} ${goto 180}${top mem 2}${alignr}${top mem_res 2}
${top_mem name 3} ${goto 180}${top mem 3}${alignr}${top mem_res 3}
${top_mem name 4} ${goto 180}${top mem 4}${alignr}${top mem_res 4}
${top_mem name 5} ${goto 180}${top mem 5}${alignr}${top mem_res 5}
${voffset -15}
]]

It's worth mentioning that the network device name will be different depending on the make of network card inside your system. In the example above I used enp3s0, but on my home system I needed to change the network interface to enp1s0. To find out what the interface is (on Ubuntu 16.04 or less) type:

/sbin/ifconfig

On Ubuntu 18.04 (but not Xubuntu which still uses the ifconfig) type:

ip addr

Ubuntu 18.04 has changed up some of the tools.

Tags: