conky相关问题,刚升级后
时间:2010-04-03
来源:互联网
background no override_utf8_locale yes font DejaVu Sans:size=8 xftfont DejaVu Sans:size=8 #font DejaVu Sans:size=8 #xftfont DejaVu Sans:size=8 use_xft yes xftalpha 0.6 update_interval 1.0 total_run_times 0 own_window yes #own_window_type desktop own_window_type normal own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager double_buffer yes draw_shades no draw_outline no draw_borders no draw_graph_borders no #minimum_size 180 5 maximum_width 180 #alignment top_left #alignment top_right #alignment bottom_left alignment bottom_right #alignment none gap_x 5 gap_y 25 no_buffers yes cpu_avg_samples 2 override_utf8_locale yes uppercase no # set to yes if you want all text to be in uppercase use_spacer none out_to_console no default_color lightgrey #default_color moccasin default_shade_color black default_outline_color grey70 TEXT ${color gold}${font OpenLogos:size=48}A ${voffset -70}${offset 60}${color moccasin}${font DejaVu Sans:size=22}${time %H:%M:%S} ${voffset -15}${color}${font}${alignr}${time %A/%m.%d.%G} ${color slate grey}$hr ${color slate grey}${font}Time:${color}${alignr}$uptime ${color slate grey}Kern:${color}${alignr}linux-$kernel-$machine ${color slate grey}CPU:${color}${alignr}${cpu cpu1}% ${cpu cpu2}% ${freq_g cpu}GHz ${acpitemp}℃ ${if_existing /proc/acpi/battery/BAT0/state yes} ${color slate grey}${font}Battery:${color}${alignr}${battery_percent}%${endif} ${color slate grey}Processes:${color}${alignr}$processes($running_processes running) ${color slate grey}$stippled_hr ${color slate grey}Highest CPU:$alignr -PID- CPU% ${color}${top name 1}$alignr${top pid 1}${top cpu 1} ${color}${top name 2}$alignr${top pid 2}${top cpu 2} ${color}${top name 3}$alignr${top pid 3}${top cpu 3} ${color slate grey}$stippled_hr ${color slate grey}Highest MEM:$alignr -PID- MEM% ${color}${top_mem name 1}$alignr${top_mem pid 1}${top_mem mem 1} ${color}${top_mem name 2}$alignr${top_mem pid 2}${top_mem mem 2} ${color}${top_mem name 3}$alignr${top_mem pid 3}${top_mem mem 3} ${color slate grey}$hr ${color slate grey}${font}MEM:$memperc%${color}$alignr$mem/$memmax ${color}${membar 3,180} ${color slate grey}SWAP:$swapperc%${color}$alignr$swap/$swapmax ${color}${swapbar 3,180} ${color slate grey}BOOT:${fs_used_perc /boot}%${color}$alignr${fs_used /boot}/${fs_size /boot} ${color}${fs_bar 3,180 /boot} ${color slate grey}ROOT:${fs_used_perc /}%${color}$alignr${fs_used /}/${fs_size /} ${color}${fs_bar 3,180 /} ${color slate grey}HOME:${fs_used_perc /home}%${color}$alignr${fs_used /home}/${fs_size /home} ${color}${fs_bar 3,180 /home} ${color slate grey}Disk Read:${color}${alignr}$diskio_read ${color}${diskiograph_read /dev/sda 10,180} ${color slate grey}Disk Write:${color}${alignr}$diskio_write ${color}${diskiograph_write /dev/sda 10,180}${if_match "$mpd_status"!="Stopped"} ${color slate grey}$hr ${color slate grey}Music:${color}${alignr}Now ${mpd_status} ${color slate grey}Title:${color lightgrey}${alignr}${mpd_title} ${color slate grey}Artist:${color lightgrey}${alignr}${mpd_artist} ${color slate grey}Time:${color}${alignr}${mpd_elapsed}/${mpd_length} ${color slate grey}Volume:${color}${mpd_vol}%${color slate grey}${alignr}Bitrate:${color}${mpd_bitrate} kbps${endif}${if_existing /proc/net/route wlan0} ${color slate grey}$hr ${color slate grey}${font}Wireless:${color}${alignr}${addr wlan0} ${color slate grey}Tot.up.${color}${alignr}${totalup wlan0} ${color slate grey}Up:${color}${alignr}${upspeed wlan0}k/s ${color}${upspeedgraph wlan0 10,180} ${color slate grey}Tot.dow.${color}${alignr}${totaldown wlan0} ${color slate grey}Down:${color}${alignr}${downspeed wlan0}k/s ${color}${downspeedgraph wlan0 10,180}${else}${if_existing /proc/net/route ppp0} ${color slate grey}$hr ${color slate grey}${font}PPP0:${color}${alignr}${addr ppp0} ${color slate grey}Tot.up.${color}${alignr}${totalup ppp0} ${color slate grey}Up:${color}${alignr}${upspeed ppp0}k/s ${color}${upspeedgraph ppp0 10,180} ${color slate grey}Tot.dow.${color}${alignr}${totaldown ppp0} ${color slate grey}Down:${color}${alignr}${downspeed ppp0}k/s ${color}${downspeedgraph ppp0 10,180}${else}${if_existing /proc/net/route eth0} ${color slate grey}$hr ${color slate grey}${font}eth0:${color}${alignr}${addr eth0} ${color slate grey}Tot.up.${color}${alignr}${totalup eth0} ${color slate grey}Up:${color}${alignr}${upspeed eth0}k/s ${color}${upspeedgraph eth0 10,180} ${color slate grey}Tot.dow.${color}${alignr}${totaldown eth0} ${color slate grey}Down:${color}${alignr}${downspeed eth0}k/s ${color}${downspeedgraph eth0 10,180}${endif}${endif}${endif} ${color slate grey}$hr ${color slate grey}${font}Mail:${alignr}${color}You have ${color moccasin}${texeci 1800 perl ~/Sh/.check_gmail.sh} ${color}new mail(s) ${voffset -55}
不知为何,一直显示的是wlan0,而实际上我只使用了ppp0拨号
更新之前是没有问题的
作者: Havanna 发布时间: 2010-04-03
相关部分改成这样了
${if_match ${battery_percent BAT0} > 0} ${color slate grey}${font}Battery:${color}${alignr}${battery_percent}%${endif}
作者: Havanna 发布时间: 2010-04-03
作者: kamui0523 发布时间: 2010-04-03
作者: kamui0523
把文件里的wlan0字段全替换成ppp0
|
再改回来?
我的意思是先检测有无无线,如没有则再检测有无ppp拨号,如没有则显示eth0
实际上由于我的网络环境变更比较多,所以我一般也要检测有无eth0,因为rc.conf中本人并没设置eth0的IP或dhcp
作者: Havanna 发布时间: 2010-04-03
作者: adaml 发布时间: 2010-04-03
作者: lmguy 发布时间: 2010-04-04
现在的网络显示也通过${if_match "${addr ppp0}"!="No Address"}来匹配显示了
作者: Havanna 发布时间: 2010-04-07
if_up (interface) if INTERFACE exists and is up, display everything between $if_up and the matching $endif
if_mpd_playing if mpd is playing or paused, display everything between $if_mpd_playing and the matching $endif
作者: Havanna 发布时间: 2010-04-07
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28