Chinaunix首页 | 论坛 | 博客
  • 博客访问: 875498
  • 博文数量: 204
  • 博客积分: 2433
  • 博客等级: 大尉
  • 技术积分: 2205
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-05 13:32
文章分类

全部博文(204)

分类: LINUX

2017-01-18 22:52:30

如果conky出现:

点击(此处)折叠或打开

  1. conky: Syntax error (/home/xxx/.conkyrc:1: syntax error near 'yes') while reading config file.
  2. conky: Assuming it's in old syntax and attempting conversion.
这是因为conky使用了新的语法,可以使用:/usr/share/doc/conky-1.10.6_pre/convert.lua ~/.conkyrc转换,以下是转换后的配置:

点击(此处)折叠或打开

  1. conky.config = {
  2. background = true,
  3. cpu_avg_samples = 2,
  4. net_avg_samples = 2,
  5. out_to_console = false,
  6. use_xft = true,
  7. font = 'FreeSans:size=10',
  8. own_window_transparent = false,
  9. --own_window_colour hotpink
  10. xftalpha = 0.8,
  11. -- on_bottom yes
  12. --mail_spool $MAIL
  13. update_interval = 1,
  14. own_window = true,
  15. own_window_argb_visual = true,
  16. own_window_transparent = true,
  17. own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
  18. --own_window_type override
  19. double_buffer = true,
  20. minimum_width = 260, minimum_height = 5,
  21. maximum_width = 400,
  22. draw_shades = false,
  23. draw_outline = false,
  24. draw_borders = false,
  25. stippled_borders = no,
  26. --border_margin 4
  27. border_width = 1,
  28. default_color = 'white',
  29. default_shade_color = 'white',
  30. default_outline_color = 'white',
  31. --alignment top_left
  32. --minimum_size 10 10
  33. gap_x = 0,
  34. gap_y = 35,
  35. alignment = 'top_right',
  36. --alignment bottom_left
  37. --alignment bottom_right
  38. use_spacer = 'none',
  39. no_buffers = true,
  40. uppercase = false,
  41. };
  42. conky.text = [[
  43. ${color #ffa200}${font Freesans:size=20}S${font Freesans:size=10}YSTEM ${hr 1}${color}
  44. Hostname: $alignr$nodename
  45. Kernel: $alignr$kernel
  46. Uptime: $alignr$uptime
  47. Temp: ${alignr}${acpitemp}°C
  48. Login User: ${alignr}${exec whoami}
  49. CPU: ${alignr}${freq dyn} MHz
  50. Processes: ${alignr}$processes ($running_processes running)
  51. Load: ${alignr}$loadavg
  52. ${color #ffa200}${font Freesans:size=20}C${font Freesans:size=10}PU${hr 1}
  53. ${color}CPU0 ${alignr}${cpu cpu0}%
  54. ${color #78af78}${cpubar 4 cpu0}
  55. ${color}CPU1 ${alignr}${cpu cpu1}%
  56. ${color #78af78}${cpubar 4 cpu1}
  57. ${color}CPU2 ${alignr}${cpu cpu2}%
  58. ${color #78af78}${cpubar 4 cpu2}
  59. ${color}CPU3 ${alignr}${cpu cpu3}%
  60. ${color #78af78}${cpubar 4 cpu3}
  61. ${color}CPU4 ${alignr}${cpu cpu4}%
  62. ${color #78af78}${cpubar 4 cpu4}
  63. ${color}CPU5 ${alignr}${cpu cpu5}%
  64. ${color #78af78}${cpubar 4 cpu5}
  65. ${color}CPU6 ${alignr}${cpu cpu6}%
  66. ${color #78af78}${cpubar 4 cpu6}
  67. ${color}CPU7 ${alignr}${cpu cpu7}%
  68. ${color #78af78}${cpubar 4 cpu7}
  69. ${color}${top name 1}${alignr}${top cpu 1}%
  70. ${color #ffa200}${font Freesans:size=20}F${font Freesans:size=10}ILE ${font Freesans:size=20}S${font Freesans:size=10}YSTEM ${hr 1}${color}
  71. ${color}READ${alignr}${color}${diskio_read sda}
  72. ${color}WRITE${alignr}${color}${diskio_write sda}
  73. Root: ${alignr}${fs_free /} / ${fs_size /}
  74. ${fs_bar 4 /}
  75. Home: ${alignr}${fs_free /home} / ${fs_size /home}
  76. ${fs_bar 4 /home}
  77. ${color #ffa200}${font Freesans:size=20}M${font Freesans:size=10}EMORY${hr 1}
  78. ${color}Ram ${alignr}$mem / $memmax ($memperc%)
  79. ${membar 4}
  80. ${color}swap ${alignr}$swap / $swapmax ($swapperc%)
  81. ${swapbar 4}
  82. ${color #ffa200}${font Freesans:size=20}N${font Freesans:size=10}VIDIA ${hr 1}${color}
  83. ${color}Temp ${alignr}${exec nvidia-settings -q gpucoretemp -t}°C
  84. ${color}GPU Clock ${alignr}${exec nvidia-settings -q GPUCurrentClockFreqs -t}Mhz
  85. ${color}Video RAM ${alignr}${exec nvidia-settings -q videoram -t}KiB
  86. ${color}Driver Version ${alignr}${exec nvidia-settings -q NvidiaDriverVersion -t}
  87. ${color #ffa200}${font Freesans:size=20}A${font Freesans:size=10}PPLICATIONS ${hr 1}${color}
  88. Highest CPU $alignr CPU% MEM%
  89. ${top name 1}$alignr${top cpu 1} ${top mem 1}
  90. ${top name 2}$alignr${top cpu 2} ${top mem 2}
  91. ${top name 3}$alignr${top cpu 3} ${top mem 3}
  92. Highest MEM $alignr CPU% MEM%
  93. ${top_mem name 1}$alignr${top_mem cpu 1} ${top_mem mem 1}
  94. ${top_mem name 2}$alignr${top_mem cpu 2} ${top_mem mem 2}
  95. ${top_mem name 3}$alignr${top_mem cpu 3} ${top_mem mem 3}
  96. #${color #ffa200}${font Freesans:size=20}F${font Freesans:size=10}ILE ${font Freesans:size=20}S${font Freesans:size=10}YSTEM ${hr 1}${color}
  97. #${color}READ${alignr}${color}${diskio_read sda}
  98. #${color}WRITE${alignr}${color}${diskio_write sda}
  99. #Root: ${alignr}${fs_free /} / ${fs_size /}
  100. #${fs_bar 4 /}
  101. #Home: ${alignr}${fs_free /home} / ${fs_size /home}
  102. #${fs_bar 4 /home}
  103. ${color #ffa200}${font Freesans:size=20}N${font Freesans:size=10}ETWORK ${hr 1}${color}
  104. Down ${downspeed eno1} k/s ${alignr}Up ${upspeed eno1} k/s
  105. ${downspeedgraph eno1 25,107} ${alignr}${upspeedgraph eno1 25,107}
  106. Total ${totaldown eno1} ${alignr}Total ${totalup eno1}
  107. #${execi 300 curl -s "" -o ~/.cache/futures.xml}
  108. #${color #ffa200}NVIDIA ${hr 1}${color}
  109. #${color}Temp ${alignr}${exec nvidia-settings -q gpucoretemp -t}°C
  110. #${color}GPU Clock ${alignr}${exec nvidia-settings -q GPUCurrentClockFreqs -t}Mhz
  111. #${color}Video RAM ${alignr}${exec nvidia-settings -q videoram -t}KiB
  112. #${color}Driver Version ${alignr}${exec nvidia-settings -q NvidiaDriverVersion -t}
  113. ]];


阅读(3346) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~