Open feuGeneA opened 5 years ago
(Unrelated) Your config is reporting this issue.
conky: can't load Xft font ''DejaVu Sans:style=Bold:size=12''
diff --git a/776.conf b/776.conf
index 9dd640d..d09f507 100644
--- a/776.conf
+++ b/776.conf
@@ -48,5 +48,5 @@ ${voffset -3} up${downspeedgraph wlp2s0 00ff00 ff0000 -t}
${voffset -10}down${upspeedgraph wlp2s0 00ff00 ff0000 -t}
${voffset -6}Battery ${battery_percent}% ${battery_bar 4}
${voffset -4}$stippled_hr
-${font 'DejaVu Sans:style=Bold:size=12'}${alignc}${time %l:%M %P %Z}
+${font DejaVu Sans:style=Bold:size=12}${alignc}${time %l:%M %P %Z}
${alignc}${time %a, %b %d, %Y}]]
I think the real issue is caused by various graph
variables rather than voffset
variables.
(Unrelated) Your config is reporting this issue.
conky: can't load Xft font ''DejaVu Sans:style=Bold:size=12''
Interesting, I don't see that message, and changing that font spec (eg, changing the size or style) does have an effect. However, it's also worth noting (again) that when I enable debugging with -DD
I get a seemingly infinite loop of these messages, emitted about twice a second:
DEBUG(1) [/home/gene/Downloads/conky-1.11.2/src/fonts.cc:149]: loading fonts
DEBUG(1) [/home/gene/Downloads/conky-1.11.2/src/fonts.cc:94]: setting up fonts
I tried removing the quotes like in your suggestion, but these messages continued to be emitted.
Pinging @brndnmtthws about -DD
printing loading fonts
+ setting up fonts
repeatedly.
Omitting quotes loads the nice bold font for me on Arch. I assume your font works for you just fine on Debian (?). I wanted to point out this possible small issue with your font (or rather my font). It does not matter as long as it works fine. Cheers.
If you omit all graph
variables from your config, does the window size looks correct now?
Regarding the fonts, there shouldn't be quotes around the name.
Yes, if I eliminate the graphs from my config, everything looks right. (Except of course that now some text is overlapping. :smile:)
Interestingly, specifying the graph size seems to have a significant effect.
(Note that in my original config, I was not specifying graph sizes at all.)
If I set the graph size to 10,100, the dead space increases significantly:
After some experimentation, I found that graph size 3,100 looks good:
But graph size 4,100 introduces dead space:
I hope that helps!
same problem
conky.config={
alignment= 'top_right',
gap_x= 20,
gap_y= 0,
background= true,
own_window= true,
own_window_type= 'desktop',
--own_window_transparent= true,
--own_window_hints= 'undecorated,below,sticky,skip_taskbar,skip_pager',
--own_window_colour= '000000',
--own_window_argb_visual= true,
--own_window_argb_value= 100,
double_buffer= true,
override_utf8_locale= true,
draw_shades= true,
draw_outline= false,
draw_borders= false,
draw_graph_borders= false,
short_units= true,
format_human_readable= true,
update_interval= 1,
total_run_times= 0,
minimum_width= 400,
maximum_width= 400,
--minimum_height= 60,
default_color= 'FFFFFF',
default_shade_color= 'grey80',
default_outline_color= 'black',
color1 = 'CA6214',
color2 = '616161',
no_buffers= true,
text_buffer_size = 2048,
cpu_avg_samples= 2,
net_avg_samples= 2,
diskio_avg_samples= 2,
use_xft= true,
xftalpha= .1,
uppercase= false,
font1= 'NoTo Sans Mono CJK SC:style=Bold:size=28',
font2= 'NoTo Sans Mono CJK SC:style=Bold:size=15',
font3= 'NoTo Sans Mono CJK SC:style=Bold:size=11'
}
conky.text=[[
#时间日期
${color1}${alignr}${font1}${time %H:%M}${font}
${color1}${alignr}${font2}${time %Y %B %d %A}${font}
${font3}${moc_song} - ${moc_artist}${font}${alignr}${font3}${moc_curtime}/${moc_totaltime}${font}
#音乐信息
#主机信息
${color1}${font2}Host:${color2}${exec whoami}${font}${hr}
${color2}${goto 50}${font3}Kernel${alignr 50}${kernel}-${machine}${font}
${color2}${goto 50}${font3}Uptime${alignr 50}${uptime}${font}
${color2}${goto 50}${font3}Battery${alignr 50}${battery_percent}%${font}
${hr}
#内存信息
${color1}${font2}MEM: ${color2}${memperc}%${goto 150}${font3}${mem}/${memmax}${alignr}${membar 12,100}${font}
${color1}${font2}SWAP:${color2}${swapperc}%${goto 150}${font3}${swap}/${swapmax}${alignr}${swapbar 12,100}${font}
#cpu信息
${color1}${font2}CPU: ${color2}${cpu}%${font}${hr}
${voffset -10}${alignc}${cpugraph 40,300 8ADDFB 040CA7 -t}
#网络流量
#wifi
${color1}${font2}NET:${color2}${font}${hr}
${if_up wlp1s0}${color1}${goto 50}${font3}Wifi:wlp1s0${alignr 50}${addr wlp1s0}${font}
${color2}${font3}${goto 50}Down:${downspeed wlp1s0}/S${goto 210}Up:${upspeed wlp1s0}/S${font}
${voffset -10}${goto 10}${goto 50}${downspeedgraph wlp1s0 30,140 8ADDFB 040CA7 -t}${goto 210}${upspeedgraph wlp1s0 30,140 8ADDFB 040CA7 -t}${endif}
#eth
${if_up wlp1s0}${color1}${goto 50}${font3}Eth:enp2s0${alignr 50}${addr enp2s0}${font}
${color2}${font3}${goto 50}Down:${downspeed enp2s0}/S${goto 210}Up:${upspeed enp2s0}/S${font}
${voffset -10}${goto 10}${goto 50}${downspeedgraph enp2s0 30,140 8ADDFB 040CA7 -t}${goto 210}${upspeedgraph enp2s0 30,140 8ADDFB 040CA7 -t}${endif}
#磁盘读写
#/dev/sda
${voffset -15}${if_existing /dev/sda}${color1}${font2}/dev/sda${font}
${color2}${goto 50}${font3}Read:${diskio_read /dev/sda}/S${goto 210}Write:${diskio_write /dev/sda}/S${font}
${voffset -10}${goto 50}${diskiograph_read /dev/sda 30,140 8ADDFB 040CA7 -t}${goto 210}${diskiograph_write /dev/sda 30,140 8ADDFB 040CA7 -t}${endif}
#/dev/sdb
${voffset -15}${if_existing /dev/sda}${color1}${font2}/dev/sdb${font}
${color2}${goto 50}${font3}Read:${diskio_read /dev/sdb}/S${goto 210}Write:${diskio_write /dev/sdb}/S${font}
${voffset -10}${goto 50}${diskiograph_read /dev/sdb 30,140 8ADDFB 040CA7 -t}${goto 210}${diskiograph_write /dev/sdb 30,140 8ADDFB 040CA7 -t}${endif}
#/dev/sdc
${voffset -15}${if_existing /dev/sda}${color1}${font2}/dev/sdc${font}
${color2}${goto 50}${font3}Read:${diskio_read /dev/sdc}/S${goto 210}Write:${diskio_write /dev/sdc}/S${font}
${voffset -10}${goto 50}${diskiograph_read /dev/sdc 30,140 8ADDFB 040CA7 -t}${goto 210}${diskiograph_write /dev/sdc 30,140 8ADDFB 040CA7 -t}${endif}
#/dev/sdd
${voffset -15}${if_existing /dev/sda}${color1}${font2}/dev/sdd${font}
${color2}${goto 50}${font3}Read:${diskio_read /dev/sdd}/S${goto 210}Write:${diskio_write /dev/sdd}/S${font}
${voffset -10}${goto 50}${diskiograph_read /dev/sdd 30,140 8ADDFB 040CA7 -t}${goto 210}${diskiograph_write /dev/sdd 30,140 8ADDFB 040CA7 -t}${endif}
]]
Problem is right here, at the end of conky.text variable:
... ${voffset -10}${goto 50}${diskiograph_read /dev/sdd 30,140 8ADDFB 040CA7 -t}${goto 210}${diskiograph_write /dev/sdd 30,140 8ADDFB 040CA7 -t}${endif} ]]
In lua if you write:
var = [[
something
something
something
]]
it means new empty string at the end. If you don't need empty string, you must write
var = [[
something
something
something]]
Empty string may occur in some configs, but is not the source of the problem here.
This happens many times with simple and complex configurations.
A work around for this is to use #
hash character at the end of the line - this is a continuation character similar to using \
at the end of a shell script line - used for readability.
It will depend how many lines you use it at and for some lines it may not work due to the nature of the line. You will need to see for your config as the balance empty space gets removed.
cheers
I've the same issue. My workaround was to put negative value to gap_y
, just hiding the space offscreen. Which is obviously not elegant at all.
Same for me.
This is annoying because my wallpaper is changed automatically by a script and the part of it that is covered by conky is "remembered" by conky and remains the old wallpaper until conky updates. I aligned everything so conky does not overlay the updated parts, but this doesn't work when conky gets bigger than it should. Border only for illustration.
Perhaps you have line(s) with spaces or line feed(s) at the end of your script.
No. The problem is that conky ignores all (negative) voffset statements when calculating the space it occupies.
same issue here. conky 1.15.0-1
Question
I'm using negative
voffset
to achieve a more compact display, and generally I'm happy with it. However, after having scooted everything upwards like that, it seems that the window dimensions have not changed, leaving dead space at the bottom:How can I eliminate this dead space? Shouldn't conky know to shrink the overall height when items have been moved up with a negative
voffset
?Information
OS version
``` gene@precision5510:~$ uname -a Linux precision5510 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux gene@precision5510:~$ cat /etc/debian_version 9.7 ```conky version
``` conky 1.11.2_pre compiled Tue Jan 29 12:54:17 EST 2019 for Linux 4.9.0-8-amd64 x86_64 Compiled in features: System config file: /etc/conky/conky.conf Package library path: /opt/conky/lib/conky General: * math * hddtemp * portmon * IPv6 * Curl * Weather (METAR) * support for IBM/Lenovo notebooks * builtin default configuration * old configuration syntax * Imlib2 * OSS mixer support * apcupsd * iostats * ncurses * Internationalization support X11: * Xdamage extension * Xinerama extension (virtual display) * Xshape extension (click through) * XDBE (double buffer extension) * Xft * ARGB visual * Own window Music detection: * CMUS * MPD * MOC Default values: * Netdevice: eth0 * Local configfile: $HOME/.conkyrc * Localedir: /opt/conky/share/locale * Maximum netdevices: 64 * Maximum text size: 16384 * Size text buffer: 256 ```~/.conkyrc
```lua conky.config = { alignment = 'top_left', background = false, border_width = 1, cpu_avg_samples = 2, default_color = 'white', default_outline_color = 'white', default_shade_color = 'white', draw_borders = false, draw_graph_borders = true, draw_outline = false, draw_shades = false, use_xft = true, font = 'DejaVu Sans Mono:size=8', gap_x = 5, gap_y = 60, minimum_height = 5, minimum_width = 239, net_avg_samples = 2, no_buffers = true, out_to_console = false, out_to_stderr = false, extra_newline = false, own_window = true, own_window_class = 'Conky', own_window_type = 'dock', stippled_borders = 0, update_interval = 1.0, uppercase = false, use_spacer = 'none', show_graph_scale = false, show_graph_range = false, double_buffer = true, top_name_width = 8 } conky.text = [[ ${voffset -4}CPU ${voffset -4}${cpugraph 00ff00 ff0000 -t} ${voffset -20}$cpu% ${voffset -1} Temps: ${platform coretemp.0/hwmon/hwmon4 temp 1 1.8 32.0}, ${platform coretemp.0/hwmon/hwmon4 temp 2 1.8 32.0}, ${platform coretemp.0/hwmon/hwmon4 temp 3 1.8 32.0}, ${platform coretemp.0/hwmon/hwmon4 temp 4 1.8 32.0}, ${platform coretemp.0/hwmon/hwmon4 temp 5 1.8 32.0} Top hog: ${top name 1} @ ${top cpu 1}% RAM ${voffset -4}${memgraph 00ff00 ff0000 -t} ${voffset -20}$memperc% Top hog: ${top_mem name 1} @ ${top_mem mem 1}% SSD ${fs_used_perc /}% full (${fs_used /}/${fs_size /}) ${fs_bar /} wlp2s0 ${upspeedf wlp2s0} KiB up, ${downspeedf wlp2s0} KiB down ${voffset -3} up${downspeedgraph wlp2s0 00ff00 ff0000 -t} ${voffset -10}down${upspeedgraph wlp2s0 00ff00 ff0000 -t} ${voffset -6}Battery ${battery_percent}% ${battery_bar 4} ${voffset -4}$stippled_hr ${font 'DejaVu Sans:style=Bold:size=12'}${alignc}${time %l:%M %P %Z} ${alignc}${time %a, %b %d, %Y}]] ```