Conky ip.tupeux no IP displaying

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ganch0

Conky ip.tupeux no IP displaying

Post by ganch0 »

Hey guys, my conky configuration used to work perfectly however now instead of the Public IP displayed, the whole conky window stretches wide and is displayed <h1>it works</h1> <p>This is the def...</p>

also if I ran conky in the terminal I notice the following errors

Code: Select all

conky: Syntax error (/etc/conky/conky.conf:2: '=' expected near 'yes') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: desktop window (1400003) is subwindow of root window (c0)
conky: window type - override
conky: drawing to created window (0x5600001)
conky: drawing to double buffer
conky: one or more $endif's are missing

the configuration looks like this.

Code: Select all

# Use Xft?
use_xft yes
xftfont OFL Sorts Mill Goudy:size=8
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
own_window_class conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
background no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 180 0
#maximum_width 200

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white
own_window_colour white
color1 white

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 35
gap_y 35

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none

# Use Xft?
use_xft yes
xftfont OFL Sorts Mill Goudy:size=8
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
own_window_class conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
background no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 180 0
#maximum_width 200

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white
own_window_colour white
color1 white

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 35
gap_y 35

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none

TEXT
${font Goudy Bookletter 1911:style=Bold}SYSTEM${font} ${hr 2}
${alignc 17}${font Sniglet:size=16}Home${font}
${voffset 2}${font StyleBats:size=16}i${font}   Kernel:  ${alignr}${kernel}
${font StyleBats:size=16}A${font}   CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
${font StyleBats:size=16}A${font}   CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 8,60}
${font StyleBats:size=16}g${font}   RAM: $memperc% ${alignr}${membar 8,60}
${font StyleBats:size=16}l${font}  Temperature: ${alignr}${acpitemp}C
${font StyleBats:size=16}q${font}   Uptime: ${alignr}${uptime}

${font Goudy Bookletter 1911:style=Bold}HD${font} ${hr 2}
${voffset 4}${font Pie charts for maps:size=14}7${font}   ${voffset -5}Root:
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}

${if_existing /proc/net/route eth0}
${font Goudy Bookletter 1911:style=Bold}ETHERNET${font} ${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed eth0} ${alignr}${downspeedgraph eth0 8,60 000000 000000}
${voffset 4}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed eth0} ${alignr}${upspeedgraph eth0 8,60 000000 000000}
${voffset 4}${font PizzaDude Bullets:size=14}Z${font}   Signal: ${wireless_link_qual eth0}% ${alignr}${wireless_link_bar 8,60 eth0}
${voffset 4}${font PizzaDude Bullets:size=14}IP${font}  Public Ip: ${alignr} ${execi 3600 wget -O - http://ip.tupeux.com | tail}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr eth0}
${else if_existing /proc/net/route wlp2s0}
${font Goudy Bookletter 1911:style=Bold}WIRELESS${font} ${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed wlp2s0} ${alignr}${downspeedgraph wlp2s0 8,60 000000 000000}
${voffset 4}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed wlp2s0} ${alignr}${upspeedgraph wlp2s0 8,60 000000 000000}
${voffset 4}${font PizzaDude Bullets:size=14}Z${font}   Signal: ${wireless_link_qual wlp2s0}% ${alignr}${wireless_link_bar 8,60 wlp2s0}
${voffset 4}${font PizzaDude Bullets:size=14}b${font}   Public Ip: ${alignr} ${execi 3600 wget -O - http://ip.tupeux.com | tail}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr wlp2s0}

${font Goudy Bookletter 1911:style=Bold}PROCESSES${font} ${hr 2}
NAME $alignr PID    CPU
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5}
${top name 6} $alignr ${top pid 6} ${top cpu 6}
${top name 7} $alignr ${top pid 7} ${top cpu 7}

${font Goudy Bookletter 1911:style=Bold}MEMORY${font} ${hr 2}
NAME $alignr PID    RAM
${top_mem name 1} $alignr ${top_mem pid 1} ${top_mem mem 1}
${top_mem name 2} $alignr ${top_mem pid 2} ${top_mem mem 2}
${top_mem name 3} $alignr ${top_mem pid 3} ${top_mem mem 3}
${top_mem name 4} $alignr ${top_mem pid 4} ${top_mem mem 4}
${top_mem name 5} $alignr ${top_mem pid 5} ${top_mem mem 5}
${top_mem name 6} $alignr ${top_mem pid 6} ${top_mem mem 6}
${top_mem name 7} $alignr ${top_mem pid 7} ${top_mem mem 7}

Any ideas?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Habitual

Re: Conky ip.tupeux no IP displaying

Post by Habitual »

Code: Select all

Local Ip: ${alignr}${addr eth0}
...
Local Ip: ${alignr}${addr wlp2s0}
Don't know what addr is
but here,

Code: Select all

ip address show
shows NIC interface labels.

I've used

Code: Select all

curl icanhazip.com 
for about 8 years now.
Habitual

Re: Conky ip.tupeux no IP displaying

Post by Habitual »

suggestion: replace all occurrences of

Code: Select all

Public Ip: ${alignr} ${execi 3600 wget -O - http://ip.tupeux.com | tail}
with

Code: Select all

Public Ip: ${alignr} ${execi 3600 curl icanhazip.com}
Your config file has a few duplicate lines/entries ya know?
ganch0

Re: Conky ip.tupeux no IP displaying

Post by ganch0 »

Yeah the duplicates are due to my mistake copy pasting.

I tried using the https://icanhazip.com/ and its working fine however its displaying my IPv6, whereas I'm interested in the IPv4 address.
Habitual

Re: Conky ip.tupeux no IP displaying

Post by Habitual »

ganch0 wrote:Yeah the duplicates are due to my mistake copy pasting.

I tried using the https://icanhazip.com/ and its working fine however its displaying my IPv6, whereas I'm interested in the IPv4 address.
That I can't speak to, sorry.
Someone will be along ...
ganch0

Re: Conky ip.tupeux no IP displaying

Post by ganch0 »

Thank you though for your solution!
Habitual

Re: Conky ip.tupeux no IP displaying

Post by Habitual »

You're Welcome.

Conky Pit Stop is a conky code repository run by friends of mine.
Have a look!
Locked

Return to “Compiz, Conky, Docks & Widgets”