Conky: How to automatically show Distro, KDE, user info

Hi!
Here go two lines from my conky.

${goto 80}${color green}${execi 86400 lsb_release -irs} | KDE 6.1.5${color}
${goto 80}User:${alignr} user@eos

The code automatically returns the distro name as follows:

EndeavourOS rolling

But I have to MANUALLY insert KDE version and user name.
HOW TO automatically show KDE (any desktop) name and version, and user info in conky?
I did not find any info in the Internet.
Maybe somebody will help me?

plasmashell --version

???
At work so not in front of my computer

THANKS!
This command returns:
plasmashell 6.1.5
Too long a text. Iā€™d like to get KDE 6.1.5
Is it possible to print ā€œKDEā€ instead of ā€œplasmashellā€?

Just update your system.
See here

Iā€™ve already updated, I need to automate my conky, to show KDE version automatically. The word plasmashell is too long. Is it possible to get the word KDE 6.1.5?

Sorry, i have missunderstood you. In that case i am not able to help, sorry again :frowning:

So, after some experiments, I used the following code:
${goto 80}User:${alignr}${exec echo $USER@$HOSTNAME}
It returns username@hostname
myname@eos
QUESTIONS:

  1. Do more elegant ways to display the same exist?
  2. Is it possible to show any EOS ā€œPretty Nameā€ lilke Cassini, Endeavour, etc.
    For example ā€œEndeavourOS Cassiniā€?
  3. Is it possible to print KDE instead of plasmashell as ā€˜plasmashell --versionā€™ output?

This is what I use to show the OS
${execi 6000 lsb_release -d | grep ā€˜Descrā€™|awk {ā€˜print $2 " " $3" " $4" " $5ā€™}}

it looks like this

The only information available in the lsb-release is as follows

DISTRIB_ID="EndeavourOS"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="EndeavourOS Linux"
DISTRIB_CODENAME="rolling"

havenā€™t tried it but maybe and if statement
if version = plasmashell then plasmashell =ā€œkdeā€
no idea if the above will work as I dontā€™ use KDE

if version = plasmashell then plasmashell =ā€œkdeā€
Maybe itā€™s good, but I have no idea how to insert it in
{execi 86400 plasmashell -v }

maybe start here and figure out which if statement would be best for you
https://conky.sourceforge.net/variables.html

again I never have tried it so good luck

OK, hereā€™s how I do this on my Arch-based KDE systems:

KDE: ${execpi 3600 pacman -Q plasma-workspace | cut -d' ' -f2}
KDE 6.1.5-1
Hostname: ${nodename}
Hostname: arch-kde-lst
System: ${execpi 3600 lsb_release -ds | tr -d \"}
System: EndeavourOS Linux

I switched away from using plasmashell --version as sometimes it prints extraneous information that Iā€™d rather not have to account for.

2 Likes

THANK YOU so much!
I corrected my conky.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.