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.21k stars 619 forks source link

[Bug]: ${addrs} now reports gateway's address instead of machine address. #1542

Open BayouGuru67 opened 1 year ago

BayouGuru67 commented 1 year ago

What happened?

In the latest version (1.19.2 AppImage) the command ${addrs enp6s0}, which used to give me my LAN ip address, now is reporting the ip address of my gateway instead.

${addr enp6s0} DOES show my LAN IP address, as it should.

It would be nice if ${addrs} could be programmed to show the WAN ip4 address if not the LAN ip4 address. That would actually be useful. We already have a variable for the gateway's address.

It would be nice if I could (relatively easily?) install a current man page for conky. I do not understand the instructions on the site, as they seem to be geared to people who are compiling from source, not those who are using the AppImage, and I am therefore having to use the online Linux Man Pages instead as a reference. ( [https://linux.die.net/man/1/conky] https://linux.die.net/man/1/conky )

Version

1.19.2

Which OS/distro are you seeing the problem on?

Ubuntu

Conky config

--
--  BayouGuru's Connections and Tops Conky!
--  version:  2023-5-20.1150
--
conky.config = {
display = ":0.0",
update_interval = 2,
total_run_times = 0,
alignment = "top_right",
gap_x = 2,
gap_y = 2,
minimum_width = 300,
maximum_width = 300,
max_user_text = 32767,
net_avg_samples = 2,
own_window = true,
own_window_title = "RAM + Processes - conky",
own_window_type = "normal",
own_window_hints = "undecorated,below,sticky,skip_taskbar,skip_pager",
own_window_transparent = false,
own_window_argb_visual = true,
own_window_argb_value = 180,
double_buffer = true,
show_graph_scale = false,
no_buffers = true,
pad_percents = 1,
use_xft = true,
xftalpha = 0.8,
font = "Larabiefont-Regular:bold:size=12",
text_buffer_size = 256,
short_units = true,
temperature_unit = "fahrenheit",
forced_redraw = false,
draw_graph_borders = false,
draw_outline = false,
draw_shades = true,
draw_borders = true,
border_inner_margin = 2,
border_outer_margin = 0,
border_width = 3,
own_window_colour = "080721",
default_outline_color = "000000",
default_color = "000415",
default_shade_color = "080721",
color0 = '080721',                                          -- Dark Blue - Background
color1 = 'lightblue',                                       -- Light Blue - Labels
color2 = 'orange',                                          -- Orange - Monitored Item (Frequently Updates)
color3 = 'ea683c',                                          -- Dark Orange - Monitored Item 2
color4 = 'green',                                           -- Green - Headers
color5 = '0064ff',                                          -- Blue - ANSI Header Art
color6 = '2723a6',                                          -- Another Blue - Bar Fill
color7 = 'white',                                           -- White - Drive Labels
color8 = '0064ff',                                          -- Bright Blue - ANSI Forks
color9 = '8888AA',                                          -- Greyish Purple - Bar Scales
template0 = '${font Larabiefont-Regular:bold:size=12}',     -- Header Text
template1 = '${color1}${font Larabiefont-Regular:bold:size=11}', -- Label Text
template2 = '${font Larabiefont-Regular:bold:size=11}',     -- Data Text
template3 = '${font Arial:size=8}',                         -- Graph Scale Text
template4 = '${font Larabiefont-Regular:bold:size=10}',     -- Top Tables Text
template5 = '${font Ubuntu Condensed:size=11}',             -- Connection Hostnames
template6 = '${color8}${font Arial:bold:size=13}',          -- ANSI
template7 = '${color8}${font Arial:size=12}',               -- ANSI forks
template8 = '${font Larabiefont-Regular:bold:size=11}',     -- WAN Hostname
}
conky.text = [[${image ~/.conky/images/network.png -p 0,396 -s 38x38}
${if_up enp6s0}${image ~/.conky/images/green.png -p 0,415 -s 36x10}${endif}${if_empty ${addrs enp6s0}}${image ~/.conky/images/red.png -p 0,415 -s 36x10}${endif}${voffset -24}
${voffset -18}${color4}${template0}Processes${font} ${color8}${voffset -2}${hr 1}
${color1}${template4}Active   ${color2}${template2}${voffset -2}${running_processes}${alignr 4}${color1}${template4}${voffset 0}Total   ${color2}${template2}${voffset -2}${processes}
${color4}${template0}Top 7 - RAM Usage${font} ${color8}${voffset -2}${hr 1}
${voffset -2}${color1}${template4} Name${goto 158}PID${goto 208}RAM${goto 270}CPU${color5}${font}
${voffset -6}${template4}${color2} ${top_mem name 1}${offset -12}${top_mem pid 1}${goto 184}${top_mem mem 1}${color1}%${color2}${alignr 4}${top mem 1}${color1}%
${color2} ${top_mem name 2}${offset -12}${top_mem pid 2}${goto 184}${top_mem mem 2}${color1}%${color2}${alignr 4}${top mem 2}${color1}%
${color2} ${top_mem name 3}${offset -12}${top_mem pid 3}${goto 184}${top_mem mem 3}${color1}%${color2}${alignr 4}${top mem 3}${color1}%
${color2} ${top_mem name 4}${offset -12}${top_mem pid 4}${goto 184}${top_mem mem 4}${color1}%${color2}${alignr 4}${top mem 4}${color1}%
${color2} ${top_mem name 5}${offset -12}${top_mem pid 5}${goto 184}${top_mem mem 5}${color1}%${color2}${alignr 4}${top mem 5}${color1}%
${color2} ${top_mem name 6}${offset -12}${top_mem pid 6}${goto 184}${top_mem mem 6}${color1}%${color2}${alignr 4}${top mem 6}${color1}%
${color2} ${top_mem name 7}${offset -12}${top_mem pid 7}${goto 184}${top_mem mem 7}${color1}%${color2}${alignr 4}${top mem 7}${color1}%
${color4}${template0}Top 7 - CPU Usage${font} ${color8}${voffset -2}${hr 1}
${voffset -2}${color1}${template4} Name${goto 158}PID${goto 208}CPU${goto 270}RAM${color5}${font}
${voffset -6}${template4}${color2} ${top name 1}${offset -12}${top pid 1}${goto 184}${top cpu 1}${color1}%${color2}${alignr 4}${top mem 1}${color1}%
${color2} ${top name 2}${offset -12}${top pid 2}${goto 184}${top cpu 2}${color1}%${color2}${alignr 4}${top mem 2}${color1}%
${color2} ${top name 3}${offset -12}${top pid 3}${goto 184}${top cpu 3}${color1}%${color2}${alignr 4}${top mem 3}${color1}%
${color2} ${top name 4}${offset -12}${top pid 4}${goto 184}${top cpu 4}${color1}%${color2}${alignr 4}${top mem 4}${color1}%
${color2} ${top name 5}${offset -12}${top pid 5}${goto 184}${top cpu 5}${color1}%${color2}${alignr 4}${top mem 5}${color1}%
${color2} ${top name 6}${offset -12}${top pid 6}${goto 184}${top cpu 6}${color1}%${color2}${alignr 4}${top mem 6}${color1}%
${color2} ${top name 7}${offset -12}${top pid 7}${goto 184}${top cpu 7}${color1}%${color2}${alignr 4}${top mem 7}${color1}%
${color4}${template0}Network Information${font} ${color8}${voffset -2}${hr 1}
${goto 40}${template7}├${font Fira Code Nerd Font:size=13}${color1} ${color2}${goto 100}${template2}${upspeed enp6s0}${font}${goto 200}${font Fira Code Nerd Font:size=13}${voffset -3}${color1}${color2}${template2}${alignr 4}${voffset -1}${downspeed enp6s0}${font}
${voffset -2}${goto 40}${template7}├${template1} LAN IP${color3}${alignr 4}${template2}${addr enp6s0}${font}
${voffset -2}${goto 40}${template7}├${template1} WAN IP${color3}${alignr 4}${template2}${execi 300 curl ifconfig.me}
${voffset -2}${goto 40}${template7}├${template1} v6${color3}${alignr 3}${template4}${v6addrs enp6s0}
${goto 40}${template7}└${template1} Hostnames ${template7}┬${template1} ${voffset 1}LAN${template2}${color3}${alignr 4}${nodename_short}
${color1}${color3}${template8}${alignr 3}${execi 86400 ~/.conky/scripts/hostname.sh}
${color4}${template0}Network Connections${font} ${color8}${voffset -2}${hr 1}
${voffset -2}${if_existing /sys/class/net/enp6s0/operstate up}${font}${goto 50}${color1}${template4}Inbound${goto 138}${template2}${color2}${voffset -1}${tcp_portmon 1 32767 count}${font}${color1}${goto 184}${voffset -1}${template4}${voffset -1}Outbound${template2}${color2}${goto 280}${voffset -2}${tcp_portmon 32768 61000 count}${font}
${if_match ${tcp_portmon 1 32767 count}>=1}${goto 8}${color red}I${template7} ←${color2} ${template2}${tcp_portmon 1 32768 rip 0}${alignr 4}${tcp_portmon 1 32768 rservice 0}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 1 32767 count}>=1}${voffset -4}${goto 16}${color3}${template5}${tcp_portmon 1 32768 rhost 0}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 1 32767 count}>=2}${voffset -2}${goto 8}${color red}I${template7} ←${color2} ${template2}${tcp_portmon 1 32768 rip 1}${alignr 4}${tcp_portmon 1 32768 rservice 1}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 1 32767 count}>=2}${voffset -4}${goto 16}${color3}${template5}${tcp_portmon 1 32768 rhost 1}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 1 32767 count}>=3}${voffset -2}${goto 8}${color red}I${template7} ←${color2} ${template2}${tcp_portmon 1 32768 rip 2}${alignr 4}${tcp_portmon 1 32768 rservice 2}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 1 32767 count}>=3}${voffset -4}${goto 16}${color3}${template5}${tcp_portmon 1 32768 rhost 2}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 1 32767 count}>=4}${voffset -2}${goto 8}${color red}I${template7} ←${color2} ${template2}${tcp_portmon 1 32768 rip 3}${alignr 4}${tcp_portmon 1 32768 rservice 3}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 1 32767 count}>=4}${voffset -4}${goto 16}${color3}${template5}${tcp_portmon 1 32768 rhost 3}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 1 32767 count}>=5}${voffset -2}${goto 8}${color red}I${template7} ←${color2} ${template2}${tcp_portmon 1 32768 rip 4}${alignr 4}${tcp_portmon 1 32768 rservice 4}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 1 32767 count}>=5}${voffset -4}${goto 16}${color3}${template5}${tcp_portmon 1 32768 rhost 4}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 1 32767 count}>=6}${voffset -2}${goto 8}${color red}I${template7} ←${color2} ${template2}${tcp_portmon 1 32768 rip 5}${alignr 4}${tcp_portmon 1 32768 rservice 5}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 1 32767 count}>=6}${goto 16}${color3}${template5}${tcp_portmon 1 32768 rhost 5}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=1}${voffset -2}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 0}${alignr 4}${tcp_portmon 32768 61000 rservice 0}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=1}${voffset -4}${goto 16}${color3}${template5}${tcp_portmon 32768 61000 rhost 0}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=2}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 1}${alignr 4}${tcp_portmon 32768 61000 rservice 1}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=2}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 1}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=3}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 2}${alignr 4}${tcp_portmon 32768 61000 rservice 2}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=3}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 2}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=4}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 3}${alignr 4}${tcp_portmon 32768 61000 rservice 3}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=4}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 3}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=5}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 4}${alignr 4}${tcp_portmon 32768 61000 rservice 4}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=5}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 4}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=6}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 5}${alignr 4}${tcp_portmon 32768 61000 rservice 5}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=6}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 5}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=7}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 6}${alignr 4}${tcp_portmon 32768 61000 rservice 6}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=7}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 6}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=8}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 7}${alignr 4}${tcp_portmon 32768 61000 rservice 7}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=8}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 7}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=9}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 8}${alignr 4}${tcp_portmon 32768 61000 rservice 8}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=9}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 8}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=10}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 9}${alignr 4}${tcp_portmon 32768 61000 rservice 9}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=10}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 9}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=11}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 10}${alignr 4}${tcp_portmon 32768 61000 rservice 10}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=11}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 10}${color}${font}${else}${voffset -19}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=12}${voffset -2}${goto 8}${color7}O${template7} →${color2} ${template2}${tcp_portmon 32768 61000 rip 11}${alignr 4}${tcp_portmon 32768 61000 rservice 11}${font}${else}${voffset -21}${endif}
${if_match ${tcp_portmon 32768 61000 count}>=12}${goto 16}${color3}${template5}${voffset -4}${tcp_portmon 32768 61000 rhost 11}${color}${font}${else}${voffset -19}${endif}\
${else}${voffset 16} ${voffset 0}${color FF0000}${font Larabiefont-Regular:bold:size=16}${alignc}${blink NO CONNECTION!}${endif}${font}${voffset -50}]]

Stack trace

No response

Relevant log output

No response

bi4k8 commented 1 year ago

Which version were you running when this worked as expected? I don't believe anything has been changed around how ${addrs} works in quite some time.

Caellian commented 1 week ago

Related to #1001. Would likely be fixed by #1001.