|
|

楼主 |
发表于 2009-5-21 16:53:09
|
显示全部楼层
Post by firefoxmmx;1989545
OPENBOX 和fp都配置好了滴~~~~省事儿了呵呵呵呵
fluxbox下qq狂闪的问题没有解决!
附上conky截图。。。
附上conkyrc文件, 哪位美图高手帮忙颜色重新搭配下!
- use_xft yes
- #xftfont iYaHei:size=9
- xftfont WenQuanYi Bitmap Song:size=10
- #xftfont DroidSansFallback:size=9
- xftalpha 0.8
- # 更新时间
- update_interval 2.0
- total_run_times 0
- #own_window no
- #background yes
- own_window yes
- own_window_transparent yes
- own_window_colour 343434
- #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
- own_window_type desktop
- background yes
- double_buffer yes
- minimum_size 280 10
- draw_shades yes
- draw_outline no
- draw_borders no
- stippled_borders 3
- border_margin 4
- border_width 1
- default_color white
- default_shade_color #b77204
- default_outline_color green
- show_graph_scale no
- show_graph_range no
- alignment top_right
- gap_x 24
- gap_y 30
- no_buffers yes
- uppercase no
- cpu_avg_samples 2
- net_avg_samples 2
- override_utf8_locale yes
- use_spacer yes
- TEXT
- ${color #00ccff}${font OpenLogos:regular:size=35} B $color${execi 5 sh /usr/bin/weather > /dev/null}
- ${voffset -60}${font iYaHei:Bold:size=16}${color #ffff00} Archlive ${color} ${time %H:%M:%S}
- ${voffset -15}${color #ffd700}${hr 1}
- ${voffset -15} ${font}${color #ff4500} 内核: $alignr${color}$kernel $machine ${color}${execi 99999 uname -v | cut -c -15}
- ${color #ff4500}用户: ${alignr}${execi 9999 whoami} ${color}登录到 $nodename${color #ffd700}
- ${color #ff4500}已经运行: $alignr${color}$uptime_short
- ${color #ff4500}现在时间: ${alignr}${color}${time %c 第%W周}
- ${voffset -8}${color #ffd700}${hr 1}$font$color
- ${color #ffff00}CPU型号: ${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2- | sed 's#Processor ##'}$color
- ${freq_g 1}GHz ${color #c0ff3e}${execi 5 sensors |grep '^Core0' |cut -c15-16}°C$color$alignr${freq_g 2}GHz ${color #c0ff3e}${execi 5 sensors |grep '^Core1' |cut -c15-16}°C $color
- ${voffset -6}${cpugraph cpu1 18,150 000000 ff4500 } $alignr${cpugraph cpu2 18,150 000000 436eee}
- ${color #ffffff}${voffset -22} ${cpu cpu1}%$alignr${cpu cpu2}% ${color #ff4500}
- ${voffset 5}${color #ffe7ba}负载: $color $loadavg ${color #ffe7ba} $alignr 进程 : $color$running_processes/$processes
- ${color #ffe7ba}占资源Top 5$alignr -PID- CPU MEM$color
- ${top name 1}${color #ff6a6a}$alignr${top pid 1} ${top cpu 1} ${top mem 1}$color
- ${top name 2}${color #ffc125}$alignr${top pid 2} ${top cpu 2} ${top mem 2}$color
- ${top name 3}${color #eeee00}$alignr${top pid 3} ${top cpu 3} ${top mem 3}$color
- ${top name 4}${color #c0ff3e}$alignr${top pid 4} ${top cpu 4} ${top mem 4}$color
- ${top name 5}${color #ccffcc}$alignr${top pid 5} ${top cpu 5} ${top mem 5}$color
- ${voffset -8}${color #ffd700}${hr 1}$font$color
- ${color #ff4500}内存:$color $mem/$memmax${color #828282}$alignr${membar 10,80}
- ${color #ffff00}${voffset -16}$alignr$memperc% ${voffset 2}
- ${color #ff4500}硬盘: $alignr${color #f0e68c}${execi 5 sudo hddtemp /dev/sda | xargs echo $1}
- ${color #ff4500}根文件系统: $color${fs_used /}/ ${fs_size /}$alignr${color #ffd700}${fs_type /} $color${fs_used_perc /}%
- ${voffset -5}${color #7fff00}${fs_bar 3 /}
- ${color #ff4500}Home:$color$alignc ${fs_used /home}/ ${fs_size /home}$alignr${color #ffd700}${fs_type /home} $color${fs_used_perc /home}%
- ${voffset -5}${color #ffff00}${fs_bar 3 /home}
- ${voffset -8}${color #ffd700}${hr 1}${font}$color
- ${color #ff4500}WAN IP地址: $alignr$color${execi 3600 [ -f /tmp/gz-weather ] && sed -n '8p' /tmp/gz-weather || echo " "}
- ${color #ff4500}${if_up wlan0}无线网络模式: ${color}$alignr${wireless_mode wlan0}
- ${color #ff4500}速度:${color white} ${wireless_bitrate wlan0} $alignr${color #0077ff}连接质量: ${color white}${wireless_link_qual_perc wlan0}
- ${color #ff4500}局域网IP地址:$color $alignr${addr wlan0}
- ${color #ff4500}ESSID:${color white} $alignr${wireless_essid wlan0}
- ${voffset -5}${downspeedgraph wlan0 20,115 b0e2ff 556b2f} ${alignr}${upspeedgraph wlan0 20,115 b0e2ff ff4040}
- ${voffset -24} 下载: ${color white}${downspeed wlan0}k/s ${alignr}上传: ${color white}${upspeed wlan0}k/s ${voffset 10}
- ${voffset -5}${color #ffe7ba}总计: ${color white}${totaldown wlan0} ${alignr}${color #ffe7ba}总计: ${color white}${totalup wlan0}
- ${color #ff4500}连入: ${color white}${tcp_portmon 1 32767 count}$alignr${color #ff4500}连出: ${color white}${tcp_portmon 32768 61000 count}
- ${color #ff4500}${else}局域网IP地址: $alignr$color${addr eth0}
- ${downspeedgraph eth0 20,150 b0e2ff 556b2f} ${alignr}${upspeedgraph eth0 20,150 b0e2ff ff4040}
- ${voffset -24} 下载: ${color white}${downspeed eth0}k/s ${alignr}上传 : ${color white}${upspeed eth0}k/s ${voffset 10}
- ${color #ff4500}总计: ${color white}${totaldown eth0} ${alignr}${color #ffe7ba}总计: ${color white}${totalup eth0}
- ${color #ff4500}连入: ${color white}${tcp_portmon 1 32767 count}$alignr${color #ff4500}连出: ${color white}${tcp_portmon 32768 61000 count} ${endif}
- ${voffset -8}${color #ffd700}${hr 1}$font$color
- ${color #ffd700}${execi 3600 [ -f /tmp/gz-weather ] && sed -n '1p' /tmp/gz-weather || echo "没有连接互联网"}
- ${color}${execi 3600 [ -f /tmp/gz-weather ] && sed -n '2p' /tmp/gz-weather || echo "或者脚本没有运行"}
- ${color}${execi 3600 [ -f /tmp/gz-weather ] && sed -n '3p' /tmp/gz-weather || echo "运行 sh weather"}
- ${color #ffd700}${execi 3600 [ -f /tmp/gz-weather ] && sed -n '4p' /tmp/gz-weather || echo "网络重新连接后需再次执行 sh weather"}
- ${color}${execi 3600 [ -f /tmp/gz-weather ] && sed -n '5p' /tmp/gz-weather || echo "可获取WAN IP 及 天气信息 "}
- ${color}${execi 3600 [ -f /tmp/gz-weather ] && sed -n '6p' /tmp/gz-weather || echo "**********"}
复制代码
获取ip及天气情况的脚本:- #!bin/bash
- # 从人民网获取24、48小时天气数据
- if [ ! -f /tmp/gz_weather ]; then
- ping -c1 121.14.89.14 >> /dev/null
- if [ $? -eq 0 ]; then
- # 华南地区: 广州 353-359行 深圳 362-368行 汕头 371-377行
- # 华中地区: 郑州 381-387行 武汉 392-398行
- links -no-g -source "http://card.people.com.cn/forecast/inland24.jsp?aboard=0&interval=24"|sed -n '353,359p'|iconv -f GB18030 -t UTF8 |cut -d\> -f3|sed 's/<\/font//'|sed 's/ //'|tr -d '\<' > /tmp/weather
- links -no-g -source "http://card.people.com.cn/forecast/inland24.jsp?aboard=0&interval=48"|sed -n '353,359p'|iconv -f GB18030 -t UTF8 |cut -d\> -f3|sed 's/<\/font//'|sed 's/ //'|tr -d '\<' >> /tmp/weather
- ipaddress=`links -no-g -dump http://www.ip138.com/ip2city.asp | awk 'BEGIN{FS="["; RS="]"}$NF&&$NF!~/.*=.*/{print $2}'`
- location=`sed -n '1p' /tmp/weather`
- dayweather24=`sed -n '2p' /tmp/weather`
- daywind24=`sed -n '3p' /tmp/weather`
- daytemp24=`sed -n '4p' /tmp/weather|sed 's/[^0-9]//'`
- nightweather24=`sed -n '5p' /tmp/weather`
- nightwind24=`sed -n '6p' /tmp/weather`
- nighttemp24=`sed -n '7p' /tmp/weather|sed 's/[^0-9]//'`
- dayweather48=`sed -n '9p' /tmp/weather`
- daywind48=`sed -n '10p' /tmp/weather`
- daytemp48=`sed -n '11p' /tmp/weather|sed 's/[^0-9]//'`
- nightweather48=`sed -n '12p' /tmp/weather`
- nightwind48=`sed -n '13p' /tmp/weather`
- nighttemp48=`sed -n '14p' /tmp/weather|sed 's/[^0-9]//'`
- if [ $daytemp24 -lt $nighttemp24 ]; then
- echo "$location地区未来24小时天气情况" > /tmp/gz-weather
- echo "白天 $dayweather24 $daywind24 最高气温:$daytemp24℃" >> /tmp/gz-weather
- echo "晚间 $nightweather24 $nightwind24 最低气温:$nighttemp24℃" >> /tmp/gz-weather
- echo "$location地区未来48小时天气情况" >> /tmp/gz-weather
- echo "白天 $dayweather48 $daywind48 最高气温:$daytemp48℃" >> /tmp/gz-weather
- echo "晚间 $nightweather48 $nightwind48 最低气温:$nighttemp48℃" >> /tmp/gz-weather
- else
- echo "$location地区未来24小时天气情况" > /tmp/gz-weather
- echo "白天 $dayweather24 $daywind24 最高气温:$daytemp24℃" >> /tmp/gz-weather
- echo "晚间 $nightweather24 $nightwind24 最低气温:$nighttemp24 ℃" >> /tmp/gz-weather
- echo "$location地区未来48小时天气情况" >> /tmp/gz-weather
- echo "白天 $dayweather48 $daywind48 最高气温:$daytemp48℃" >> /tmp/gz-weather
- echo "晚间 $nightweather48 $nightwind48 最低气温:$nighttemp48℃" >> /tmp/gz-weather
- fi
- echo "本机IP地址:" >> /tmp/gz-weather
- echo "$ipaddress" >> /tmp/gz-weather
- rm -rf /tmp/weather
- else
- if [ ! -f /tmp/pppoeconf ]; then
- gxmessage -center -bg "#ddff00" -timeout 3 -title "未联网" -buttons "" -encoding UTF-8\
- " 本机无联网,无法获取IP及天气预报信息,请先设置网络!
- 现在调用网络配置工具配置ADSL网络,如果仍然无法成功,
- 请自行运行sudo tkpppoe来配置。
- " &
- sleep 5 && touch /tmp/pppoeconf && exec sudo /usr/bin/pppoeconf >>/dev/null
- ping -c1 121.14.89.14 >> /dev/null
- if [ $? -ne 0 ]; then
- gxmessage -center -bg "#ddff00" -timeout 3 -title "未联网" -buttons "" -encoding UTF-8\
- " ppoeconf无法配置网络,
- 现在调用RP-PPPoE来配置网络。
- " &
- sleep 5 && touch /tmp/pppoeconf && exec sudo /usr/bin/tkpppoe
- ping -c1 121.14.89.14 >> /dev/null
- if [ $? -ne 0 ]; then
- gxmessage -center -bg "#ddff00" -timeout 8 -title "未联网" -buttons "" -encoding UTF-8\
- "RP-PPPoE也无法配置网络,非PPPoE网络,请自行配置。"
- fi
- fi
- fi
- fi
- fi
-
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|