this post was submitted on 11 Sep 2026
74 points (100.0% liked)

Linux

67514 readers
380 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
74
submitted 10 hours ago* (last edited 3 hours ago) by A_norny_mousse@piefed.zip to c/linux@lemmy.ml
 

I switched from 10 years of Openbox to KDE Plasma. This also means from Xorg to wayland.

Plasma is great, it has almost everything. One thing I'm missing (until I'm able to write my own plasmoids/widgets) is what conky provides: a constantly updating overview of my top processes, what's eating resources.

If you ever tried to hack your own conky you must know how fragile it can be. Plus, it's even more fragile on wayland. Most people run it in Xwayland, many unwittingly, but that didn't work for me either.
Let's not dwell on these things (more than a decade of faffing around with conky. It usually runs stable once it's set up, but getting there is beyond painful).

Every time I thought I had it running stably without freezing or disappearing, something new happened... aaaarrrgghh

Until I decided fuck it, I'll run it in the terminal. Much more stable. And with Konsole* & Kwin I can make it look really good.

* I tried it with Alacritty first, but it flickers!


The workflow, if you are interested:

  • First the conky config itself
#!/usr/bin/lua  
conky.config = {  
	background = false,  

	out_to_x = false,  
	out_to_console = true,  
	out_to_ncurses = true,  
	out_to_stderr = false,  
	out_to_wayland = false,  

	console_bar_unfill = '-',  
	console_bar_fill = '@',  
	text_buffer_size = 1024;  
	use_spacer = 'left',  

	-------------------  
	update_interval = 3,  
	--------------------  

	total_run_times = 0,  

	cpu_avg_samples = 2,  
	diskio_avg_samples = 2,  
	net_avg_samples = 2,  
	no_buffers = true,  

-- 	max_text_width = 30, -- does nothing in console/ncurses  
	pad_percents = 3,  
	short_units = true,  
	format_human_readable = true,  
	if_up_strictness = address,  
	top_name_width = 22,  
	top_name_verbose=true,  
	override_utf8_locale = true,  
	default_color = 'blue',  
	color1 = 'green',  
	color2 = 'yellow',  
	color3 = 'red',  
};  

conky.text = [[  
${color1}Up:$color $uptime_short $color1 Kernel: $color$kernel  
$color2---------------------------------------------\  
${color1}RAM$color $mem/$memmax $memperc% ${membar 1,24}\  
${color1}SWP$color $swap/$swapmax $swapperc% ${swapbar 1,24}\  
${color1}CPU 1:$color ${freq_g 1}GHz  ${cpu cpu1}% $color${cpubar cpu1 1,24}\  
${color1}    2:$color ${freq_g 2}GHz  ${cpu cpu2}% ${cpubar cpu2 1,24}\  
${color1}    3:$color ${freq_g 3}GHz  ${cpu cpu3}% ${cpubar cpu3 1,24}\  
${color1}    4:$color ${freq_g 4}GHz  ${cpu cpu4}% ${cpubar cpu4 1,24}\  
$color2---------------------------------------------\  
${color1}Load    1min: $color3${loadavg 1}$color1   5min:$color3 ${loadavg 2}$color1\  
   15min: $color3${loadavg 3}\  
$color2---------------------------------------------\  
${color1}FS root: $color${fs_used /}/${fs_size /} ${fs_bar 1,24 /}\  
${color1}FS data: $color${fs_used /home/ssd256_data}/${fs_size /home/ssd256_data}\  
 ${fs_bar 1,24 /home/ssd256_data}\  
$color2---------------------------------------------\  
${if_match "${execi 6 ~/.config/conky/sys/server_ping.sh}" == "0" }${if_up enp0s20u2}\  
${color1}USB ethernet      up:$color3${upspeedf enp0s20u2}K${color1}   \  
dn:$color3${downspeedf enp0s20u2}K\  
$color2---------------------------------------------\  
$else${if_up wlan0}  
${color1}WLAN       up:$color3${upspeed wlan0}K${color1}   \  
dn:$color3${downspeed wlan0}K  
$color2---------------------------------------------$endif$endif$endif\  
${color1}Name                        PID   CPU%   MEM%\  
${color}${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}\  
${color}${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}\  
${color}${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}\  
${color}${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}\  
${color}${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}\  
${color}${top name 6} ${top pid 6} ${top cpu 6} ${top mem 6}\  
${color}${top name 7} ${top pid 7} ${top cpu 7} ${top mem 7}\  
$color2---------------------------------------------\  
${if_match "$mpd_status" == "Playing"}$color1${uppercase ${if_empty \  
$mpd_artist}$mpd_title$else$mpd_artist - $mpd_title$endif}$endif]]  
  • This is started with a small shell script (that needs to be registered via a desktop file in ~/.config/autostart):
#!/bin/sh  

sleep 3  
exec konsole --profile conky-tui --separate --qwindowtitle conky_tui_konsole\  
 -e /bin/rbash -c 'tput civis; conky -c ~/.config/conky/conky-tui.conf'  
  • I also created a konsole profile that must have the exact dimensions for this conky, i.e. 45 columns and 27 rows. The color scheme likely needs to be edited so that Background color is exactly the same as Color 1, because of transparency. You'll understand when you see it.

So far this gives us this:

conky-tui with borders

  • Now I right-click on the titlebar -> more actions -> special window settings. The window must be uniquely recognizable through its title 'conky_tui_konsole'. I remove borders, make it appear on all desktops, stay below, and put it in the position where I want it. It takes a while to understand the UI. In the end I get this extra entry in ~/.config/kwinrc (I love KDE! The combo of having a gui menu for everything, yet still simple editable config files is just 😙👌):
[uuid-uuid-uuid-uuid]  
Description=Window settings for conky_tui_konsole  
below=true  
belowrule=3  
desktops=\\0  
desktopsrule=3  
noborder=true  
noborderrule=3  
position=1200,24  
positionrule=3  
skippager=true  
skippagerrule=3  
skipswitcher=true  
skipswitcherrule=3  
skiptaskbar=true  
skiptaskbarrule=3  
title=conky_tui_konsole — Konsole  
titlematch=1  
types=1  
wmclass=konsole org.kde.konsole  
wmclasscomplete=true  

Voilá. I'm a happy hacker now.


PS: Now that the basics are covered I will of course try to make it even nicer with some Nerd fonts etc. That's the fun about conky - always something to improve. Now without kill -9!

you are viewing a single comment's thread
view the rest of the comments
[–] bluesquid0741b@aussie.zone 6 points 7 hours ago

Mine too. Cutting your teeth with fluxbox was such a way to go.