Conky: Latest git version messes up alignment; font problems?

Created on 31 Mar 2019  路  12Comments  路  Source: brndnmtthws/conky

Issue

Using the version of conky in my distro's repos, namely, version 1.10.8 (with one redaction):

image

Using 1.11.4_pre (and the same conky config and the same redaction):

image

It is possible that I messed up the ncurses configuration (/build) options.

Information

OS: Mint 19.1 x64 Cinnamon
Conky: 1.11.4_pre

--     ______            __
--    / ____/___  ____  / /____  __
--   / /   / __ \/ __ \/ //_/ / / /
--  / /___/ /_/ / / / / ,< / /_/ /
--  \____/\____/_/ /_/_/|_|\__, /
--                        /____/


-- ///////////////////////
-- //   CONFIGURATION   //
-- ///////////////////////

conky.config =
{
    -- // Update & reporting //

        -- On update intervals (which are in seconds):
        -- Lowering may increase xorg usage, because of graphs.
        -- Need to keep intervals < any script intervals.
        -- Effects battery life and perhaps Internet speed / ping.
        update_interval = 1.21,
        update_interval_on_battery = 1.3,

        total_run_times = 0,
        -- The number of times Conky will update before quitting. Set to zero to run forever.
        -- To test cpu usage, can set to, for e.g., 30, and use thus: 'time conky'.

        short_units = true,
        -- Shortens units to a single character (kiB->k, GiB->G, etc.). Default is false.

        format_human_readable = true,

        no_buffers = true,
        -- Subtract file system buffers from used memory?

        cpu_avg_samples = 3,

        net_avg_samples = 3,
        --  number of net samples to average [with, seemingly, one sample taken each conky tick]. Set to 1 to disable averaging. Applies to down- and upload data, and *not* to wifi strength.

        -- diskio_avg_samples = 1,

        if_up_strictness = "link",
        -- 'address' means that network interface must have an ip address to be considered up. SEEMS NOT TO WORK. But simply commenting out 'if_up_strictness = "address"' causes weirdness; so, if don't want 'address' mode, use 'up' or 'link' options. 'Up' makes Conky think is ethernet when is no net. 'link' seems OK.
        -- EDIT: has been relevant conky update, so trying 'address'.

        pad_percents = 2,
        -- # of digits in percentages (to determine whether get 1, [space]1, [space][space]1, etc.)

        top_name_width = 12,
        -- truncates string variable output for the 'top' command.

    -- // Windows
        double_buffer = true,
        -- Use double buffering (reduces flicker, may not work for everyone)

        own_window = true,
        -- Create own window; required in Nemo.

        own_window_type = 'dock',
        -- 'normal' works too, and is recommended for Cinnamon, and behaviour seems identical to 'dock', except that super-D hides Conky if set to 'normal'.
        -- if own_window is true, you may specify type normal, desktop, dock, panel or override (default: normal). *Desktop* windows are special windows that have no window decorations; are always visible on your desktop; do not appear in your pager or taskbar; and are sticky across all workspaces. *Panel* windows reserve space along a desktop edge, just like panels and taskbars, preventing maximized windows from overlapping them. The edge is chosen based on the alignment option. *Override* windows are not under the control of the window manager. Hints are ignored. This type of window can be useful for certain situations. [& *Dock* is an always-on-top option - unless use 'below' in own_window_hints.]

        own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
        -- 'own_window_type = "desktop"' sets some of those 'hints' on its own, apparently.
        -- If have 'below' in own_window_hints, then conky excludes icons. At least if window type set to 'normal'.]

        own_window_transparent = false,
        --own_window_class = 'Conky',
        -- own_window_class manually set the WM_CLASS name. Defaults to "Conky".

        own_window_argb_visual = true,
        own_window_argb_value = 3,
        -- Can set level of transparency (a.k.a alpha) with: 'own_window_argb_value = 100'; valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
        -- Need 'own_window_argb_visual = true' for transparency to work properly.

        gap_x = 70,
        gap_y = 10,
        -- Top border, if have one, will not show with gap_y < 5.

        minimum_height = 80,

        minimum_width = 2560,
        -- Minimum size of text area. NB: Changes may require a LOGOUT - or perhaps kill conky with xkill & restart.
        -- NB: Setting minimum_width can mess up centering, at least if use $alignr in the script.

        alignment = 'top_left',
        -- Aligned position on screen, may be top_left, top_right, top_middle, bottom_left, bottom_right, bottom_middle, middle_left, middle_middle, middle_right, or none (also can be abreviated - on newer versions of Conky - as tl, tr, tm, bl, br, bm, ml, mm, mr).
        -- Can affect CPU usage. ('tl' better than 'tr'.)

        -- draw_borders = true,
        -- Draw borders around text. Useful for DEBUGGING.
        -- stippled_borders = 10,

        --border_inner_margin = 1,

        border_outer_margin = 3,
        -- Seems need border_outer_margin = 3 or above, else VPN icon gets truncated.

        -- border_width = 1,
        -- Gap between borders of screen and text. Equivalent to passing -x at command line.

        draw_graph_borders = true,
        -- Default: true. draw_graph_borders does not affect 'bars', e.g. cpubar.
        -- The default color of graph borders is whatever the conky default color is set to using: default_color.
        -- But '${color xxxxxx}' before the graph will change border colour, with colour of graph itself set by the graph command.


    -- // Fonts, colours //

        use_xft = true,
        -- Need this ('use_xft') for decent fonts.

        override_utf8_locale = true,
        -- Supposedly, need this as 'true' for non-unicode characters.
        -- But doesn't work, though setting it to false causes weirdness.

        font = 'Noto Sans:size=18',
        -- Sets default font. Needs invoking via ${font}.

        --uppercase = false,

        draw_shades = false,
        -- If true, adds slight shadow to text. Effect is subtle.
        -- MAKES GRAPHS ESCAPE THEIR BORDERS. So, do NOT enable.

        use_spacer = 'left',
        -- Add spaces to keep things from moving about with (only) monospace fonts. Possible values: none, left, right.

        -- COLOUR.
        -- Inbuilt colours: ${color red} (or green, yellow, blue, magenta, cyan, black, white.
        -- To use ones I have defined: Can also use: ${color <number>}.
        -- NB: Some of the scripts use these colour codes.

        color1 = '8DC292',
        -- This is pastel green, used for values.

        color2 = 'FEE16F',
        -- This is pastel yellow, slightly verging on orange.

        color3 = 'F45F30',
        -- This is a pastel red.

        color4 = 'EBEBEB',
        -- This is a white-ish grey.

        color5 = '46B84B',
        -- This is a somewhat bright green. (Inbuild green is very bright.)

        color6 = 'D1FF32',
        -- A greeny-yellow.

        color7 = '3C3C3C',
        -- This is grey-black. (I use hex codes for lighter greys.)

        color8 = 'E6B6A4',
        -- Yellow-brown-red

        color9 = '96FFD7',
        -- A greeny-bluey-white.

        -- Seems += color10 does not work. But can use 'color #' followed by colour hexcode.

        default_color = 'EFEFEF',
        -- F5F5F5; this is pastel white/grey.
        -- It determines, for one thing, graph border colours - *but* that is overriden by any preceeding colour command.

        -- The settings default_color, default_outline_color, default_shade_color seem broken.

    -- // LUA script(s) //
    -- Can load more than one script; do so by separating them with a space in the command below (and enclose whole lot in single quotes).
    -- Also, ensure all lua functions called by conky have unique names.
    lua_load = '/home/username/scripts/Conky/lua/vpn.lua /home/username/scripts/Conky/lua/flipFlop.lua /home/username/scripts/Conky/lua/secondRow.lua',
    -- Also: Conky *parses* stuff returned by Lua.
    -- See: https://github.com/brndnmtthws/conky/wiki/Lua-API
}

-- ///////////////
-- //   Main    //
-- ///////////////

-- Here (only), hashes precede comments.
-- Can end lines with \ to separete code lines printing CR.
-- Tabs tend to get printed.
-- If end with a blank line, that gets printed. & can't end with a hash.

conky.text = [[
#
# -----------------------------
# DISC SPACE USAGE & RAM & CPU
# -----------------------------
#
# ROOT
${color4}\
/\
${offset 15}\
${if_match ${fs_used_perc /root} > 80}\
${color3}\
${else}${if_match ${fs_used_perc /root} > 75}\
${color2}\
${else}${if_match ${fs_used_perc /root} > 65}\
${color6}\
${else}\
${color1}\
${endif}${endif}${endif}\
${font Noto Sans Mono:size=18}\
${fs_used_perc /root}%\
# HOME
${goto 125}\
${color4}\
~\
${offset 15}\
${if_match ${fs_used_perc /home} > 90}\
${color3}\
${else}${if_match ${fs_used_perc /home} > 85}\
${color2}\
${else}${if_match ${fs_used_perc /home} > 69}\
${color6}\
${else}\
${color1}\
${endif}${endif}${endif}\
${font Noto Sans Mono:size=18}\
${fs_used_perc /home}%\
${font}\
# SWAP
${goto 250}\
${color4}\
swp\
${offset 15}\
${if_match ${swapperc} > 80}\
${color3}\
${else}${if_match ${swapperc} > 64}\
${color2}\
${else}${if_match ${swapperc} > 50}\
${color6}\
${else}\
${color1}\
${endif}${endif}${endif}\
${font Noto Sans Mono:size=18}\
${swapperc /swap}%\
${font}\
# RAM
${goto 425}\
${color4}\
ram\
${offset 15}\
${font Noto Sans Mono:size=18}\
${if_match ${memperc} > 90}\
${color3}\
${else}${if_match ${memperc} > 65}\
${color2}\
${else}\
${color1}\
${endif}${endif}\
${memperc}%\
${font}\
# CPU - use goto because otherwise text can move
${goto 575}\
${color4}\
cpu\
# CPU usage
${goto 630}\
${voffset 4}\
${color1}\
${cpubar cpu0 17,50}\
${voffset -4}\
# Frequency
${goto 730}\
${color #6E9671}\
${freq_g}\
${font}\
${offset 9}\
GHz\
#
# ------------------------------------------------------------
# TEMPERATURE
# CPU (mean of all cores).
# Seems to be no other useful sensor (only wifi and individual cores).
# Use monospace font.
# CPU critical temperature (according to Intel): 100 degrees.
# ------------------------------------------------------------
#
${goto 870}\
# CPU
${font Noto Sans Mono:size=18}\
${if_match ${acpitemp}<65}\
# Pastel green
${color1}\
${else}${if_match ${acpitemp}<75}\
# Pastel yellow
${color2}\
${else}${if_match ${acpitemp}<86}\
# Orange
${color orange}\
${else}${if_match ${acpitemp}<99}\
# Pastel red
${color3}\
${else}\
# Red
${color red}\
${endif}${endif}${endif}${endif}\
${acpitemp}掳\
${font}\
#
# --------
# NETWORK
# --------
${goto 990}\
# -------------------------------------
# (Mainly) wired (ethernet, USB tether)
# -------------------------------------
# ETH0
${if_up enp0s31f6}\
${offset 9}\
${color1}\
Ethernet\
# Usage graph (eth0) - which seems to look vertically offset, so correct that.
${voffset 4}\
${offset 25}\
${color7}\
${downspeedgraph enp0s31f6 29,37 93CC98 B6F51F 9765KiB -t -l}\
# Syntax: ${downspeedgraph <interface> <height> <width> <colour 1> <colour 2> <scale>
# Syntax continued: '-t' at the end enforces a 'temperature [colour] gradient'. '-l' at the very end makes the graph logarithmic.
${offset 7}\
${upspeedgraph enp0s31f6 29,37 93CC98 B6F51F 9765KiB -t -l}\
# 80 megabits / second = 9765 kibibytes.
# 40 megabits / second = 4270 kibibytes.
${voffset -4}\
# vpn
${goto 1340}\
${lua_parse vpn}\
# Firewall (ufw)
${voffset -5}\
${goto 1380}\
${font Symbola:bold:size=26}\
${execpi 7.5 nice -n 1 /home/username/scripts/Conky/sh/ufw_execpi}\
馃洝\
${color}\
${font}\
${voffset -2}\
${else}\
# enp0s20f0u1
${if_up enp0s20f0u1}\
${offset 9}\
${color1}\
USB\
# Usage graph (eth0) - which seems to look vertically offset, so correct that.
${voffset 4}\
${offset 25}\
${color7}\
${downspeedgraph enp0s31f6 29,37 93CC98 B6F51F 9765KiB -t -l}\
# Syntax: ${downspeedgraph <interface> <height> <width> <colour 1> <colour 2> <scale>
# Syntax continued: '-t' at the end enforces a 'temperature [colour] gradient'. '-l' at the very end makes the graph logarithmic.
${offset 7}\
${upspeedgraph enp0s31f6 29,37 93CC98 B6F51F 9765KiB -t -l}\
# 80 megabits / second = 9765 kibibytes.
# 40 megabits / second = 4270 kibibytes.
${voffset -4}\
# vpn
${goto 1350}\
${lua_parse vpn}\
# Firewall (ufw)
${voffset -5}\
${goto 1380}\
${font Symbola:bold:size=26}\
${execpi 7.5 nice -n 1 /home/username/scripts/Conky/sh/ufw_execpi}\
馃洝\
${color}\
${font}\
${voffset -2}\
${else}\
# ---------------------------------------------------------------
# Wireless (aka wifi) ONLY
# I.e. without ethernet
# Sometimes when changing networks,
# wireless_link_qual_perc returns '   unk',
# but seems not way can check for it without throwning an error.name
# Wifi name program, which is C, is insanely fast - but * should not run it at interval < Conky *.
# wifi_considerDisconnect_texeci does weird stuff with the logs, but so do other scripts run via Conky.
# ---------------------------------------------------------------
${if_up wlp2s0}\
# wlp2s0
${if_match ${wireless_link_qual_perc wlp2s0}>69}\
# Green
${color5}\
${else}\
${if_match ${wireless_link_qual_perc wlp2s0}>49}\
# Greeny-yellow
${color6}\
${texeci 16 /home/username/scripts/Conky/sh/wifi_considerDisconnect_texeci}\
${else}\
${if_match ${wireless_link_qual_perc wlp2s0}>29}\
# Pastel yellow
${color2}\
${texeci 12 /home/username/scripts/Conky/sh/wifi_considerDisconnect_texeci}\
${else}\
# Pastel red
{color3}\
${texeci 9 /home/username/scripts/Conky/sh/wifi_considerDisconnect_texeci}\
${endif}\
${endif}\
${endif}\
${texeci 1.95 /home/username/scripts/Conky/c/wifi_name0_texeci}\
# Usage graph (wlp2s0)
${offset 25}\
${voffset 4}\
${color7}\
${downspeedgraph wlp2s0 25,37 93CC98 B6F51F 9765KiB -t -l}\
${offset 7}\
${upspeedgraph wlp2s0 25,37 93CC98 B6F51F 9765KiB -t -l}\
${voffset -4}\
# vpn
${offset 40}\
${lua_parse vpn}\
# Firewall (ufw)
${voffset -5}\
${goto 1380}\
${font Symbola:bold:size=26}\
${execpi 7.5 nice -n 1 /home/username/scripts/Conky/sh/ufw_execpi}\
馃洝\
${color}\
${font}\
${voffset -2}\
${else}\
${if_up bnep0}\
# bnep0 (*sic*) - celullar
${color1}\
CELL\
# Usage graph (bnep0)
${offset 25}\
${voffset 4}\
${color7}\
${downspeedgraph wlp2s0 25,37 93CC98 B6F51F 9765KiB -t -l}\
${offset 7}\
${upspeedgraph wlp2s0 25,37 93CC98 B6F51F 9765KiB -t -l}\
${voffset -4}\
# vpn
${goto 1350}\
${lua_parse vpn}\
#
# Firewall (ufw)
${voffset -5}\
${goto 1380}\
${font Symbola:bold:size=26}\
${execpi 7.5 nice -n 1 /home/username/scripts/Conky/sh/ufw_execpi}\
馃洝\
${color}\
${font}\
${voffset -2}\
${else}\
${color4}\
# NO NETWORK
[ No net ]\
${endif}\
${endif}\
${endif}\
${endif}\
#
# ------
# POWER
# ------
${goto 1465}\
${if_match "${battery}"=="charged"}\
# Charged
${color1}\
AC\
${else}\
# Either charging or discharging.
${offset 9}\
# NB: Script below sets colours and font.
${execpi 4.5 nice -n 2 /home/username/scripts/Conky/sh/battery_execpi_x1_dell}\
${color}\
${endif}\
${color}\
# ---------------------------------------------------------------
# VOLUME
# ---------------------------------------------------------------
${goto 1595}\
${voffset -1}\
${font Symbola:size=24:bold}\
${execpi 3.25 /home/username/scripts/Conky/sh/volSource_execi}\
${font}\
${offset 12}\
${voffset -1}\
${font Noto Sans Mono:size=18}\
${exec /home/username/scripts/Conky/sh/vol_exec}\
${color}\
${font}\
# ---------------------------------------------------------
# BRIGHTNESS & Redshift
# Use monospace font, together with a spacing-aware script.
# ---------------------------------------------------------
${goto 1755}\
${voffset -5}\
${font Symbola:size=24}\
鉀痋
${font}\
${offset 12}\
# The script immediately below sets colour.
${execpi 9 /usr/bin/nice -n 3 /home/username/scripts/Conky/sh/redcheck_execpi}\
# This displays the number.
${exec /home/username/scripts/Conky/c/brightness_exec}\
${color}\
${font}\
# ----------------------------------------------------------------------------
# DATE & TIME
# If use ${offset} here, get problems with right-aligning.
# So, use spaces, with different font size.
# ----------------------------------------------------------------------------
${goto 1920}\
${voffset -3}\
${font Noto Sans:size=20}\
# This (below) is the DAY (abbreviated), followed by a comma and a space.
${time %a}, \
# This (below) is the MONTH (in text, abbreviated and followed by ', ', then as a number in parentheses and preceded by '#',) and YEAR.
${time %-d} ${time %b}. (\#${time %-m}) ${time %Y}\
# This (below) is the TIME (as against date), in this format: 12 hour clock, H:M AM/PM
${goto 2225}\
${font Noto Sans:size=21:bold}\
${time %l}\
:\
${time %M}\
${font}\
# This (below) is the am/pm.
${voffset -2}\
${offset 13}\
${color4}\
${time %p}\
${font}\
# ----------------------------------------------------------------------------
# TICK-TOCK
# ----------------------------------------------------------------------------
${goto 2390}\
${font Symbola:size=22}\
${lua_parse flipFlop}\
#
# ----------------------------------------------------------------------------
# * SECOND ROW - try to put this stuff beneath relevant 1st row stuff.*
# Note blank line below - which seems to give smoother results than 'goto'.
# EDIT: but one blank line is not enough - so use or add an offset
# ----------------------------------------------------------------------------
${voffset 44}\
# ---------------------------------
# BIOS - needs something to have written the file it reads.
# Scripts that run Conky do that.
# ----------------------------------------------------------------------------
${goto 10}${font Noto Sans:size=14}${color #848484}BIOS  ${color #8A9E8A}\
${head /mnt/ramdisk/conky/conky_BIOS 1 60000}\
#----------------------------------------------------------------------------
# Kernel version
# ----------------------------------------------------------------------------
${goto 190}${color #848484}kernel  ${color #8A9E8A}${kernel}\
# ----------------------------------------------------------------------------
# Conky version
# ----------------------------------------------------------------------------
${goto 530}${color #848484}conky  ${color #8A9E8A}${conky_version}\
# ----------------------------------------------------------------------------
# BOOT TIME - needs something to have written the file it reads.
# Scripts that run Conky do that. BUT this script does need to refresh.
# ----------------------------------------------------------------------------
${goto 750}${font Noto Sans:size=14}${color #848484}Boot  ${color #8A9E8A}\
${head /mnt/ramdisk/conky/conky_boot 1 30}\
# ----------------------------------------------------------------------------
# Internal, user mail. Need to have told postfix to use 'maildir' format.
# ----------------------------------------------------------------------------
${goto 976}${font Noto Sans:size=14}${color #848484}Mail  ${color #8A9E8A}\
${unseen_mails /home/username/Maildir}\
# ----------------------------------------------------------------------------
# CPU LOADER; LUA
# ----------------------------------------------------------------------------
${goto 1240}\
${font Noto Sans:size=18}\
${color1}\
${if_match ${cpu cpu0} > 24}\
cpu:  ${top name 1}\
${endif}\
${goto 1700}\
${lua_parse secondRow}\
#
# Comments of any kind after the closing brackets below causes problems.
#
# --------------------------------------------
# * * * END * * *
# --------------------------------------------
#
]]

bug

All 12 comments

Your config does not appear same as the screenshots so I can't bisect this myself to find a commit that changes it. Can you provide a minimal config... or if you want to try and bisect this yourself?

To speed this up, I would test version tags first to find a version that first changes this behavior (from v.10.8), then start bisecting commits between last known working tag and changed tag.

Something like this...

  • git checkout v1.10.8 --> Compile, test with your config
  • git checkout v1.11.0 --> Compile, test with your config
  • git checkout v1.11.1 --> Compile, test with your config
  • git checkout v1.11.2 --> Compile, test with your config
  • git checkout v1.11.3 --> Compile, test with your config
  • git checkout master --> Compile, test with your config

Until you find the version that breaks it, let's say it is v1.11.3, then we go git bisect between the versions to find a bad commit.

To learn more about git bisect, look up https://git-scm.com/docs/git-bisect or other tutorials. You can try following my tiny instruction below.

Something like this...

  • git bisect start
  • git checkout v1.11.2 <--- You tried this earlier above or so. Last version that worked fine for you.
  • Compile, test <-- with your config
  • git bisect good <-- Does it work here? Mark it good
  • git checkout v1.11.3
  • Compile, test <-- with your config
  • git bisect bad <-- Does it break here? Mark it bad

Then it should start checking you out in random places. You have to keep recompiling and test this... again and again and again... narrowing it down to some commit.

Keep going until you get SHA-1_HASH is the first bad commit

Note: 1.10.8 is too far behind so there will be some commits that practically threw things around too.

Thanks. I've started doing this - and discovered that v1.11.3 works - but I am unsure whether, after git checkout, I need to do either a pull or a clone. EDIT: also, after the 'checkout', do I need to do ccmake or just sudo make install? Sometines, ccmake throws an error.

I've got this:

$  git bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[4cb79fb3e1e5ec1d83ce486495164b4cf2684573] Revert "exec.cc: Cache the result to another variable and return it when we have a empty/invalid value. (#646)"

and

$  git bisect good
c352069b31b2dbb4d87503603d6c6d3ddd517df6 is the first bad commit
commit c352069b31b2dbb4d87503603d6c6d3ddd517df6
Author: Kushagra Sinha <[email protected]>
Date:   Sun Mar 3 17:45:02 2019 +0100

    Add support for nested |exec| expressions

    Nested exec expressions like ${execp echo '${execp echo hi}'} are not
    evaluated correctly because parsing expressions like these generates and
    registers new callbacks but we never wait for these callbacks to
    complete before returning the result of the evaluation.

    Fix this by re-evaluating expressions after running all pending
    callbacks.

:040000 040000 888c2e71442198ee08770f50c2cb7fb5a236a36d b97061d365bb1d7465786383c9fcf4c2a0db5956 M  src
:040000 040000 2fbab99d40595a2b8529b07270110156ce301d85 cd132ba6d5281478119906ee68dd623d55f3ba37 M  tests

```
PS: I would still like a reply to my query about pull/clone, though it seems the answer is: no, you don't need that.

EDIT: I did provide my full conky config, except in that my conky calls many scripts (and some compiled programs) and I did not include them.

PS: I would still like a reply to my query about pull/clone, though it seems the answer is: no, you don't need that.

You shouldn't need to do this after doing git clone https://github.com/brndnmtthws/conky once. No need to clone because you already have it (and are on it). No need to pull because you're currently on specific commit / version to find a commit that causes this. If you want to keep up, you would pull from time to time then compile/run or install conky.

EDIT: also, after the 'checkout', do I need to do ccmake or just sudo make install? Sometines, ccmake throws an error.

Not sure if we need to remove build, but I used everything repeatedly... rm -rfv build, mkdir build, cd build, cmake stuffs, make and/or sudo make install. EDIT: If cmake throws error, then either it's broken or you're missing some packages. Hard to tell without error logs.

Thanks. The ccmake error was caused by my issuing the command from the wrong directory.

Do you think my bisection has found the offending commit?

Do you think my bisection has found the offending commit?

I think so. If you did it right, then it's probably right. It won't hurt to test the commits again.

git checkout 4cb79fb # before
git checkout c352069 # offending

Yep. That is the offending commit - I've tested it in the way you proposed.

This git stuff is marvellous once one gets the hang (or begins to get the hang) of it.

So, you'll try to fix the problem now (when you have time, I mean)?

Not me. It would be up to @brndnmtthws or @j4nu5. If you can make a minimal config, then that would be great too as I tried your config with both commits and don't see anything different. Cheers.

Top is master, bottom is (EDIT: before) offending.
2019-04-01_scrot

The problem seems to owe to changing font inside an external script.

image

To generate, use the following conky:

conky.config =
{
        update_interval = 1.21,
        update_interval_on_battery = 1.3,
        total_run_times = 0,
        short_units = true,
        format_human_readable = true,
        no_buffers = true,
        if_up_strictness = "link",
        pad_percents = 2,
        top_name_width = 12,
        double_buffer = true,
        own_window = true,
        own_window_type = 'dock',
        own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
        own_window_transparent = false,
        own_window_argb_visual = true,
        own_window_argb_value = 3,
        gap_x = 70,
        gap_y = 10,
        minimum_height = 80,
        minimum_width = 2560,
        alignment = 'top_left',
        border_outer_margin = 3,
        draw_graph_borders = true,
        use_xft = true,
        override_utf8_locale = true,
        font = 'Noto Sans:size=18',
        draw_shades = false,
        use_spacer = 'left',
        default_color = 'EFEFEF',
}
conky.text = [[
${font}\
${execpi 7 /home/nicholas/scripts/changeFontAndPrintSomething}\
${color}\
${font}\
${voffset -2}\
${offset 500}\
test test test\
#
]]

with the following script.

#!/bin/sh
readonly FONT='${font Symbola:size=20:bold}'
OUTPUT="$FONT"'textFromWithinSh'
printf "%s" "$OUTPUT"
# EOF

I am afraid I can't do much more work on this.

I am afraid I can't do much more work on this

This minimal config is great and will do just fine. Top is before offending, bottom is master.
2019-04-01_test-scrot

I might go back to my repo's version of Conky and check. But I am afraid I don't fancy bisecting that one.

If you want, you can try starting with v1.11.3 and work your way down slowly with versions before you start bisecting because it is much much longer if we don't narrow down the range first. If it's not happening on v1.11.3, then it might be recent (i.e. maybe same offending commit).

Your choice. We're not in hurry to get more bugs reported and Conky can always use more help/volunteers/contributors/et cetera.

OK - I've done the bisection on the test config. I have the following result (which, at least up to a point, I have verified).

c352069b31b2dbb4d87503603d6c6d3ddd517df6 is the first bad commit
commit c352069b31b2dbb4d87503603d6c6d3ddd517df6
Author: Kushagra Sinha <[redacted]>
Date:   Sun Mar 3 17:45:02 2019 +0100

    Add support for nested |exec| expressions

    Nested exec expressions like ${execp echo '${execp echo hi}'} are not
    evaluated correctly because parsing expressions like these generates and
    registers new callbacks but we never wait for these callbacks to
    complete before returning the result of the evaluation.

    Fix this by re-evaluating expressions after running all pending
    callbacks.

:040000 040000 888c2e71442198ee08770f50c2cb7fb5a236a36d b97061d365bb1d7465786383c9fcf4c2a0db5956 M  src
:040000 040000 2fbab99d40595a2b8529b07270110156ce301d85 cd132ba6d5281478119906ee68dd623d55f3ba37 M  tests

This seems fixed in the latest release (appImage) version.

EDIT: and in the latest from git (which is a 1.11.7-pre version) it is fixed too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zero77 picture zero77  路  3Comments

Microcrap picture Microcrap  路  4Comments

fonic picture fonic  路  3Comments

LeoIannacone picture LeoIannacone  路  3Comments

Dimerbone picture Dimerbone  路  4Comments