You are not logged in.

#1 2023-08-13 14:12:59

Morta
Member
Registered: 2019-07-07
Posts: 660

[Solved] Conky display every time 0 insted of value

hi folks!

I have following conky configuration:

conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'Noto Sans Mono:size=12',
    gap_x = 20,
    gap_y = -30,
    border_inner_margin = 16,
    boarder_outer_margin = 8,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_wayland = true,
    own_window = true,
    own_window_argb_value = 255,
    own_window_argb_visual = true,
    own_window_class = 'Conky',
    own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
    own_window_transparent = true,
    own_window_type = 'desktop',
    show_graph_range = true,
    show_graph_scale = true,
    stippled_borders = 0,
    update_interval = 2.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[${voffset 4}${color}${font :bold}Lenovo Thinkpad X1 Extreme${font}
$hr
${color grey}Hostname: ${color}$nodename
${color grey}OS      : ${color}$sysname $kernel $machine
${color grey}Uptime  : ${color}$uptime
${color grey}Battery : ${color}$battery ${voffset 3}${battery_bar}${voffset -3}
${voffset 8}${color}${font :size=14}CPU ${font} (Intel Core i5-8400H @2.5GHz)$hr
${voffset 4}${color grey}Core 0: ${color}${alignr}${freq_g 1} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 0" | awk '{print $3}'}
${color grey}Core 1: ${color}${alignr}${freq_g 2} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 1" | awk '{print $3}'}
${color grey}Core 2: ${color}${alignr}${freq_g 3} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 0" | awk '{print $3}'}
${color grey}Core 4: ${color}${alignr}${freq_g 4} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 1" | awk '{print $3}'}
${voffset 8}${color grey}Thread 1: ${color}${voffset 3}${cpubar cpu1}${voffset -3}
${color grey}Thread 2: ${color}${voffset 3}${cpubar cpu2}${voffset -3}
${color grey}Thread 3: ${color}${voffset 3}${cpubar cpu3}${voffset -3}
${color grey}Thread 4: ${color}${voffset 3}${cpubar cpu4}${voffset -3}
${color grey}Thread 5: ${color}${voffset 3}${cpubar cpu5}${voffset -3}
${color grey}Thread 6: ${color}${voffset 3}${cpubar cpu6}${voffset -3}
${color grey}Thread 7: ${color}${voffset 3}${cpubar cpu7}${voffset -3}
${color grey}Thread 8: ${color}${voffset 3}${cpubar cpu8}${voffset -3}
${voffset 4}${color grey}Process              CPU%   MEM%
${color}  ${top name 1} ${top cpu 1} ${top mem 1}
${color}  ${top name 2} ${top cpu 2} ${top mem 2}
${color}  ${top name 3} ${top cpu 3} ${top mem 3}
${voffset 6}${color}${font :size=14}RAM ${font}$hr
${voffset 4}${color grey}Memory usage: ${color}${memperc}% of ${memmax} ${voffset 3}${membar}${voffset -3}
${voffset 4}${color grey}Process              MEM%   CPU%
${color}  ${top_mem name 1} ${top_mem mem 1} ${top_mem cpu 1}
${color}  ${top_mem name 2} ${top_mem mem 2} ${top_mem cpu 2}
${color}  ${top_mem name 3} ${top_mem mem 3} ${top_mem cpu 3}
${voffset 6}${color}${font :size=14}DISK ${font}$hr
${voffset 4}${color grey}Local root: $color${fs_free /} ${goto 215}${color grey}/ ${color} ${fs_size /}${goto 335}${voffset 3}${fs_bar /}${voffset -3}
${color grey}Home    : ${color}${fs_free /home} ${goto 215}${color grey}/ ${color}${fs_size /home}${goto 335}${voffset 3}${fs_bar /home}${voffset -3}
#${color grey}Google    : ${color}${fs_free /home/username/Cloud/GoogleDrive} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/GoogleDrive}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/GoogleDrive}${voffset -3}
#${color grey}OneDrive  : $color${fs_free /home/username/Cloud/OneDrive-Private} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/OneDrive-Private}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/OneDrive-Private}${voffset -3}
#${color grey}Dropbox   : $color${fs_free /home/username/Cloud/Dropbox} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/Dropbox}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/Dropbox}${voffset -3}
#${color grey}Mega      : $color${fs_free /home/username/Cloud/Mega} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/Mega}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/Mega}${voffset -3}
${color grey}NAS     : $color${fs_free /home/backup} ${goto 215}${color grey}/ ${color}${fs_size /home/backup}${goto 335}${voffset 3}${fs_bar /home/backup}${voffset -3}
${voffset 3}${color grey}      Read: ${color}${diskio_read /dev/md0} ${goto 230}${color grey}Write: ${color}${diskio_read /dev/md0}
${if_existing /home/backup/"a file or a lock"} ${color grey}NAS : {fs_free /home/backup} ${goto 215}${color grey}/ ${color}${fs_size /home/backup}${goto 335}${voffset 3}${fs_bar /home/backup}${voffset -3}${endif}
${voffset -15}${color}${font :size=14}NETWORK ${font}$hr
${if_existing /proc/net/route wlp0s20f3}\
${if_existing /proc/net/route enp58s0u1u3c2}\
${voffset 4}${color grey}Warning: ${color}Both Wi-Fi and wired network active!
${else}\
${voffset 4}${color grey}ESSID: ${color}${wireless_essid wlp0s20f3}${goto 240}${color grey}Quality: ${color}${wireless_link_qual_perc wlp0s20f3}%
${voffset 4}${color grey}  IP : ${color}${addr wlp0s20f3}${goto 240}${voffset 8}${color grey}Down:${goto 300}${color}${downspeed wlp0s20f3}
${voffset -8}${color grey}  Zt : ${color}${addr zerotierdevice}${goto 240}${voffset 8}${color grey}Up  :${goto 300}${color}${upspeed wlp0s20f3}
${vofconky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'Noto Sans Mono:size=12',
    gap_x = 20,
    gap_y = -30,
    border_inner_margin = 16,
    boarder_outer_margin = 8,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_wayland = true,
    own_window = true,
    own_window_argb_value = 255,
    own_window_argb_visual = true,
    own_window_class = 'Conky',
    own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
    own_window_transparent = true,
    own_window_type = 'desktop',
    show_graph_range = true,
    show_graph_scale = true,
    stippled_borders = 0,
    update_interval = 2.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[${voffset 4}${color}${font :bold}Lenovo Thinkpad X1 Extreme${font}
$hr
${color grey}Hostname: ${color}$nodename
${color grey}OS      : ${color}$sysname $kernel $machine
${color grey}Uptime  : ${color}$uptime
${color grey}Battery : ${color}$battery ${voffset 3}${battery_bar}${voffset -3}
${voffset 8}${color}${font :size=14}CPU ${font} (Intel Core i5-8400H @2.5GHz)$hr
${voffset 4}${color grey}Core 0: ${color}${alignr}${freq_g 1} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 0" | awk '{print $3}'}
${color grey}Core 1: ${color}${alignr}${freq_g 2} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 1" | awk '{print $3}'}
${color grey}Core 2: ${color}${alignr}${freq_g 3} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 0" | awk '{print $3}'}
${color grey}Core 4: ${color}${alignr}${freq_g 4} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 1" | awk '{print $3}'}
${voffset 8}${color grey}Thread 1: ${color}${voffset 3}${cpubar cpu1}${voffset -3}
${color grey}Thread 2: ${color}${voffset 3}${cpubar cpu2}${voffset -3}
${color grey}Thread 3: ${color}${voffset 3}${cpubar cpu3}${voffset -3}
${color grey}Thread 4: ${color}${voffset 3}${cpubar cpu4}${voffset -3}
${color grey}Thread 5: ${color}${voffset 3}${cpubar cpu5}${voffset -3}
${color grey}Thread 6: ${color}${voffset 3}${cpubar cpu6}${voffset -3}
${color grey}Thread 7: ${color}${voffset 3}${cpubar cpu7}${voffset -3}
${color grey}Thread 8: ${color}${voffset 3}${cpubar cpu8}${voffset -3}
${voffset 4}${color grey}Process              CPU%   MEM%
${color}  ${top name 1} ${top cpu 1} ${top mem 1}
${color}  ${top name 2} ${top cpu 2} ${top mem 2}
${color}  ${top name 3} ${top cpu 3} ${top mem 3}
${voffset 6}${color}${font :size=14}RAM ${font}$hr
${voffset 4}${color grey}Memory usage: ${color}${memperc}% of ${memmax} ${voffset 3}${membar}${voffset -3}
${voffset 4}${color grey}Process              MEM%   CPU%
${color}  ${top_mem name 1} ${top_mem mem 1} ${top_mem cpu 1}
${color}  ${top_mem name 2} ${top_mem mem 2} ${top_mem cpu 2}
${color}  ${top_mem name 3} ${top_mem mem 3} ${top_mem cpu 3}
${voffset 6}${color}${font :size=14}DISK ${font}$hr
${voffset 4}${color grey}Local root: $color${fs_free /} ${goto 215}${color grey}/ ${color} ${fs_size /}${goto 335}${voffset 3}${fs_bar /}${voffset -3}
${color grey}Home    : ${color}${fs_free /home} ${goto 215}${color grey}/ ${color}${fs_size /home}${goto 335}${voffset 3}${fs_bar /home}${voffset -3}
#${color grey}Google    : ${color}${fs_free /home/username/Cloud/GoogleDrive} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/GoogleDrive}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/GoogleDrive}${voffset -3}
#${color grey}OneDrive  : $color${fs_free /home/username/Cloud/OneDrive-Private} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/OneDrive-Private}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/OneDrive-Private}${voffset -3}
#${color grey}Dropbox   : $color${fs_free /home/username/Cloud/Dropbox} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/Dropbox}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/Dropbox}${voffset -3}
#${color grey}Mega      : $color${fs_free /home/username/Cloud/Mega} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/Mega}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/Mega}${voffset -3}
${color grey}NAS     : $color${fs_free /home/backup} ${goto 215}${color grey}/ ${color}${fs_size /home/backup}${goto 335}${voffset 3}${fs_bar /home/backup}${voffset -3}
${voffset 3}${color grey}      Read: ${color}${diskio_read /dev/md0} ${goto 230}${color grey}Write: ${color}${diskio_read /dev/md0}
${if_existing /home/backup/"a file or a lock"} ${color grey}NAS : {fs_free /home/backup} ${goto 215}${color grey}/ ${color}${fs_size /home/backup}${goto 335}${voffset 3}${fs_bar /home/backup}${voffset -3}${endif}
${voffset -15}${color}${font :size=14}NETWORK ${font}$hr
${if_existing /proc/net/route wlp0s20f3}\
${if_existing /proc/net/route enp58s0u1u3c2}\
${voffset 4}${color grey}Warning: ${color}Both Wi-Fi and wired network active!
${else}\
${voffset 4}${color grey}ESSID: ${color}${wireless_essid wlp0s20f3}${goto 240}${color grey}Quality: ${color}${wireless_link_qual_perc wlp0s20f3}%
${voffset 4}${color grey}  IP : ${color}${addr wlp0s20f3}${goto 240}${voffset 8}${color grey}Down:${goto 300}${color}${downspeed wlp0s20f3}
${voffset -8}${color grey}  Zt : ${color}${addr zerotierdevice}${goto 240}${voffset 8}${color grey}Up  :${goto 300}${color}${upspeed wlp0s20f3}
${voffset -8}${color grey}  GW : ${color}${gw_ip}
${color grey}  Pub: ${color}${texeci 30 ~/.config/conky/pubIP.sh}
${endif}\
${else}\
${if_existing /proc/net/route enp58s0u1u3c2}\
${voffset 4}${color grey}Wired network: ${color}Active
${voffset 4}${color grey}  IP : ${color}${addr enp58s0u1u3c2}${goto 240}${voffset 8}${color grey}Down:${goto 300}${color}${downspeed enp58s0u1u3c2}
${voffset -8}${color grey}  Zt : ${color}${addr zerotierdevice}${goto 240}${voffset 8}${color grey}Up  :${goto 300}${color}${upspeed enp58s0u1u3c2}
${voffset -8}${color grey}  GW : ${color}${gw_ip}
${color grey}  Pub: ${color}${texeci 30 ~/.config/conky/pubIP.sh}
${endif}\
${endif}\
${voffset 6}${color}${font :size=14}UPDATES ${font}$hr
${voffset 4}${color grey}      Arch: ${color}${execi 600  pacman -Qqu | wc -l}${goto 230}${color grey}AUR: ${color}${execi 600 auracle outdated | wc -l}
]]fset -8}${color grey}  GW : ${color}${gw_ip}
${color grey}  Pub: ${color}${texeci 30 ~/.config/conky/pubIP.sh}
${endif}\
${else}\
${if_existing /proc/net/route enp58s0u1u3c2}\
${voffset 4}${color grey}Wired network: ${color}Active
${voffset 4}${color grey}  IP : ${color}${addr enp58s0u1u3c2}${goto 240}${voffset 8}${color grey}Down:${goto 300}${color}${downspeed enp58s0u1u3c2}
${voffset -8}${color grey}  Zt : ${color}${addr zerotierdevice}${goto 240}${voffset 8}${color grey}Up  :${goto 300}${color}${upspeed enp58s0u1u3c2}
${voffset -8}${color grey}  GW : ${color}${gw_ip}
${color grey}  Pub: ${color}${texeci 30 ~/.config/conky/pubIP.sh}
${endif}\
${endif}\
${voffset 6}${color}${font :size=14}UPDATES ${font}$hr
${voffset 4}${color grey}      Arch: ${color}${execi 600  pacman -Qqu | wc -l}${goto 230}${color grey}AUR: ${color}${execi 600 auracle outdated | wc -l}
]]

Following lines doesn't work

${voffset 6}${color}${font :size=14}UPDATES ${font}$hr
${voffset 4}${color grey}      Arch: ${color}${execi 600  pacman -Qqu | wc -l}${goto 230}${color grey}AUR: ${color}${execi 600 yay -Qqu | wc -l}

Display every time 0 instead of value. I tried exec,texec,execpi and execi same problem.

How I can fix it?

Last edited by Morta (2023-08-17 19:37:30)

Offline

#2 2023-08-13 14:18:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] Conky display every time 0 insted of value

What's there to fix?  Unless you are doing something (else) foolish, that pacman command should always return 0.  What does that pacman command return when run in a terminal?

I gather you really want to use checkupdates.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-08-13 14:20:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [Solved] Conky display every time 0 insted of value

Well, what's the output of "pacman -Qqu" and are you maybe looking for "checkupdates" from pacman-contrib?

Offline

#4 2023-08-13 14:20:45

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

I want really to available updates from pacman and AUR

Last edited by Morta (2023-08-13 14:21:02)

Offline

#5 2023-08-13 14:22:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] Conky display every time 0 insted of value

Then you need a command that does that - `pacman -Qqu` is very near to meaningless.  On a properly functioning system it will always return 0.

So your problem has nothing to do with conky displaying the wrong value.  It is displaying exactly what you tell it to.

Use checkupdates (for repo packages)

Last edited by Trilby (2023-08-13 14:22:44)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2023-08-13 14:26:15

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

It's looks like this

https://abload.de/img/20230813_16h21m23s_grenc4n.png

Ok but when I prompt pacman -Qqu | wc -l in the terminal it's give me a value above 0 if updates available.

I also tried with checkupdates and aurcle instead of pacman and yay

Last edited by Morta (2023-08-13 14:28:03)

Offline

#7 2023-08-13 14:29:44

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

${voffset 4}${color grey}      Arch: ${color}${execi 600  checkupdates | wc -l}${goto 230}${color grey}AUR: ${color}${execi 600 auracle outdated | wc -l} ]]

same result...

Offline

#8 2023-08-13 14:30:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] Conky display every time 0 insted of value

Ah ... we don't need a photo.  We know what the number zero looks like.

Morta wrote:

when I prompt pacman -Qqu | wc -l in the terminal it's give me a value above 0 if updates available.

Prove it.  What value is it giving?  And what is the actual output of `pacman -Qqu`?  If that is above zero, then you are doing something else really foolish.

The good news is, I suspect that other really foolish step is only being done in the terminal right before you run that -Qqu command.

And are you restarting conky (both of them) after editing the config file(s)?  If you put "echo 42" in place of the pacman/checkupdates command, do you see the 42 on the conky display?

Last edited by Trilby (2023-08-13 14:42:25)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2023-08-13 14:34:57

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [Solved] Conky display every time 0 insted of value

Also what is the output of "checkupdates"?

Offline

#10 2023-08-13 16:41:51

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

Trilby wrote:

Ah ... we don't need a photo.  We know what the number zero looks like.

Morta wrote:

when I prompt pacman -Qqu | wc -l in the terminal it's give me a value above 0 if updates available.

Prove it.  What value is it giving?  And what is the actual output of `pacman -Qqu`?  If that is above zero, then you are doing something else really foolish.

The good news is, I suspect that other really foolish step is only being done in the terminal right before you run that -Qqu command.

And are you restarting conky (both of them) after editing the config file(s)?  If you put "echo 42" in place of the pacman/checkupdates command, do you see the 42 on the conky display?

1. Ok I'm wrong.

2.

${voffset 6}${color}${font :size=14}UPDATES ${font}$hr
${voffset 4}${color grey}      Arch: ${color}${execi 10 echo 42 }${goto 230}${color grey}AUR: ${color}${execi 600 auracle outdated | wc -l}

3. echo doesn't display 42 in the conky

4. Also no public IP

Last edited by Morta (2023-08-13 16:42:30)

Offline

#11 2023-08-13 18:04:29

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [Solved] Conky display every time 0 insted of value

4. Also no public IP

??

3. echo doesn't display 42 in the conky

What does it display instead? Are you sure you're editing the correct config/conky picks up any changes there at all? (Try eg. to change the color)
Also post the entire current config.

Offline

#12 2023-08-13 18:09:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] Conky display every time 0 insted of value

Morta, every response you give here ignores most of the already-posed questions and instead adds some random bit of information that just raises so many more questions.  We will most definitely not converge on any answers going like this.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 2023-08-13 18:57:22

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

seth wrote:

4. Also no public IP

??

3. echo doesn't display 42 in the conky

What does it display instead? Are you sure you're editing the correct config/conky picks up any changes there at all? (Try eg. to change the color)
Also post the entire current config.

1. I have a script that execute a curl to a api they give me a IP for a conky. See my picture

2. I posted the hole config above.

3. It's display nothing on IP and two zero on ARCH: and AUR:

4. Sorry english is not my nativ language so it can come to understanding problems

5. I would nice to be kindly to each other

Last edited by Morta (2023-08-13 18:58:16)

Offline

#14 2023-08-13 19:15:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [Solved] Conky display every time 0 insted of value

4. deepl.com

2. Yes, but that's not the actual current config where you tried to echo "42"
Also there're *TWO* "conky.text" assignments in that config

1. There's no curl in that  config, if you use some local script and want to check on that, naming and posting it would be useful - also make sure it's executable

5. It is the epitome of unfriendliness to avoid constructive criticism in order to be falsely perceived as being nice.

Offline

#15 2023-08-13 19:29:56

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

4. Ok I will read the text double. I'm tired. Sorry for the circumstance!
2.

conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'Noto Sans Mono:size=12',
    gap_x = 20,
    gap_y = -30,
    border_inner_margin = 16,
    boarder_outer_margin = 8,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_wayland = true,
    own_window = true,
    own_window_argb_value = 255,
    own_window_argb_visual = true,
    own_window_class = 'Conky',
    own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
    own_window_transparent = true,
    own_window_type = 'desktop',
    show_graph_range = true,
    show_graph_scale = true,
    stippled_borders = 0,
    update_interval = 2.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[${voffset 4}${color}${font :bold}Lenovo Thinkpad X1 Extreme${font}
$hr
${color grey}Hostname: ${color}$nodename
${color grey}OS      : ${color}$sysname $kernel $machine
${color grey}Uptime  : ${color}$uptime
${color grey}Battery : ${color}$battery ${voffset 3}${battery_bar}${voffset -3}
${voffset 8}${color}${font :size=14}CPU ${font} (Intel Core i5-8400H @2.5GHz)$hr
${voffset 4}${color grey}Core 0: ${color}${alignr}${freq_g 1} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 0" | awk '{print $3}'}
${color grey}Core 1: ${color}${alignr}${freq_g 2} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 1" | awk '{print $3}'}
${color grey}Core 2: ${color}${alignr}${freq_g 3} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 0" | awk '{print $3}'}
${color grey}Core 4: ${color}${alignr}${freq_g 4} GHz  ${color grey}Temperature: ${color}${execi 30 sensors | grep "Core 1" | awk '{print $3}'}
${voffset 8}${color grey}Thread 1: ${color}${voffset 3}${cpubar cpu1}${voffset -3}
${color grey}Thread 2: ${color}${voffset 3}${cpubar cpu2}${voffset -3}
${color grey}Thread 3: ${color}${voffset 3}${cpubar cpu3}${voffset -3}
${color grey}Thread 4: ${color}${voffset 3}${cpubar cpu4}${voffset -3}
${color grey}Thread 5: ${color}${voffset 3}${cpubar cpu5}${voffset -3}
${color grey}Thread 6: ${color}${voffset 3}${cpubar cpu6}${voffset -3}
${color grey}Thread 7: ${color}${voffset 3}${cpubar cpu7}${voffset -3}
${color grey}Thread 8: ${color}${voffset 3}${cpubar cpu8}${voffset -3}
${voffset 4}${color grey}Process              CPU%   MEM%
${color}  ${top name 1} ${top cpu 1} ${top mem 1}
${color}  ${top name 2} ${top cpu 2} ${top mem 2}
${color}  ${top name 3} ${top cpu 3} ${top mem 3}
${voffset 6}${color}${font :size=14}RAM ${font}$hr
${voffset 4}${color grey}Memory usage: ${color}${memperc}% of ${memmax} ${voffset 3}${membar}${voffset -3}
${voffset 4}${color grey}Process              MEM%   CPU%
${color}  ${top_mem name 1} ${top_mem mem 1} ${top_mem cpu 1}
${color}  ${top_mem name 2} ${top_mem mem 2} ${top_mem cpu 2}
${color}  ${top_mem name 3} ${top_mem mem 3} ${top_mem cpu 3}
${voffset 6}${color}${font :size=14}DISK ${font}$hr
${voffset 4}${color grey}Local root: $color${fs_free /} ${goto 215}${color grey}/ ${color} ${fs_size /}${goto 335}${voffset 3}${fs_bar /}${voffset -3}
${color grey}Home    : ${color}${fs_free /home} ${goto 215}${color grey}/ ${color}${fs_size /home}${goto 335}${voffset 3}${fs_bar /home}${voffset -3}
#${color grey}Google    : ${color}${fs_free /home/username/Cloud/GoogleDrive} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/GoogleDrive}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/GoogleDrive}${voffset -3}
#${color grey}OneDrive  : $color${fs_free /home/username/Cloud/OneDrive-Private} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/OneDrive-Private}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/OneDrive-Private}${voffset -3}
#${color grey}Dropbox   : $color${fs_free /home/username/Cloud/Dropbox} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/Dropbox}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/Dropbox}${voffset -3}
#${color grey}Mega      : $color${fs_free /home/username/Cloud/Mega} ${goto 215}${color grey}/ ${color}${fs_size /home/username/Cloud/Mega}${goto 335}${voffset 3}${fs_bar /home/username/Cloud/Mega}${voffset -3}
${color grey}NAS     : $color${fs_free /home/backup} ${goto 215}${color grey}/ ${color}${fs_size /home/backup}${goto 335}${voffset 3}${fs_bar /home/backup}${voffset -3}
${voffset 3}${color grey}      Read: ${color}${diskio_read /dev/md0} ${goto 230}${color grey}Write: ${color}${diskio_read /dev/md0}
${if_existing /home/backup/"a file or a lock"} ${color grey}NAS : {fs_free /home/backup} ${goto 215}${color grey}/ ${color}${fs_size /home/backup}${goto 335}${voffset 3}${fs_bar /home/backup}${voffset -3}${endif}
${voffset -15}${color}${font :size=14}NETWORK ${font}$hr
${if_existing /proc/net/route wlp0s20f3}\
${if_existing /proc/net/route enp58s0u1u3c2}\
${voffset 4}${color grey}Warning: ${color}Both Wi-Fi and wired network active!
${else}\
${voffset 4}${color grey}ESSID: ${color}${wireless_essid wlp0s20f3}${goto 240}${color grey}Quality: ${color}${wireless_link_qual_perc wlp0s20f3}%
${voffset 4}${color grey}  IP : ${color}${addr wlp0s20f3}${goto 240}${voffset 8}${color grey}Down:${goto 300}${color}${downspeed wlp0s20f3}
${voffset -8}${color grey}  Zt : ${color}${addr zerotierdevice}${goto 240}${voffset 8}${color grey}Up  :${goto 300}${color}${upspeed wlp0s20f3}
${voffset -8}${color grey}  GW : ${color}${gw_ip}
${color grey}  Pub: ${color}${texeci 30 ~/.config/conky/pubIP.sh}
${endif}\
${else}\
${if_existing /proc/net/route enp58s0u1u3c2}\
${voffset 4}${color grey}Wired network: ${color}Active
${voffset 4}${color grey}  IP : ${color}${addr enp58s0u1u3c2}${goto 240}${voffset 8}${color grey}Down:${goto 300}${color}${downspeed enp58s0u1u3c2}
${voffset -8}${color grey}  Zt : ${color}${addr zerotierdevice}${goto 240}${voffset 8}${color grey}Up  :${goto 300}${color}${upspeed enp58s0u1u3c2}
${voffset -8}${color grey}  GW : ${color}${gw_ip}
${color grey}  Pub: ${color}${texeci 30 ~/.config/conky/pubIP.sh}
${endif}\
${endif}\
${voffset 6}${color}${font :size=14}UPDATES ${font}$hr
${voffset 4}${color grey}      Arch: ${color}${execi 10 echo 42 }${goto 230}${color grey}AUR: ${color}${execi 600 auracle outdated | wc -l}
]]

1.

${color grey}  Pub: ${color}${texeci 30 ~/.config/conky/pubIP.sh}

1.1

[morta@lapt0p ~]$ cat .config/conky/pubIP.sh
curl -s ipconfig.in/ip

5. Ok sorry I misunderstood it.

Offline

#16 2023-08-13 19:46:44

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [Solved] Conky display every time 0 insted of value

stat ~/.config/conky/pubIP.sh
~/.config/conky/pubIP.sh # does it print your WAN IP?
seth wrote:

Are you sure you're editing the correct config/conky picks up any changes there at all? (Try eg. to change the color)

Offline

#17 2023-08-14 09:06:23

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,340

Re: [Solved] Conky display every time 0 insted of value

what's the output of

ps -ef | grep conky

Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#18 2023-08-14 19:04:57

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

seth wrote:
stat ~/.config/conky/pubIP.sh
~/.config/conky/pubIP.sh # does it print your WAN IP?
seth wrote:

Are you sure you're editing the correct config/conky picks up any changes there at all? (Try eg. to change the color)

stat ~/.config/conky/pubIP.sh
  File: /home/morta/.config/conky/pubIP.sh
  Size: 23        	Blocks: 8          IO Block: 4096   regular file
Device: 254,3	Inode: 10749153    Links: 1
Access: (0700/-rwx------)  Uid: ( 1000/   morta)   Gid: (  985/   users)
Access: 2023-08-13 16:19:34.298339026 +0200
Modify: 2023-08-13 16:19:23.001637796 +0200
Change: 2023-08-13 16:19:23.018304510 +0200
 Birth: 2023-08-13 16:19:23.001637796 +0200
[morta@lapt0p ~]$ ps -ef | grep conky
morta       1866       1  0 Aug13 ?        00:01:37 conky -c /home/morta/.conkyrc2 --display=:0 --daemonize --pause=5
morta       1867       1  0 Aug13 ?        00:00:08 conky -c /home/morta/.conkyrc --display=:0 --daemonize --pause=5
morta      42942    2167  0 21:03 pts/0    00:00:00 grep conky

Offline

#19 2023-08-14 19:36:02

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [Solved] Conky display every time 0 insted of value

seth a couple of times wrote:

Are you sure you're editing the correct config/conky picks up any changes there at all? (Try eg. to change the color)

Offline

#20 2023-08-14 19:38:27

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

seth wrote:
seth a couple of times wrote:

Are you sure you're editing the correct config/conky picks up any changes there at all? (Try eg. to change the color)

Yes I'm shure. I'm editing .conkyrc in the folder /home/morta. The other conkyrc2 config is only time and date. Look at the output of the ps. The path is given by -c.

It's really doesn't work all exec commands and I don't know why? I use sway on wayland.

Last edited by Morta (2023-08-14 19:40:05)

Offline

#21 2023-08-14 19:40:34

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [Solved] Conky display every time 0 insted of value

That's not what I asked or suggested - when you alter some other element, like the color of the relevant text, does that get reflected?

You've btw. also not answered what the output of "checkupdates", "pacman -Quq" or "~/.config/conky/pubIP.sh" in an interactive shell actually is.

Offline

#22 2023-08-15 18:15:21

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

[morta@lapt0p Downloads]$ checkupdates | wc -l
101
pacman -Quq # No output
[morta@lapt0p Downloads]$ sh ~/.config/conky/pubIP.sh
2a02:168:a774::beef

I edited the the space between the lines of the conky and the postion. yes it's works

Offline

#23 2023-08-16 14:46:33

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [Solved] Conky display every time 0 insted of value

There's obviously no surprise reg. "pacman -Quq" but it's completely inexplicable how "echo 42" could possibly print "0".
If you replcace the entire "${execi 10 echo 42 }" w/ just "SNAFU", what does it print?

Edit: or maybe not…

echo $SHELL

Last edited by seth (2023-08-16 14:55:31)

Offline

#24 2023-08-17 18:36:04

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [Solved] Conky display every time 0 insted of value

[morta@lapt0p ~]$ echo $SHELL
/bin/bash

My sway config

# Conky
exec env -u DISPLAY conky -c /home/morta/.conkyrc --display=:0 --daemonize --pause=5 & env -u DISPLAY conky -c /home/morta/.conkyrc2 --display=:0 --daemonize --pause=5 &
sway reload

has no effect on conky I have to kill conky per hand and doesn't restart with

sway reload

I have to reboot

Offline

#25 2023-08-17 18:40:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] Conky display every time 0 insted of value

So you've *not* been restarting conky with all these edits all along.  That would explain pretty much everything odd in this thread.

You most certainly don't need to restart sway nor reboot.  Just restart conky.  Just do so directly (from a command prompt) for testing so you can see any errors that conky produces.

In any case, I suspect learning how to actually restart conky after you've modified the config files should resolve most of the issues here.  So why don't you tell us what issues still remain once you have restarted conky.

EDIT: wait - you said that changing the conky config did change the spacing - so you must have restarted it.  I give up - I no longer have any idea which parts of what you have said have been true versus totally fictional (like when you said pacman -Qu gave output ... but it didn't).

Last edited by Trilby (2023-08-17 18:42:03)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB