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.27k stars 620 forks source link

${if_updatenr} requires at least 4 update cycles? #974

Closed Galicarnax closed 1 year ago

Galicarnax commented 4 years ago

Issue

I was going to implement mail notification with text blinking in conky. I would expect this to work as intended, using 1-second update interval:

${if_updatenr 1}Hello${endif}${if_updatenr 2}${endif}

However, the blink is not correct - text is displayed for 1 sec, and then is missing for ~3 seconds. If, instead, I do this:

${if_updatenr 1}Hello${endif}${if_updatenr 2}${endif}${if_updatenr 3}Hello${endif}${if_updatenr 4}${endif}

then text blinks uniformly in time, as expected.

This happens even if no other things are present in conky's TEXT. I did not find any limitations on if_updatenr in the documentation. So why doesn't it work properly with two-cycle version?

github-actions[bot] commented 1 year 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.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity.

bi4k8 commented 1 year ago

I wasn't able to reproduce this--the below .conkyrc blinks on and off evenly once per second for me:

conky.config = { 
    out_to_wayland = true, 
    alignment = 'middle_middle', 
    own_window_argb_value = 0, 
    own_window = false,
    default_shade_color = 'grey', 
    draw_shades = true, 
    font = 'Mono:size=13', 
    update_interval = 1,
    default_color = '#ffffff',
} 

conky.text = [[ 
${if_updatenr 1}Hello${endif}${if_updatenr 2}${endif}
]]