brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.23k stars 620 forks source link

[Bug]: Failed to show up Network Monitor (Conky v1.18.1) #1455

Closed visious25 closed 6 months ago

visious25 commented 1 year ago

What happened?

Hi, conky failed to show up network monitor, so I've downgrade the packege to conky v1.17.0. Here is the samle: https://pastebin.com/Y6RGZG2e

Version

1.18.1

Which OS/distro are you seeing the problem on?

Arch Linux

Conky config

--[[
#=====================================================================================
#                               arcolinux
# Date    : package-date
# Author  : Erik Dubois at http://www.erikdubois.be
# Version : package-version
# License : Distributed under the terms of GNU GPL version 2 or later
# Documentation : http://erikdubois.be/
#======================================================================================
# CONKY
# For commands in conky.config section:
# http://conky.sourceforge.net/config_settings.html
#
# For commands in conky.text section:
# http://conky.sourceforge.net/variables.html
#
# A PDF with all variables is provided
#=====================================================================================
# FONTS
# To avoid copyright infringements you will have to download
# and install the fonts yourself sometimes.
#=====================================================================================
# GENERAL INFO ABOUT FONTS
# Go and look for a nice font on sites like http://www.dafont.com/
# Download and unzip - double click the font to install it (font-manager must be installed)
# No font-manager then put fonts in ~/.fonts
# Change the font name in the conky
# The name can be known with a command in the terminal: fc-list | grep "part of name"
# Change width and height of the conky according to font
# Reboot your system or fc-cache -fv in terminal
# Enjoy
#=====================================================================================
# FONTS FOR THIS CONKY
# http://www.dafont.com/style-bats.font
#======================================================================================
# Titus Modifications
#======================================================================================
# Changed time from Roboto to GE Inspira which is a base Conky Gotham Addon
# Changed Drives from 2 to 3
# Modified one_window_type from desktop to normal for KDE compatibility
# Modified Ethernet settings
# Modified Pink Lines to Bright Blue
# Removed Extra symbols and incorrect formatting
#======================================================================================

]]

conky.config = {

    --Various settings

    background = true,                                                      -- forked to background
    cpu_avg_samples = 2,                                                    -- The number of samples to average for CPU monitoring.
    diskio_avg_samples = 10,                                                -- The number of samples to average for disk I/O monitoring.
    double_buffer = true,                                                   -- Use the Xdbe extension? (eliminates flicker)
    if_up_strictness = 'address',                                           -- how strict if testing interface is up - up, link or address
    net_avg_samples = 2,                                                    -- The number of samples to average for net data
    no_buffers = true,                                                      -- Subtract (file system) buffers from used memory?
    temperature_unit = 'celsius',                                           -- fahrenheit or celsius
    text_buffer_size = 2048,                                                -- size of buffer for display of content of large variables - default 256
    update_interval = 0.25,                                                 -- update interval
    imlib_cache_size = 0,                                                   -- disable image cache to get a new spotify cover per song

    --Placement

    alignment = 'middle_right',                                             -- top_left, top_middle, top_right, bottom_left, bottom_middle, bottom_right,
                                                                            -- middle_left, middle_middle, middle_right, none
    --Arch Duoscreen
    --gap_x = -1910,
    gap_x = 50,                                                             -- pixels between right or left border
    gap_y = 0,                                                              -- pixels between bottom or left border
    minimum_height = 600,                                                   -- minimum height of window
    minimum_width = 300,                                                    -- minimum width of window
    maximum_width = 300,                                                    -- maximum width of window

    --Graphical

    border_inner_margin = 10,                                               -- margin between border and text
    border_outer_margin = 5,                                                -- margin between border and edge of window
    border_width = 0,                                                       -- border width in pixels
    default_bar_width = 80,                                                 -- default is 0 - full width
    default_bar_height = 10,                                                -- default is 6
    default_gauge_height = 25,                                              -- default is 25
    default_gauge_width =40,                                                -- default is 40
    default_graph_height = 40,                                              -- default is 25
    default_graph_width = 0,                                                -- default is 0 - full width
    default_shade_color = '#000000',                                        -- default shading colour
    default_outline_color = '#000000',                                      -- default outline colour
    draw_borders = false,                                                   -- draw borders around text
    draw_graph_borders = true,                                              -- draw borders around graphs
    draw_shades = false,                                                    -- draw shades
    draw_outline = false,                                                   -- draw outline
    stippled_borders = 0,                                                   -- dashing the border

    --Textual

    extra_newline = false,                                                  -- extra newline at the end - for asesome's wiboxes
    format_human_readable = true,                                           -- KiB, MiB rather then number of bytes
    font = 'Roboto Mono:size=6',                                            -- font for complete conky unless in code defined
    max_text_width = 0,                                                     -- 0 will make sure line does not get broken if width too smal
    max_user_text = 16384,                                                  -- max text in conky default 16384
    override_utf8_locale = true,                                            -- force UTF8 requires xft
    short_units = true,                                                     -- shorten units from KiB to k
    top_name_width = 21,                                                    -- width for $top name value default 15
    top_name_verbose = false,                                               -- If true, top name shows the full command line of  each  process - Default value is false.
    uppercase = false,                                                      -- uppercase or not
    use_spacer = 'none',                                                    -- adds spaces around certain objects to align - default none
    use_xft = true,                                                         -- xft font - anti-aliased font
    xftalpha = 1,                                                           -- alpha of the xft font - between 0-1

    --Windows

    own_window = true,                                                      -- create your own window to draw
    own_window_argb_value = 0,                                              -- real transparency - composite manager required 0-255
    own_window_argb_visual = true,                                          -- use ARGB - composite manager required
    own_window_colour = '#000000',                                          -- set colour if own_window_transparent no
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',  -- if own_window true - just hints - own_window_type sets it
    own_window_transparent = false,                                         -- if own_window_argb_visual is true sets background opacity 0%
    own_window_title = 'system_conky',                                      -- set the name manually  - default conky "hostname"
    own_window_type = 'normal',                                             -- if own_window true options are: normal/override/dock/desktop/panel

    --Colours                                   --https://www.colorhexa.com/

    default_color = '#D9DDE2',                  --default color (light grayish blue) and border color
    color1 = '#00ff23',                         --green
    color2 = '#ffa300',                         --orange
    color3 = '#ff2300',                         --red
    color4 = '#2300ff',                         --blue
    color5 = '#00dcff',                         --cyan
    color6 = '#dcff00',                         --yellow
    color7 = '#800080',                         --purple (dark magenta)
    color8 = '#400080',                         --dark violet
    color9 = '#ffffff',                         --White
    --Lua

    --Conky - display different time zones

    --Pingelly: ${alignc}${font arial:size=12}${time %H:%M:%S}${font}
    --Paris:    ${alignc}${font arial:size=12}${tztime Europe/Paris %H:%M:%S}${font}
    --NY:       ${alignc}${font arial:size=12}${tztime America/New_York %H:%M:%S}${font}
    --LA:       ${alignc}${font arial:size=12}${tztime America/Los_Angeles %H:%M:%S}${font}

    -- Example

    --${color9}${voffset 4}${font GE Inspira:size=36}${alignc}${tztime Europe/Athens %k:%M:%S}${font}${color}
    --${color9}${voffset 4}${font GE Inspira:size=12}${alignc}${tztime Europe/Athens %A %B %e, %Y}${font}${color}

    --Current time zone

    --${color9}${voffset 4}${font GE Inspira:size=36}${alignc}${time %k}:${time %M}:${time %S}${font}${color}
    --${color9}${voffset 4}${font GE Inspira:size=12}${alignc}${time %A} ${time %B} ${time %e}, ${time %Y}${font}${color}
};

conky.text = [[

Stack trace

No response

Relevant log output

No response

SL-Pirate commented 1 year ago

background no
font Sans:size=8
#xftfont Sans:size=10
use_xft yes
xftalpha 0.9
update_interval 1
total_run_times 0
own_window yes
own_window_class conky-semi
own_window_class normal
own_window_type dock
own_window_transparent yes
own_window_hints below,skip_taskbar,sticky
double_buffer yes
minimum_size 1940 2055
maximum_width 180
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color 999
default_shade_color black
default_outline_color green
alignment top_right
gap_x 20
gap_y 70
no_buffers yes
cpu_avg_samples 2
override_utf8_locale yes
uppercase no # set to yes if you want all text to be in uppercase

own_window_argb_value 100
own_window_argb_visual yes
own_window_colour 000000
TEXT
#${color 999}SYSTEM ${hr 1}${color}
#
#${color 999}Hostname : $alignr$nodename${color}
${color #BFFF00}Kernel : $alignr$kernel${color}
#${color 999}BITS : $alignr$machine
${color #BFFF00}Uptime : $alignr$uptime${color}
#${color #BFFF00}Temperature: ${alignr} ${color #BFFF00} ${if_match ${exec sensors | grep -m 1 temp1 | awk '{print $2}' | cut -c 2-3}>=65}${exec sensors | grep -m 1 temp1 | awk '{print $2}'  cut -c 2-3}${else}${color #BFFF00}${exec sensors | grep -m 1 temp1 | awk '{print $2}' | cut -c 2-3}${endif} C°
${color #BFFF00}Temperature: ${alignr} ${color #BFFF00} ${exec sensors | grep Package | awk '{print $4}'}

#${color 999}Processore ${hr 1}${color}
#
${color #BFFF00}CPU Frequency : ${alignr}${freq} MHz
#${color 999}Processes :$processes   ${alignr}${color 999}($running_processes active)
#
${color #BFFF00}CPU utilization :  ${alignr}${cpu}%
${color #BFFF00}${cpubar 20,180 }
${color #BFFF00}${cpugraph  20,180 }
#
#${color 999}Memory${hr 1}${color}
#
${color #BFFF00}Ram :${alignr}$mem / $memmax ($memperc%)
${membar 20}
${color #BFFF00}swap :${alignr}$swap / $swapmax ($swapperc%)
${swapbar 20}
#
#${color 999}Processes ${hr 1}${color}

Process $alignr CPU% MEM%
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}
${top name 4}$alignr${top cpu 4}${top mem 4}
${top name 5}$alignr${top cpu 5}${top mem 5}

#${color 999}Filesystem ${hr 1}${color}
#
#Home ${fs_used /home}/${fs_size /home}
#${fs_bar 15,120 /home}
#Root ${fs_used /}/${fs_size /}
#${fs_bar 15,120 /}
#Local ${fs_used /usr/local}/${fs_size /usr/local}
#${fs_bar 15,120 /usr/local}
${color #BFFF00}WIFI${hr 1}${color}

${color #BFFF00}Down ${downspeed wlan0} /s ${alignr}Up ${upspeed wlan0} /s
${downspeedgraph  wlan0 20,85} ${alignr}${upspeedgraph wlan0 20,85}
Total ${totaldown wlan0}${alignr}Total ${totalup wlan0}

${color #BFFF00}ETHERNET${hr 1}${color}

${color #BFFF00}Down ${downspeed enp37s0} /s ${alignr}Up ${upspeed enp37s0} /s
${downspeedgraph enp37s0 20,85} ${alignr}${upspeedgraph enp37s0 20,85}
Total ${totaldown enp37s0} ${alignr}Total ${totalup enp37s0}

Above was my conky script before the update broke it. After some digging I found out that setting the dimensions is actually the culprit which broke it. So removing the dimensions (changing from ${downspeedgraph wlan0 20,85} to ${downspeedgraph wlan0}) fixed the issue under the cost of the compact layout!

EDIT

surrounding the network interface name with double quotes actually fixed the bug!! So ${downspeedgraph wlan0 20,85} should become ${downspeedgraph "wlan0" 20,85}

visious25 commented 1 year ago

Thank for your help, I did your your changes to my conky with double quotes and now working on v1.18.1.

Here is my full conky config: https://pastebin.com/WVn3LgN2

bi4k8 commented 1 year ago

This parsing issue may also be fixed (#1447) without needing to quote interface names in v1.18.3.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

Caellian commented 6 months ago

Tested locally and seems resolved. Closing.

Let me know if you want this issue reopened.

visious25 commented 6 months ago

No thank you, this issue solved by @SL-Pirate.