How to display a conky configuration variable

New to Debian (Or Linux in general)? Ask your questions here!

How to display a conky configuration variable

Postby jaja » 2018-12-07 17:29

Hello and thanks for the help.
I've got conky running, showing various parameters, except for one type.
I'm unable to display a conky configuration variable; example: "update_interval".
I've set this configuration variable with:
Code: Select all
update_interval        = 1.0,         --Update every 1.0 second

I've attempted to display this configuration variable with:
Code: Select all
${update_interval}
$update_interval

The display should show: "1".
Unfortunately, the display just shows these strings, not their values.
Display shows:
Code: Select all
${update_interval}
$update_interval

I've searched the online documentation, but failed to find an answer.
What am I doing wrong?
I would appreciate any help in fixing my mistake.
Thank you.
jaja
 
Posts: 29
Joined: 2016-01-25 00:20

Re: How to display a conky configuration variable

Postby Head_on_a_Stick » 2018-12-08 11:15

Please post the full .conkyrc, and perhaps also a link to a screenshot of the conky to show the problem.
"French riots get results! U lot are instagram zzzombies" — graffiti over Euston underpass
User avatar
Head_on_a_Stick
 
Posts: 8587
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to display a conky configuration variable

Postby dilberts_left_nut » 2018-12-08 11:33

update_interval is a configuration parameter, not a variable.
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4924
Joined: 2009-10-05 07:54
Location: enzed

Re: How to display a conky configuration variable

Postby jaja » 2018-12-08 21:49

Hello Head_on_a_Stick & dilberts_left_nut.

Here is the ".conkyrc" file:
Code: Select all
conky.config = {
-- Conky Settings
background             = false,       --Fork conky to background? no
out_to_console         = false,       --Print text to stdout? no
out_to_stderr          = false,       --Print text to stderr? no
double_buffer          = true,        --Flicker-free? yes
update_interval        = 1.0,         --Update every 1.0 second(s)

-- Windows Settings
own_window             = true,        --Create own window to draw? yes
own_window_class       = 'Conky',     --Manually set the WM_CLASS name.  Defaults to "Conky".
own_window_type        = 'normal',
own_window_transparent = true,        --If ARGB visual is enabled, sets background opacity to 0%
own_window_hints       = 'undecorated,sticky,skip_taskbar,skip_pager,below',
own_window_argb_visual = true,        --Boolean, use ARGB visual? yes
own_window_argb_value  = 128,         --Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.

---- Graphics Settings
alignment              = 'top_right',

-- Text Settings (uniformly spaced font where the columns of text align)
use_xft                = true,                        --Use Xft (anti-aliased font)
font                   = 'DejaVu Sans Mono: size=12', --Xft font, uniformly spaced, align text columns
};

conky.text = [[
# BEGIN PRINTING TO SCREEN
Kernel:      $kernel
CPU Arch.:   $machine

Show update_interval (FAILS)
${update_interval}
$update_interval
update_interval
]];


Unfortunately, I don't know how to post an image. So, using text, here is what the output looks like:
Code: Select all
    Kernel:     4.18.0-2-amd64
    CPU Arch.:  x86_64

    Show update_interval (FAILS)
    ${update_interval}
    ${update_interval}
    update_interval

(The 2nd to the last line above has an extra set of brackets {} which are added by conky. I missed them in my original post.)

Thank you for the help.
jaja
 
Posts: 29
Joined: 2016-01-25 00:20

Re: How to display a conky configuration variable

Postby TonyT » 2018-12-09 13:38

update interval is not a thing that gets displayed, it is a setting for how often conky refreshes the specified items to be displayed.
TonyT
 
Posts: 558
Joined: 2006-09-04 11:57

Re: How to display a conky configuration variable

Postby jaja » 2018-12-09 18:07

Hello dilberts_left_nut & TonyT.
How does one display a configuration parameter/setting?
Thanks for the help.
jaja
 
Posts: 29
Joined: 2016-01-25 00:20

Re: How to display a conky configuration variable

Postby TonyT » 2018-12-10 20:55

jaja wrote:Hello dilberts_left_nut & TonyT.
How does one display a configuration parameter/setting?
Thanks for the help.

You don't display parameters or settings, you display the value of a variable. Read the conky manuals to learn how to use it. Don't worry about changing the parameters. You can open a terminal to start conky by using the command: conky. You can close it out by using the command: killall conky. Back and forth as you test different settings.

pa·ram·e·ter
a numerical or other measurable factor forming one of a set that defines a system or sets the conditions of its operation.

var·i·a·ble
a symbolic name associated with a value and whose associated value may be changed.

My conky:

Code: Select all
conky.config = {
    alignment = 'top_right',
    background = true,
    border_width = 0,
   default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
   double_buffer = true,
    use_xft = true,
    font = 'trebuc:size=9',
    gap_x = 12,
    gap_y = 50,
   minimum_width = 250,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
   own_window_transparent = true,
    own_window_class = 'Conky',
    own_window_type = 'dock',
   own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
}

conky.text = [[
${time %A}$alignr${time %EY-%m-%d}
$sysname$alignr$kernel
Uptime:$alignr$uptime

Hostname:$alignr$nodename
LAN IP:$alignr${addr wls1}
WAN IP:$alignr${execi 7200 wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}
SSID:$alignr${wireless_essid wls1}
Quality: ${wireless_link_qual_perc wls1} ${color lightgray}${wireless_link_bar wls1}$color

GPU Temp:$alignr${execi 300 sensors radeon-pci-0100 | grep temp1 | cut -c16-21}
MB Temp:$alignr${execi 300 sensors acpitz-virtual-0 | grep temp1 | cut -c16-21}
CPU Core 0 Temp:$alignr${execi 300 sensors | grep 'Core 0' | cut -c16-21}
CPU Core 2 Temp:$alignr${execi 300 sensors | grep 'Core 2' | cut -c16-21}

CPU0 ${cpu cpu1}% ${color lightgray}${cpubar cpu1}$color
CPU1 ${cpu cpu2}% ${color lightgray}${cpubar cpu2}$color
CPU2 ${cpu cpu3}% ${color lightgray}${cpubar cpu3}$color
CPU3 ${cpu cpu4}% ${color lightgray}${cpubar cpu4}$color
RAM (used/total): $alignr$mem/$memmax

sda1: ${fs_used_perc /media/Win7}% ${color lightgray}${fs_bar /media/Win7}$color
sda2: ${fs_used_perc /media/Files}% ${color lightgray}${fs_bar /media/Files}$color
sda3: ${fs_used_perc /}% ${color lightgray}${fs_bar /}$color
]]


Image
TonyT
 
Posts: 558
Joined: 2006-09-04 11:57

Re: How to display a conky configuration variable

Postby Bulkley » 2018-12-10 23:22

jaja, users tend to love posting their .conkyrc so they are all over the Internet. When I have a problem with Conky I search to see how others have handled. Over several years I have copied dozens of .conkyrc and tried them on my machine. When I find one I like I edit to my needs. It's a good way to learn.
Bulkley
 
Posts: 5703
Joined: 2006-02-11 18:35


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable