TA的每日心情 | 衰 2014-5-28 09:10 |
---|
签到天数: 71 天 [LV.6]常住居民II
普通用户
|
楼主 |
发表于 2014-5-18 12:20:09
|
显示全部楼层
本帖最后由 xjcsuper 于 2014-5-21 10:26 编辑
这里放一份我现在自用的最新CONF代码,效果请去这一帖看http://nas1.cn/thread-84333-1-1.html- Display dpf {
- Driver 'DPF'
- Port 'usb0'
- Font '6x8'
- Foreground 'ffffff'
- Background 'ffffff00'
- Basecolor '000000' #ffffff00
- Orientation 0 # Orientation value from 0-3
- Backlight backlight # Backlight variable control
- }
- Display Image {
- Driver 'Image'
- Format 'PNG'
- Size '128x128'
- Font '6x8'
- Pixel '4+1'
- Gap '-1x-1'
- Border 10
- Foreground 'ffffff'
- Background 'ffffff00'
- Halfground '#70c000'
- }
- Widget Month1 {
- class 'Image'
- file imgadir . 'date'. substr(strftime('%m', time()),0,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Month2 {
- class 'Image'
- file imgadir . 'date'. substr(strftime('%m', time()),1,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Month-Day {
- class 'Image'
- file imgadir . 'date-.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Day1 {
- class 'Image'
- file imgadir . 'date'. substr(strftime('%d', time()),0,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Day2 {
- class 'Image'
- file imgadir . 'date'. substr(strftime('%d', time()),1,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Week1 {
- class 'Image'
- file imgadir . 'week'. strftime('%u', time()) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Hour1 {
- class 'Image'
- file imgadir . 'time'. substr(strftime('%H', time()),0,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Hour2 {
- class 'Image'
- file imgadir . 'time'. substr(strftime('%H', time()),1,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Hourdot1 {
- class 'Image'
- file imgadir . 'timedot.png'
- reload 0
- update tack
- inverted 0
- visible (time() % 2) & 1
- }
- Widget Hourdot2 {
- class 'Image'
- file imgadir . 'timedot.png'
- reload 0
- update tack
- inverted 0
- visible (time() % 2) & 1
- }
- Widget Minute1 {
- class 'Image'
- file imgadir . 'time'. substr(strftime('%M', time()),0,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Minute2 {
- class 'Image'
- file imgadir . 'time'. substr(strftime('%M', time()),1,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Second1 {
- class 'Image'
- file imgadir . 'ts'. substr(strftime('%S', time()),0,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Second2 {
- class 'Image'
- file imgadir . 'ts'. substr(strftime('%S', time()),1,1) . '.png'
- reload 1
- update tick
- inverted 0
- visible 1
- }
- Widget Kernel {
- class 'Text'
- expression uname('nodename')
- width 8
- align 'L'
- update minute
- Background 'FFFFFF00'
- }
- Widget CPUText {
- class 'Text'
- # expression uname('machine')
- expression proc_stat::cpu('busy', 500)
- prefix 'CPU'
- postfix '%'
- precision 2
- width 10
- align 'R'
- update tick
- Background 'FFFFFF00'
- }
- Widget CPUBar {
- class 'Bar'
- expression proc_stat::cpu('busy', 500)
- length 10
- max 100
- direction 'E' #E,W,N,S
- style 'H'
- update tack
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget RAMText {
- class 'Text'
- expression showex?meminfo('MemTotal')/1024:meminfo('MemFree')/1024
- prefix showex?'RAM':'Free'
- postfix 'MB'
- precision 0
- width 10
- align 'R'
- update tick
- Background 'FFFFFF00'
- }
- Widget RAMBar {
- class 'Bar'
- expression meminfo('MemTotal') - meminfo('MemFree')
- max meminfo('MemTotal')
- length 10
- direction 'E'
- style 'H'
- update tack
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget LoadText {
- class 'Text'
- expression loadavg(1)-1
- # expression i2c_sensors('temp2_input')
- prefix 'Load:'
- postfix loadavg(1)-1>1.0?'!':''
- width 10
- align 'R'
- precision 1
- update tack
- Background 'FFFFFF00'
- }
- Widget TypeText1 {
- class 'Text'
- prefix showex?'Space':'Free'
- width 6
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget TypeText2 {
- class 'Text'
- prefix 'DISK'
- width 4
- align 'R'
- update tick
- Foreground '00FF00'
- Background 'FFFFFF00'
- }
- Widget TypeText3 {
- class 'Text'
- postfix 'Read Write'
- width 10
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskText1R {
- class 'Text'
- expression diskstats(Diskname1, 'read_sectors', 500)/2<1024?diskstats(Diskname1, 'read_sectors', 500)/2:diskstats(Diskname1, 'read_sectors', 500)/2/1024
- postfix diskstats(Diskname1, 'read_sectors', 500)/2<1024?'K':'M'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskText1W {
- class 'Text'
- expression diskstats(Diskname1, 'write_sectors', 500)/2<1024?diskstats(Diskname1, 'write_sectors', 500)/2:diskstats(Diskname1, 'write_sectors', 500)/2/1024
- postfix diskstats(Diskname1, 'write_sectors', 500)/2<1024?'K':'M'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskText2R {
- class 'Text'
- expression diskstats(Diskname2, 'read_sectors', 500)/2<1024?diskstats(Diskname2, 'read_sectors', 500)/2:diskstats(Diskname2, 'read_sectors', 500)/2/1024
- postfix diskstats(Diskname2, 'read_sectors', 500)/2<1024?'K':'M'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskText2W {
- class 'Text'
- expression diskstats(Diskname2, 'write_sectors', 500)/2<1024?diskstats(Diskname2, 'write_sectors', 500)/2:diskstats(Diskname2, 'write_sectors', 500)/2/1024
- postfix diskstats(Diskname2, 'write_sectors', 500)/2<1024?'K':'M'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskText3R {
- class 'Text'
- expression diskstats(Diskname3, 'read_sectors', 500)/2<1024?diskstats(Diskname3, 'read_sectors', 500)/2:diskstats(Diskname3, 'read_sectors', 500)/2/1024
- postfix diskstats(Diskname3, 'read_sectors', 500)/2<1024?'K':'M'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskText3W {
- class 'Text'
- expression diskstats(Diskname3, 'write_sectors', 500)/2<1024?diskstats(Diskname3, 'write_sectors', 500)/2:diskstats(Diskname3, 'write_sectors', 500)/2/1024
- postfix diskstats(Diskname3, 'write_sectors', 500)/2<1024?'K':'M'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget DiskBar1 {
- class 'Bar'
- expression diskstats(Diskname1, 'read_sectors', 500)
- expression2 diskstats(Diskname1, 'write_sectors', 500)
- length 2
- direction 'E'
- style 'H'
- update tsck
- Foreground '5f5f5f'
- Background '3f3f3fFF'
- BarColor0 '00FF00'
- BarColor1 'FF0000'
- }
- Widget DiskBar2 {
- class 'Bar'
- expression diskstats(Diskname2, 'read_sectors', 500)
- expression2 diskstats(Diskname2, 'write_sectors', 500)
- length 2
- direction 'E'
- style 'H'
- update tsck
- Foreground '5f5f5f'
- Background '3f3f3fFF'
- BarColor0 '00FF00'
- BarColor1 'FF0000'
- }
- Widget DiskBar3 {
- class 'Bar'
- expression diskstats(Diskname3, 'read_sectors', 500)
- expression2 diskstats(Diskname3, 'write_sectors', 500)
- length 2
- direction 'E'
- style 'H'
- update tsck
- Foreground '5f5f5f'
- Background '3f3f3fFF'
- BarColor0 '00FF00'
- BarColor1 'FF0000'
- }
- Widget SpaceText1 {
- class 'Text'
- expression showex?statfs(SpaceDir1, 'blocks')*statfs(SpaceDir2, 'bsize')/1073741824:statfs(SpaceDir1, 'bavail')*statfs(SpaceDir2, 'bsize')/1073741824
- postfix 'G'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget SpaceText2 {
- class 'Text'
- expression showex?statfs(SpaceDir2, 'blocks')*statfs(SpaceDir2, 'bsize')/1073741824:statfs(SpaceDir2, 'bavail')*statfs(SpaceDir2, 'bsize')/1073741824
- postfix 'G'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget SpaceText3 {
- class 'Text'
- expression showex?statfs(SpaceDir3, 'blocks')*statfs(SpaceDir3, 'bsize')/1073741824:statfs(SpaceDir3, 'bavail')*statfs(SpaceDir3, 'bsize')/1073741824
- postfix 'G'
- precision 0
- width 5
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget SpaceBar1 {
- class 'Bar'
- expression statfs(SpaceDir1, 'blocks') - statfs(SpaceDir1, 'bavail')
- length 3
- direction 'E'
- style 'H'
- max statfs(SpaceDir1, 'blocks')
- update tick
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget SpaceBar2 {
- class 'Bar'
- expression statfs(SpaceDir2, 'blocks') - statfs(SpaceDir2, 'bavail')
- length 3
- direction 'E'
- style 'H'
- max statfs(SpaceDir2, 'blocks')
- update tick
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget SpaceBar3 {
- class 'Bar'
- expression statfs(SpaceDir3, 'blocks') - statfs(SpaceDir3, 'bavail')
- length 3
- direction 'E'
- style 'H'
- max statfs(SpaceDir3, 'blocks')
- update tick
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget NetText1 {
- class 'Text'
- expression netdev::fast(netdevice, 'Tx_bytes', 500)/1024<1024?netdev::fast(netdevice, 'Tx_bytes', 500)/1024:netdev::fast(netdevice, 'Tx_bytes', 500)/1024/1024
- prefix 'U:'
- postfix netdev::fast(netdevice, 'Tx_bytes', 500)/1024<1024?'K/s':'M/s'
- width 9
- precision 0
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget NetText2 {
- class 'Text'
- expression netdev::fast(netdevice, 'Rx_bytes', 500)/1024<1024?netdev::fast(netdevice, 'Rx_bytes', 500)/1024:netdev::fast(netdevice, 'Rx_bytes', 500)/1024/1024
- prefix 'D:'
- postfix netdev::fast(netdevice, 'Rx_bytes', 500)/1024<1024?'K/s':'M/s'
- precision 0
- width 9
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget NetBar {
- class 'Bar'
- expression netdev(netdev, 'Tx_bytes', 500)
- expression2 netdev(netdev, 'Rx_bytes', 500)
- length 2
- direction 'N'
- # style 'H'
- update tack
- Foreground '5f5f5f'
- Background '3F3F3FFF'
- BarColor0 '00FF00'
- BarColor1 'FF0000'
- }
- Widget CpuTText {
- class 'Text'
- expression i2c_sensors('temp2_input')
- postfix '.C'
- precision 0
- width 4
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget CpuTBar {
- class 'Bar'
- expression i2c_sensors('temp2_input')
- length 2
- max 100
- direction 'N'
- style 'H'
- update tack
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget MbTText {
- class 'Text'
- expression i2c_sensors('temp1_input')
- postfix '.C'
- precision 0
- width 4
- align 'R'
- update tick
- Foreground 'ffffff'
- Background 'FFFFFF00'
- }
- Widget MbTBar {
- class 'Bar'
- expression i2c_sensors('temp1_input')
- length 2
- max 100
- direction 'N'
- style 'H'
- update tack
- Foreground '5f5f5f'
- Background '00FF00FF'
- BarColor0 'FF0000'
- BarColor1 'EE3333'
- }
- Widget IPText {
- class 'Text'
- expression showex?(uptime('%dDays %H:%M:%S')):(netinfo::ipaddr(netdevice))
- prefix showex?'Up:':'IP:'
- width 21
- align 'R'
- update tick
- Foreground 'fff000'
- Background '5f5f5f'
- }
- Widget LcdLight{
- class 'Timer'
- expression LCD::backlight(file::readline(imgadir . 'lcds', strftime('%H', time()) + 1))
- active 1
- update minute
- }
- Widget ShowExinfo {
- class 'Timer'
- expression showex=(time() % 10 < 5)?1:0
- active 1
- update tick
- }
- Display 'DPF'
- #Display 'Image'
- Layout mylayout {
- Row07.Col1 'Kernel'
- Row08.Col1 'CPUText'
- Row09.Col1 'CPUBar'
- Row07.Col12 'LoadText'
- Row08.Col12 'RAMText'
- Row09.Col12 'RAMBar'
- Row11.Col1 'SpaceText1'
- Row12.Col1 'SpaceText2'
- Row13.Col1 'SpaceText3'
- Row11.Col6 'SpaceBar1'
- Row12.Col6 'SpaceBar2'
- Row13.Col6 'SpaceBar3'
- Row10.Col1 'TypeText1'
- Row10.Col7 'TypeText2'
- Row10.Col12 'TypeText3'
- Row11.Col11 'DiskText1R'
- Row11.Col17 'DiskText1W'
- Row12.Col11 'DiskText2R'
- Row12.Col17 'DiskText2W'
- Row13.Col11 'DiskText3R'
- Row13.Col17 'DiskText3W'
- Row11.Col9 'DiskBar1'
- Row12.Col9 'DiskBar2'
- Row13.Col9 'DiskBar3'
- Row15.Col2 'CpuTText'
- Row14.Col1 'CpuTBar'
- Row15.Col7 'MbTText'
- Row14.Col6 'MbTBar'
- Row14.Col13 'NetText1'
- Row15.Col13 'NetText2'
- Row14.Col12 'NetBar'
- Row16.Col1 'IPText'
- Layer 0 {
- X1.Y1 'Month1'
- X1.Y14 'Month2'
- X1.Y27 'Month-Day'
- X1.Y37 'Day1'
- X1.Y51 'Day2'
- X1.Y82 'Week1'
- X17.Y3 'Hour1'
- X17.Y26 'Hour2'
- X22.Y51 'Hourdot1'
- X34.Y51 'Hourdot2'
- X17.Y60 'Minute1'
- X17.Y83 'Minute2'
- X40.Y110 'Second1'
- X40.Y118 'Second2'
- }
- Timer1 'LcdLight'
- Timer2 'ShowExinfo'
- }
- Layout 'mylayout'
- Variables {
- backlight 2
- tick 500
- tack 200
- tsck 100
- second 1000
- minute 60000
- netdevice 'eth0' #网络
- imgadir '/usr/share/lcd4linux/mytheme/img/'
- datadir '/usr/share/lcd4linux/mytheme/data/'
- SpaceDir1 '/volume1'
- SpaceDir2 '/volumeSATA1/satashare1-1'
- SpaceDir3 '/volumeSATA3/satashare3-1'
- Diskname1 'sda'
- Diskname2 'sdc1'
- Diskname3 'sdf1'
- }
复制代码
|
|