TA的每日心情 | 开心 2014-5-15 11:53 |
---|
签到天数: 115 天 [LV.6]常住居民II
贡献会员
|
注册后可查看完整内容!
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 dsqa 于 2014-5-10 21:50 编辑
显示效果图,基本版,只显示了常见参数。
本想偷懒。。。结果发现论坛里发的是240X320的。。。1.5寸的没法用。。。所以简单搞了个1.5的。
这里只抛砖引玉,至于更多功能和美化,大家发挥吧。
--------------------------------------------------分割线---------------------------------------------------------
排版小更新版,看图吧。增加了CPU占用百分比显示,下边IP等信息滚动显示。需要的,回复可见,
- Display dpf {
- Driver 'DPF'
- Port 'usb0'
- Font '6x8'
- Foreground 'ffffff'
- Background 'ffffff00'
- Basecolor '000000' #ffffff00
- Orientation 0 # Orientation value from 0-3
- Backlight 5 # Backlight variable control
- }
- Widget Kernel {
- class 'Text'
- expression uname('nodename')
- width 12
- align 'L'
- update minute
- Background 'FFFFFF00'
- }
- Widget CPUText {
- class 'Text'
- expression uname('machine')
- prefix 'CPU'
- width 21
- align 'R'
- update minute
- Background 'FFFFFF00'
- }
- Widget CPUBar {
- class 'Bar'
- expression proc_stat::cpu('busy', 500)
- length 21
- direction 'E'
- # style 'H'
- update tack
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget RAMText1 {
- class 'Text'
- expression meminfo('MemTotal')/1024
- #prefix 'RAM'
- postfix 'MB'
- precision 0
- width 6
- align 'L'
- update tick
- Background 'FFFFFF00'
- }
- Widget RAMText2 {
- class 'Text'
- expression meminfo('MemFree')/1024
- prefix 'RAM'
- postfix 'MB/'
- precision 0
- width 15
- align 'R'
- update tick
- Background 'FFFFFF00'
- }
- Widget RAMBar {
- class 'Bar'
- expression meminfo('MemTotal') - meminfo('MemFree')
- max meminfo('MemTotal')
- length 21
- direction 'E'
- # style 'H'
- update tack
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget LoadText {
- class 'Text'
- expression loadavg(1)
- prefix 'Load:'
- postfix loadavg(1)>1.0?'!':''
- width 21
- align 'R'
- precision 1
- update tack
- Background 'FFFFFF00'
- }
- Widget LoadBar {
- class 'Bar'
- expression loadavg(1)
- max 2.0
- length 21
- direction 'E'
- # style 'H'
- update tack
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget DiskText1 {
- class 'Text'
- expression diskstats('sda', 'read_sectors', 500)/2
- prefix 'Read:'
- postfix 'K'
- precision 0
- width 21
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskText2 {
- class 'Text'
- expression diskstats('sda', 'write_sectors', 500)/2
- prefix 'Write:'
- postfix 'K'
- precision 0
- width 21
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskBar {
- class 'Bar'
- expression diskstats('sda', 'read_sectors', 500)
- expression2 diskstats('sda', 'write_sectors', 500)
- length 21
- direction 'E'
- # style 'H'
- update tack
- Foreground '5f5f5f'
- Background '3f3f3fFF'
- BarColor0 '00FF00'
- BarColor1 'FF0000'
- }
- Widget SpaceText1 {
- class 'Text'
- expression statfs(SpaceDir, 'blocks')*statfs(SpaceDir, 'bsize')/1073741824
- prefix SpaceDir
- postfix 'G'
- precision 0
- width 21
- align 'R'
- update minute
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget SpaceText2 {
- class 'Text'
- expression statfs(SpaceDir, 'bavail')*statfs(SpaceDir, 'bsize')/1073741824
- prefix 'Free:'
- postfix 'G'
- precision 0
- width 21
- align 'R'
- update minute
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget SpaceBar {
- class 'Bar'
- expression statfs(SpaceDir, 'blocks') - statfs(SpaceDir, 'bavail')
- length 21
- direction 'E'
- # style 'H'
- max statfs(SpaceDir, 'blocks')
- update tick
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget NetText1 {
- class 'Text'
- expression netdev::fast('eth0', 'Tx_bytes', 500)/1024
- prefix 'Up:'
- postfix 'K/s'
- width 21
- precision 0
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget NetText2 {
- class 'Text'
- expression netdev::fast('eth0', 'Rx_bytes', 500)/1024
- prefix 'Down:'
- postfix 'K/s'
- precision 0
- width 21
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget NetBar {
- class 'Bar'
- expression netdev('eth0', 'Tx_bytes', 500)
- expression2 netdev('eth0', 'Rx_bytes', 500)
- length 21
- direction 'E'
- # style 'H'
- # max 2097152
- # max 204800
- update tack
- Foreground '5f5f5f'
- Background '3F3F3FFF'
- BarColor0 '00FF00'
- BarColor1 'FF0000'
- }
- Widget UpText {
- class 'Text'
- expression uptime('%dd %H:%M:%S')
- # prefix 'R:'
- width 13
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget IPText {
- class 'Text'
- expression netinfo::ipaddr('eth0')
- prefix 'IP:'
- width 21
- align 'L'
- update minute
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Display 'DPF'
- Layout mylayout {
- Row01.Col01 'Kernel'
- Row01.Col09 'UpText'
- Row02.Col01 'CPUText'
- Row03.Col01 'CPUBar'
- Row04.Col01 'LoadText'
- #Row05.Col01 'LoadBar'
- Row05.Col16 'RAMText1'
- Row05.Col01 'RAMText2'
- Row06.Col01 'RAMBar'
- Row07.Col01 'DiskText1'
- Row8.Col01 'DiskText2'
- Row9.Col01 'DiskBar'
- Row10.Col01 'SpaceText1'
- Row11.Col01 'SpaceText2'
- Row12.Col01 'SpaceBar'
- Row13.Col01 'NetText1'
- Row14.Col01 'NetText2'
- Row15.Col01 'NetBar'
- #Row18.Col01 'UpText'
- Row16.Col01 'IPText'
- }
- Layout 'mylayout'
- Variables {
- tick 500
- tack 200
- second 1000
- minute 60000
- SpaceDir '/mnt/sda1'
- }
复制代码
隐藏东西,你懂的
|
|