Forum › Forums › General › Tips and Tricks › Conky- good to a free home…
- This topic has 20 replies, 6 voices, and was last updated Jun 2-12:33 pm by Anonymous.
-
AuthorPosts
-
June 1, 2019 at 7:34 pm #22391Moderator
BobC
::Thanks, yes, I had looked at those. I was trying to get the /dev device names and labels on the flash drive and partitions.
I wasn’t able to figure out other than by hard coding, how to include only the non-hard disk drives and partitions, so I hard coded it.
June 2, 2019 at 7:00 am #22408Member
manyroads
::Conky requires you get specific device names for many things including networking, hdd, sdx, batx, etc.
Pax vobiscum,
Mark Rabideau - http://many-roads.com
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
dwm & i3wm ~Reg. Linux User #449130
20 Jan 2021 ~ "End of an Error"June 2, 2019 at 9:51 am #22421Anonymous
::I don’t know why manyroads here publishes some links to conky objects and conky variables that he himself probably never read…
A few examples:
execi is an interval command
${font Roboto:pixelsize=13}${alignr} DESKTOP SESSION: ${color1}${execi 60000 env | grep '^DESKTOP_SESSION' | cut -d'=' -f2-}${color}
why does an interval command ask every 16.6666666667 hours the desktop session, all
${font Roboto:pixelsize=13}${alignr} DISTRIBUTION: ${color1}${execi 6000 cat /etc/antix-version}${color}
1.66666666667 hours the antiX/MX version as of ?
Isn’t it wiser to let exec do this (once) every 24 hours (24 hours is 86400 seconds)?
${exec 86400 cat /etc/antix-version}The font of the Conky is determined in this section:
## Font Settings ###################### #-- Use Xft (anti-aliased font and stuff) use_xft yes # Requires mono font for spacing reasons # xftfont Liberation Mono:bold:size=9 xftfont Roboto:size=10Below TEXT this font can be changed:
${font Roboto:pixelsize=13}
If this font does not change in the next line, it does not need to be listed again in the code, because Conky keeps it until the end.
${font} causes Conky to use the font specified above TEXT again. If I don’t want this, the changed font can be instructed immediately below TEXT, which it uses again until the end:
${font Roboto:pixelsize=16} (here the font size would be changed).The same is true for ${color} !
If the text of the Conky to be displayed does not fit into its window, it must be enlarged:
minimum_size 200 200
to
minimum_size 400 200
or the font is reduced so that the complete line fits into the Conky window:
${font Roboto:pixelsize=13}
to
${font Roboto:pixelsize=10}June 2, 2019 at 10:05 am #22428ModeratorBobC
::I did some testing with the exec vs execi yesterday and found that exec ran the script at each interval, which seemed silly for something that would likely change rarely, and likely cause a reboot, anyway. For that reason, I set ones that I just want to get 1 time to 60000.
June 2, 2019 at 10:35 am #22433Anonymous
::BobC, thanks for the heads-up regarding “exec”.
Tested using a line
${exec date}
…yep, it’s obviously being updated incrementally.pre_exec
Executes a shell command one time before conky displays anything, and displays the output as text${pre_exec date}
^—– This successfully accomplishes “run ONLY once”, per my testing today w/ conky v1.9.0June 2, 2019 at 12:33 pm #22440Anonymous
::you should add that the command
pre_exechas been removed from Conky version 1.10.
So if you use the above Conky code e.g. in mx18, you will get an error. Therefore better
${exec 86400 ... -
AuthorPosts
- You must be logged in to reply to this topic.