# GLCD2USB example configuration Variables { tick 500 tack 100 minute 60000 } Display GLCD2USB { Driver 'GLCD2USB' Brightness 255 } Widget OS { class 'Text' expression '*** '.uname('sysname').' '.uname('release').' ***' width 20 align 'M' style 'bold' speed 200 update tick } Widget CPU { class 'Text' expression uname('machine') prefix 'CPU ' width 9 align 'L' style test::onoff(7)>0?'bold':'norm' update tick } Widget CPUinfo { class 'Text' expression cpuinfo('model name') prefix '' width 20 align 'M' speed 100 update tick } Widget RAM { class 'Text' expression meminfo('MemTotal')/1024 postfix ' MB RAM' width 11 precision 0 align 'R' update tick } Widget Busy { class 'Text' expression proc_stat::cpu('busy', 500) prefix 'Busy' postfix '%' width 9 precision 1 align 'R' update tick } Widget BusyBar { class 'Bar' expression proc_stat::cpu('busy', 500) expression2 proc_stat::cpu('system', 500) length 10 direction 'E' update tack } Widget Load { class 'Text' expression loadavg(1) prefix 'Load' postfix loadavg(1)>1.0?'!':' ' width 10 precision 1 align 'R' update tick } Widget LoadBar { class 'Bar' expression loadavg(1) max 2.0 length 10 direction 'E' update tack } Widget Disk { class 'Text' # disk.[rw]blk return blocks, we assume a blocksize of 512 # to get the number in kB/s we would do blk*512/1024, which is blk/2 # expression (proc_stat::disk('.*', 'rblk', 500)+proc_stat::disk('.*', 'wblk', 500))/2 # with kernel 2.6, disk_io disappeared from /proc/stat but moved to /proc/diskstat # therefore you have to use another function called 'diskstats': expression diskstats('hd.', 'read_sectors', 500) + diskstats('hd.', 'write_sectors', 500) prefix 'disk' postfix ' ' width 10 precision 0 align 'R' update tick } Widget DiskBar { class 'Bar' #expression proc_stat::disk('.*', 'rblk', 500) #expression2 proc_stat::disk('.*', 'wblk', 500) # for kernel 2.6: expression diskstats('hd.', 'read_sectors', 500) expression2 diskstats('hd.', 'write_sectors', 500) length 14 direction 'E' update tack } Widget Eth0 { class 'Text' expression (netdev('eth0', 'Rx_bytes', 500)+netdev('eth0', 'Tx_bytes', 500))/1024 prefix 'eth0' postfix ' ' width 10 precision 0 align 'R' update tick } Widget Eth0Bar { class 'Bar' expression netdev('eth0', 'Rx_bytes', 500) expression2 netdev('eth0', 'Tx_bytes', 500) length 14 direction 'E' update tack } Widget Heart { class 'Icon' speed 250 Bitmap { Row1 '.....|.....|.....|.....|.....|.....' Row2 '.*.*.|.....|.*.*.|.....|.....|.....' Row3 '*****|.*.*.|*****|.*.*.|.*.*.|.*.*.' Row4 '*****|.***.|*****|.***.|.***.|.***.' Row5 '.***.|.***.|.***.|.***.|.***.|.***.' Row6 '.***.|..*..|.***.|..*..|..*..|..*..' Row7 '..*..|.....|..*..|.....|.....|.....' Row8 '.....|.....|.....|.....|.....|.....' } } Widget ImageTest { class 'Image' file 'tux.png' update 1000 visible 1 inverted 0 } Layout TestLayer { Row1 { Col1 'OS' } Row2 { Col1 'CPU' Col10 'RAM' } Row3 { Col1 'Busy' Col10 'Heart' Col11 'BusyBar' } Row4 { Col1 'Load' Col11 'LoadBar' } Row5 { Col1 'Disk' Col11 'DiskBar' } Row6 { Col1 'Eth0' Col11 'Eth0Bar' } Layer 2 { X1.Y1 'ImageTest' } } Display 'GLCD2USB' Layout 'TestLayer'