Display dpf {
    Driver 'DPF'
    Port 'usb0'
    Font '6x8'
    Foreground 'ffffff'
    Background '000000'
    Basecolor '000066'
}
Widget OS {
    class 'Text'
    expression uname('release')
    width 54
    align 'C'
    speed 100
    update tick
    Background '000000'
    Foreground 'ffffff'
}
#Widget WHO {
#    class 'Text' expression exec('logread | tail -n 1', 1000) width 52 align 'PL' Background '080000' Foreground 'ffffff'
#}
Widget TIME {
    class 'Text'
    expression strftime('%a, %d.%m.%Y -- %H:%M:%S', time())
    width 54
    align 'C'
    update tick
    Background '000000'
    Foreground 'ffffff'
}
Widget RAM {
    class 'Text'
    expression (floor(((meminfo('MemTotal'))-(meminfo('Buffers'))-(meminfo('Cached'))-(meminfo('MemFree')))*10/1024)/10).' / '.(floor(meminfo('MemTotal')*10/1024)/10)
    prefix 'Ram: '
    postfix ' MB'
    width 21
    #precision 0
    align 'R'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget Swap {
    class 'Text'
    expression (floor(((meminfo('SwapTotal'))-(meminfo('SwapFree')))*10/1024)/10).' / '.(floor(meminfo('SwapTotal')*10/1024)/10)
    prefix 'Swap: '
    postfix ' MB'
    width 21
    #precision 0
    align 'R'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget DF-Ablage {
    class 'Text'
    expression statfs('/mnt/data', 'bavail')*statfs('/mnt/data', 'bsize')/1024/1024/1024
    prefix 'HDD: '
    postfix ' GB free'
    precision 2
    width 21
    align 'L'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget DF-root {
    class 'Text'
    expression statfs('/root', 'bavail')*statfs('/root', 'bsize')/1024/1024/1024
    prefix 'root: '
    postfix ' GB free'
    precision 2
    width 21
    align 'L'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget Busy {
    class 'Text'
    expression proc_stat::cpu('busy', 500)
    prefix 'Busy'
    postfix '%'
    width 21
    precision 1
    align 'R'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget BusyBar {
    class 'Bar'
    expression proc_stat::cpu('busy', 500)
    expression2 proc_stat::cpu('system', 500)
    length 21
    direction 'E'
    update tack
    Foreground 'ffffff'
    Background '00000080'
    BarColor0 '5f5fff'
    BarColor1 'ff5f5f'
}
Widget Load {
    class 'Text'
    expression loadavg(1)
    prefix 'Load'
    postfix loadavg(1)>1.0?'!':' '
    width 21
    precision 1
    align 'R'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget LoadBar {
    class 'Bar'
    expression loadavg(1)
    max 5.0
    length 21
    direction 'E'
    update tack
    Foreground 'ffffff'
    Background '00000080'
    BarColor0 '5f5fff'
    BarColor1 'ff5f5f'
}
Widget Disk {
    class 'Text'
    expression (diskstats('sd[a-z]$', 'read_sectors', 500) + diskstats('sd[a-z]$', 'write_sectors', 500)) / 2048
    prefix 'disk'
    postfix ' MB/s'
    width 21
    precision 3
    align 'R'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget DiskBar {
    class 'Bar'
    expression diskstats('sd[a-z]$', 'read_sectors', 500)
    expression2 diskstats('sd[a-z]$', 'write_sectors', 500)
    length 21
    direction 'E'
    update tack
    Foreground 'ffffff'
    Background '00000080'
    BarColor0 '5f5fff'
    BarColor1 'ff5f5f'
}
Widget Eth0 {
    class 'Text'
    expression (netdev('eth0', 'Rx_bytes', 500)+netdev('eth0', 'Tx_bytes', 500))/1024/1024
    prefix 'eth0'
    postfix ' MB/s'
    width 21
    precision 3
    align 'R'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget Eth0Bar {
    class 'Bar'
    expression netdev('eth0', 'Rx_bytes', 500)
    expression2 netdev('eth0', 'Tx_bytes', 500)
    length 21
    direction 'E'
    update tack
    Foreground 'ffffff'
    Background '00000080'
    BarColor0 '5f5fff'
    BarColor1 'ff5f5f'
}
Widget Eth0Traffic {
    class 'Text'
    expression (netdev('eth0', 'Rx_bytes', 0)+netdev('eth0', 'Tx_bytes', 0))/1024/1024
    prefix 'Traffic:'
    postfix ' MB'
    width 21
    precision 3
    align 'R'
    update tick
    Foreground 'ffffff'
    Background 'FFFFFF00'
}
Widget Uptime {
    class 'Text'
    width 52
#    length 21
    align 'C'
    expression uptime('%d days %H:%M:%S')
#    prefix 'Up: '
    Foreground 'ffffff'
    Background 'FFFFFF00'
    update tack
}

Display 'DPF' 

Layout mylayout {
    Row02.Col01 'OS'
    Row30.Col01 'TIME'
    Row06.Col30 'RAM'
    Row08.Col30 'Swap'
    Row12.Col30 'DF-root'
    Row14.Col30 'DF-Ablage'
    Row18.Col30 'Eth0Traffic'
    Row25.Col01 'Uptime'
    Row05.Col02 'Busy'
    Row07.Col02 'BusyBar'
    Row09.Col02 'Load'
    Row11.Col02 'LoadBar'
    Row13.Col02 'Disk'
    Row15.Col02 'DiskBar'
    Row17.Col02 'Eth0'
    Row19.Col02 'Eth0Bar'
}

Layout 'mylayout' 

Variables {
    tick 1000
    tack 500
    minute 60000
}
