Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: append_file doesn't append to config #1971

Closed
CaeriTech opened this issue Jun 11, 2024 · 1 comment
Closed

[Bug]: append_file doesn't append to config #1971

CaeriTech opened this issue Jun 11, 2024 · 1 comment
Labels
wontfix Won't be fixed: not a conky bug, unreasonable effort or can't fix due to external limitations

Comments

@CaeriTech
Copy link

What happened?

Conky fails with the following errors when I use append_file for common settings:

conky: can't load font '6x10'
conky: can't load font 'fixed'

However, if I add 'use_xft = true,' to the .lua config instead of the append_file it works as expected.

Is setting 'use_xft' supported in an append file?

Version

1.21.2-1

Which OS/distro are you seeing the problem on?

Arch Linux

Conky config

###
### append file
###
--
-- conf~common
--
-- out_to_x = yes,
-- out_to_wayland = yes,
use_xft = true,
font = "DejaVuSans :size=12:",
default_color = "E9E9E9",
default_shade_color = "202020",
default_outline_color = "232323",
xftalpha = 1,
draw_shades = false,
draw_borders = false,
own_window = true,
own_window_type = "override",
own_window_transparent = true,
own_window_argb_visual = true,
own_window_argb_value = 155,
own_window_hints = "undecorated,below,above,sticky,skip_taskbar,skip_pager",
double_buffer = true,
no_buffers = true,

###
### conky .lua file
###

conky.config = {
--
-- conf~journal.lua
--
append_file = "/home/caeri/conf~common",
text_buffer_size = 1024,
max_user_text = 1024,
alignment = "top_left",
gap_x = 10,
gap_y = 10,
max_text_width = 0,
minimum_width = 385,
maximum_width = 385,
net_avg_samples = 10,
update_interval = 5
}
conky.text = [[
\
#---------------------------------------------------------------------------------------------
${alignr}${font :size=9:style=bold:}${color}journal
${voffset -004}\
\
${font :style=bold:size=6:}${color}\
${exec journalctl --output=cat --lines=6}
]]

Stack trace

No response

Relevant log output

No response

@CaeriTech CaeriTech added bug Bug report or bug fix PR triage Issue that hasn't been verified labels Jun 11, 2024
@Caellian
Copy link
Collaborator

Caellian commented Jul 4, 2024

append_file appends to file output, it doesn't execute lua code in the config. Use normal Lua imports instead, I recently added support for relative imports so you can place conf~common.lua with a table containing common options next to your scripts then import it.

But it won't be added to conky.config automatically - you'll have to merge tables and assign the merged table to conky.config.

The issue is that documentation for append_file doesn't specify clearly enough that it will make conky append text to specified file, so I'm closing it in favor of #1800.

@Caellian Caellian added wontfix Won't be fixed: not a conky bug, unreasonable effort or can't fix due to external limitations and removed bug Bug report or bug fix PR triage Issue that hasn't been verified labels Jul 4, 2024
@Caellian Caellian closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
@Caellian Caellian changed the title [Bug]: conky: can't load font '6x10' [Bug]: append_file doesn't append to config Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Won't be fixed: not a conky bug, unreasonable effort or can't fix due to external limitations
Projects
None yet
Development

No branches or pull requests

2 participants