# $Id: lcd4linux.conf.sample 759 2007-02-04 05:55:58Z michael $ # $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/lcd4linux.conf.sample $ Plugin FIFO { fifopath '/tmp/lcd4linux.fifo' } Variables { tick 500 tack 100 minute 60000 } Display FW8888 { Driver 'FW8888' Size '16x2' Port '/dev/ttyS1' Speed 9600 #Bits '8' #Bootscreen '1234567890ABCDEF' } Widget OS { class 'Text' expression '*** '.uname('sysname').' '.uname('release').' ***' width 16 align 'M' style 'bold' speed 50 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 16 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 PPP { class 'Text' expression (ppp('Rx:0', 500)+ppp('Tx:0', 500)) prefix 'PPP' width 9 precision 0 align 'R' update tick } Widget Temp { class 'Text' expression i2c_sensors('temp_input3')*1.0324-67 prefix 'Temp' width 9 precision 1 align 'R' update tick } Widget TempBar { class 'Bar' expression i2c_sensors('temp_input3')*1.0324-67 min 40 max 80 length 10 direction 'E' update tack } Widget Uptime { class 'Text' expression uptime('%H:%M:%S') width 16 align 'R' prefix 'Up ' update 1000 } Widget CPU { class 'Text' expression uname('machine') prefix 'CPU ' width 9 align 'L' update tick } Widget fifo { class 'Text' expression fifo::read() width 16 align 'L' speed scroller update 500 } Widget BarTest { class 'Bar' # test::bar(barno,maxval,startval,delta) - move a test value between 0 and max. # delta= step to change value by each time it's read. # barno - ten different test bar values can be set up, with barno=0..9 # if delta=0, just returns the value of bar n instead of changing it. expression test::bar(0,30,25,1) expression2 test::bar(1,30,0,1) length 8 # max 50 direction 'E' update 10 } Widget BarTestVal { class 'Text' expression test::bar(0,100,50,0) prefix 'Test ' width 9 update 200 } Layout L16x2 { Row1 { Col1 'Busy' Col11 'BusyBar' } Row2 { Col1 'Uptime' } } Display 'FW8888' Layout 'L16x2'