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.17k stars 615 forks source link

conky is not working in fedora 24 #276

Closed rudrab closed 8 years ago

rudrab commented 8 years ago

Hi, I am using conky from fedora repo(conky-1.10.1-5.20160413git06f87b.fc24.x86_64) which shows:

conky --version
conky 1.10.2_pre compiled Tue May  3 16:46:32 UTC 2016 for Linux 4.4.6-301.fc23.x86_64 x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib64/conky

 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * Internationalization support
  * Debugging extensions

 Lua bindings:
  * Cairo
  * Imlib2
 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * MPD

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

while running my conky, I am getting error:

$ conky 
conky: Syntax error (/home/rudra/.conkyrc:2: syntax error near 'tr') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:151: [string "converted config"]:53: unexpected symbol near '}'

My conkyrc is very normal and using it for long (f16 days). I am pasting it:

#.conkyrc
alignment tr
background no
update_interval 1

double_buffer yes

use_xft yes
xftfont freeserif:size=10

# Text alpha when using Xft
xftalpha 0.8

maximum_width 210
minimum_size 210 0
draw_shades no
gap_x 0
gap_y 30

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

own_window yes
#own_window_type normal
own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 100
own_window_hints undecorated,below,sticky,skip_taskbar

#stippled_borders 0
#uppercase no
#use_spacer none
#show_graph_scale no
#show_graph_range no

#COLOURS
#default_color 262626
default_color ffffff
#headers
#color1 0833d2
color1 508cfa

imlib_cache_size 0
###  LUA Settings  ###########################################################
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
#
## Above and After TEXT - After requires a composite manager or blinks.
#
lua_load ~/bin/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## OR Both above TEXT (No composite manager required - no blinking!)
#
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
# use: pre or post
#lua_draw_hook_post draw_bg 10 0 0 0 0 0x000000 0.2
#######################################################  End LUA Settings  ###

TEXT
${lua conky_draw_bg 15 55 195 120 120 0x000000 0.8}
${voffset -30}
${goto 25}${font freeserif:size=20:bold}${exec whoami}@${nodename}
${voffset -15}${goto 105}${color1}${font openlogos:size=50}O${font}${color}
${voffset -40}${font English:size=20:bold}System${voffset 2}$stippled_hr ${font} 
${color1}${font evanescent:size=15}Load:$font${goto 80}${font freeserif:size=13}${color} $loadavg
${voffset 0}${color1}${font evanescent:size=18}CPU$stippled_hr$font${color} 
${offset 10}1:${cpubar 6,40 }${goto 70}${cpu cpu1}% ${goto 110} 2:${cpubar 6,40 }${goto 170}${cpu cpu2}%
${offset 10}3:${cpubar 6,40 }${goto 70}${cpu cpu3}% ${goto 110} 4:${cpubar 6,40 }${goto 170}${cpu cpu4}%
${offset 10}5:${cpubar 6,40 }${goto 70}${cpu cpu5}% ${goto 110} 6:${cpubar 6,40 }${goto 170}${cpu cpu6}%
${offset 10}7:${cpubar 6,40 }${goto 70}${cpu cpu7}% ${goto 110} 8:${cpubar 6,40 }${goto 170}${cpu cpu8}%
${voffset -15}
${color1}${font evanescent:size=15}RAM:$font ${font freeserif:size=12}${color}$mem ${alignr}${color1}${font evanescent:size=15}Swap:$font ${font freeserif:size=12}${color}$swap
${voffset 100}${execi 10  cd `shuf -n1 -e ~/Pictures/201*/*/*`; /usr/bin/convert  -format png -resize 160x120 -alpha set -virtual-pixel transparent -channel A -blur 0x8  -threshold 50% +channel "`/bin/ls *JPG *.jpg 2>/dev/null | /usr/bin/shuf -n1`" /dev/shm/current.png}${image /dev/shm/current.png -p 50,190 -n -s 120x120}
${voffset 10}${font English:size=20:bold}Processes${voffset 2}$stippled_hr ${font}
${voffset -20}
${color1}${font evanescent:size=15}Name ${goto 130}PID${goto 175}CPU$font${color}
${top name 1} ${goto 122}${top pid 1}${goto 170}${top cpu 1}
${top name 2} ${goto 122}${top pid 2}${goto 170}${top cpu 2}
${top name 3} ${goto 122}${top pid 3}${goto 170}${top cpu 3}${font}
${color1}${font evanescent:size=15}Memory ${goto 130}PID${goto 175}MEM$font${color}
${top_mem name 1} ${goto 122}${top_mem pid 1}${goto 170}${top_mem mem 1}
${top_mem name 2} ${goto 122}${top_mem pid 2}${goto 170}${top_mem mem 2}
${top_mem name 3} ${goto 122}${top_mem pid 3}${goto 170}${top_mem mem 3}${color}${font}
${voffset 05}${font English:size=20:bold}Network${voffset 2}$stippled_hr ${font}
${if_existing /sys/class/net/enp6s0/operstate up}
${voffset -50}${offset 130}${font cellpic:size=25}U${font}
${voffset -5}${font evanescent:size=25} ${alignc}${color1}${addr enp6s0}
${voffset -10}${goto 20}${font PizzaDude Bullets:size=14}S${font}$color  ${downspeed enp6s0}/s${goto 120}${color1}${font PizzaDude Bullets:size=14}M${font}$color ${upspeed enp6s0}/s
${color1}${goto 20}${font PizzaDude Bullets:size=14}U${font} $color${totaldown enp6s0} ${goto 120} ${color1}${font PizzaDude Bullets:size=14}O${font}  $color${totalup enp6s0}
${else}
${if_existing /sys/class/net/wlp3s0/operstate up}
${voffset -75}${offset 130}${font cellpic:size=30}H${font}
${voffset -5}${font evanescent:size=25} ${alignc}${color1}${addr wlp3s0}
${voffset -10}${goto 20}${font PizzaDude Bullets:size=14}S${font}$color  ${downspeed wlp3s0}/s${goto 120}${color1}${font PizzaDude Bullets:size=14}M${font}$color ${upspeed wlp3s0}/s
${color1}${goto 20}${font PizzaDude Bullets:size=14}U${font} $color${totaldown wlp3s0} ${goto 120} ${color1}${font PizzaDude Bullets:size=14}O${font}  $color${totalup wlp3s0}
${else}
${voffset -50}${offset 130}${font cellpic:size=20}*${font}
 ${voffset 00}${color f50000}Not connected to Internet ${hr 1}${color}
${endif}
${endif}
${voffset -5}${font English:size=20:bold}World Clock${voffset 2}$stippled_hr ${font}
${color1}${font evanescent:size=18}Kolkata:${font}${color} ${voffset -07}${goto 140}${font  freeserif:size=15:bold}${tztime Asia/Kolkata  %H:%M}

The drw-bg.lua script is also very old script, so I am not pasting it (this is not written by me).

ghost commented 8 years ago

The syntax of the conky config files has changed (a lot) for conky version 1.10 and onwards. You seem to use the conky 1.9 syntax so you will have to update your config (ps: lua files will still work on both, no need to change them) or have to revert to an older version of conky (1.9.1 or previous).

There is no extensive guide on how to change/update your config file but here are some tips and tricks. If you encounter something which is not covered by the wiki page please feel free to expand it or report it on this github.

chepioq commented 8 years ago

I agree with Nooby4Ever. I test Fedora 24 and conky 1.10 work well after rewrite all my conky with the new syntax. Example : `conky.config = { double_buffer = true, background = false , use_xft = true, font = "MgOpen Modata L:size=7:bold", update_interval = 1, total_run_times = 0, own_window = true, own_window_type = 'normal', own_window_transparent = true, own_window_argb_visual = true, own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',

draw_shades = false, draw_outline = false, draw_borders = false, draw_graph_borders = true, default_color = 'white', alignment = 'top_right', gap_x = 12, gap_y = 250, no_buffers = true, uppercase = false, cpu_avg_samples = 2, net_avg_samples = 2, override_utf8_locale = true, text_buffer_size = 4096,

color1 = '00f5ff', color2 = 'cd5555', color3 = '11B3F8', color4 = '0000ff', color5 = '176e88', color6 = 'ff4500', color7 = '00FF00', color8 = 'FF8000', color9 = 'FF0000',

}

conky.text = [[ ${font Waltograph UI:size=12:bold} ${alignc} ${color1}${exec lsb_release -irs} ${exec lsb_release -sc}

${font} ${alignc} ${color2}Kernel : ${color3}${exec uname -r} ${alignc}${color2}Démarrage : ${color3}${exec systemd-analyze time | awk '{print $13}'}

${alignc}${color2}Système de fichiers ouvert depuis: ${color3}$uptime

${color1}${membar 0,170} ${color3}CPU ${color1}${membar 0,170} ${alignc}${color2}Processeur : ${color3}${exec grep -i -m 1 'Model name' /proc/cpuinfo |sed 's/^.: //'| sed -e 's/([^()])//g' } ${alignc}${color2}Pilote : ${color3}${exec cpupower frequency-info |grep pilote | awk '{print $3}'} ${color2}Fréquence CPU 1 : ${color3}${freq 1} MHz ${goto 200}${color2}Fréquence CPU 2 : ${color3}${freq 2} MHz ${color2}Fréquence CPU 3 : ${color3}${freq 3} MHz ${goto 200}${color2}Fréquence CPU 4 : ${color3}${freq 4} MHz ${color4}${cpugraph cpu1 20,181 00ff00 ff0004 -t} ${color4}${cpugraph cpu2 20,181 00ff00 ff0004 -t} ${color4}${cpugraph cpu3 20,181 00ff00 ff0004 -t} ${color4}${cpugraph cpu4 20,181 00ff00 ff0004 -t} ${color2}Utilisation Core 1 : ${color3}${cpu cpu1}%${goto 200}${color2}Utilisation Core 2 : ${color3}${cpu cpu2}% ${color2}Utilisation Core 3 : ${color3}${cpu cpu3}%${goto 200}${color2}Utilisation Core 4 : ${color3}${cpu cpu4}% ${color2}Température Core 1 : ${execpi 6 sensors | awk '/Core 0/ {gsub(/+/,"",$3); gsub(/..+/,"",$3); print $3}' | xargs /home/dominique/.conkyrc/conky_monitor/colorizeCPU.sh}°C${goto 200}${color2}Température Core 2 : ${color3}${execpi 6 sensors | awk '/Core 1/ {gsub(/+/,"",$3); gsub(/..+/,"",$3); print $3}' | xargs /home/dominique/.conkyrc/conky_monitor/colorizeCPU.sh}°C

${color1}${membar 0,170} ${color3}GPU ${color1}${membar 0,170} ${color2}Carte Graphique : ${color3}GeForce GT 525M ${color2}Pilote NVidia : ${color3}Nouveau

${color2}Température GPU : ${color3}${nvidia temp}°C

${color1}${membar 0,170} ${color3}DD ${color1}${membar 0,175} ${alignc}${color2} Disque dur : ${color3} Samsung SSD 840 PRO 256 Go ${alignc}${color2}Accès disque ${color2}${goto 70}Lecture : ${color3}${diskio_read} ${color2}${goto 250}Ecriture : ${color3}${diskio_write} ${diskiograph_read 20,181 00ff00 ff0000 -t} ${diskiograph_write 20,181 00ff00 ff0000 -t} ${color1}${membar 0,170} ${color3}RAM ${color1}${membar 0,170} ${color2}Utilisation RAM ${color5}${alignc} Totale Utilisée Pourcentage ${alignc} ${color3}${goto 120}$memmax${goto 195}$mem${goto 290}$memperc% ${color4}${memgraph 20,364 00ff00 ff0004 -t} ${color1}${membar 0,170} ${color3}SWAP ${color1}${membar 0,162} ${color2}Utilisation Swap : ${color3} $swap/$swapmax - $swapperc% ${color1} ${swapbar 8,165}

${color1}${membar 0,160} ${color3}RESEAU ${color1}${membar 0,162} ${color5}Reception :${color6} ${downspeedf enp4s0} k/s${goto 200}${color3}Envoi : ${color6}${upspeedf enp4s0} k/s ${color5}Total : ${color6} ${totaldown enp4s0}${goto 200}${color3}Total :${color6} ${totalup enp4s0} ${color4}${downspeedgraph enp4s0 20,181 00ff00 ff0004 -t} ${color1}${upspeedgraph enp4s0 20,181 00ff00 ff0004 -t} ${color1}${membar 0,130} ${color3}SYSTEME DE FICHIERS ${color1}${membar 0,120} ${color2}Système ${color3} ${fs_used /} / ${fs_size /} : ${goto 160}${color1}${fs_bar 6,208 /} ${color2}Home ${color3} ${fs_used /home} / ${fs_size /home} : ${goto 160}${color1}${fs_bar 6,208 /home}

${color1}${membar 0,170} ${color3}TOP ${color1}${membar 0,170} ${color2}${alignc}Processus : ${color3}$processes ${color3}En cours : ${color6}$running_processes

${color5}En cours : ${alignc} PID ${goto 180}CPU% MEM% ${color6} ${top name 1} ${alignc} ${top pid 1} ${goto 180}${top cpu 1} ${top mem 1} ${color3} ${top name 2} ${alignc} ${top pid 2} ${goto 180}${top cpu 2} ${top mem 2} ${color3} ${top name 3} ${alignc} ${top pid 3} ${goto 180}${top cpu 3} ${top mem 3} ${color5}En mémoire : ${color6} ${top_mem name 1} ${alignc} ${top_mem pid 1} ${goto 180}${top_mem cpu 1} ${top_mem mem 1} ${color3} ${top_mem name 2} ${alignc} ${top_mem pid 2} ${goto 180}${top_mem cpu 2} ${top_mem mem 2} ${color3} ${top_mem name 3} ${alignc} ${top_mem pid 3} ${goto 180}${top_mem cpu 3} ${top_mem mem 3} ]] `

rudrab commented 8 years ago

Thanks a lot. I checked and its working now. Closing it