Display dpf { Driver 'DPF' Port 'usb0' Font '6x8' Foreground 'ffffff' Background 'ffffff00' Basecolor '000000' #ffffff00 Orientation 0 # Orientation value from 0-3 Backlight 3 # Backlight variable control } Widget Time { class 'Text' expression strftime('%H:%M:%S',time()) width 9 align 'L' update tick Background 'FFFFFF00' } Widget CPUText { class 'Text' expression uname('machine') width 9 align 'R' update minute Background 'FFFFFF00' } Widget Busy { class 'Text' expression proc_stat::cpu('busy', 500) prefix 'CPU' postfix '%' width 13 precision 1 align 'R' update tick Background 'FFFFFF00' } Widget CPUBar { class 'Bar' expression proc_stat::cpu('busy', 500) expression2 proc_stat::cpu('system', 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 uname('nodename').'-'.'IP:'.netinfo::ipaddr('eth0').'-'.uname('sysname').'-'.uname('release').'-'.cpuinfo('model name') width 21 align 'M' update minute Foreground 'ffffff' Background 'FFFFFF00' } Display 'DPF' Layout mylayout { Row01.Col01 'Time' Row01.Col09 'UpText' Row02.Col13 'CPUText' Row02.Col1 'Busy' 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' } |