| 1 | Display Curses { |
|---|
| 2 | Driver Curses |
|---|
| 3 | Size 20x6 |
|---|
| 4 | # generic HD44780 display (WinAmp wiring) |
|---|
| 5 | Display HD44780-winamp { |
|---|
| 6 | Driver HD44780 |
|---|
| 7 | Model generic |
|---|
| 8 | UseBusy 1 |
|---|
| 9 | Port /dev/parports/0 |
|---|
| 10 | Size 20x4 |
|---|
| 11 | Wire { |
|---|
| 12 | RW 'AUTOFD' |
|---|
| 13 | RS 'INIT' |
|---|
| 14 | ENABLE 'STROBE' |
|---|
| 15 | ENABLE2 'GND' |
|---|
| 16 | GPO 'GND' |
|---|
| 17 | Display XWindow { |
|---|
| 18 | Driver 'X11' |
|---|
| 19 | Size '120x32' |
|---|
| 20 | Font '6x8' |
|---|
| 21 | Pixel '4+1' |
|---|
| 22 | Gap '-1x-1' |
|---|
| 23 | Border 20 |
|---|
| 24 | Foreground '#000000' |
|---|
| 25 | Background '#80d000' |
|---|
| 26 | Halfground '#70c000' |
|---|
| 27 | Display Image { |
|---|
| 28 | Driver 'Image' |
|---|
| 29 | # Format 'PPM' |
|---|
| 30 | Format 'PNG' |
|---|
| 31 | Size '120x32' |
|---|
| 32 | Font '6x8' |
|---|
| 33 | Pixel '4+1' |
|---|
| 34 | Gap '-1x-1' |
|---|
| 35 | Border 20 |
|---|
| 36 | Foreground '#000000' |
|---|
| 37 | Background '#80d000' |
|---|
| 38 | Halfground '#70c000' |
|---|
| 39 | Plugin Seti { |
|---|
| 40 | Directory '/root/setiathome-3.08.i686-pc-linux-gnu' |
|---|
| 41 | Plugin MySQL { |
|---|
| 42 | server 'gsmlandia.com' # if none, localhost assumed |
|---|
| 43 | port 3306 # if none, MySQL default assumed |
|---|
| 44 | user 'lcd4linux' # if none, lcd4linux unix owner assumed |
|---|
| 45 | password 'lcd4linux' # if none, empty password assumed |
|---|
| 46 | database 'lcd4linux' # MUST be specified |
|---|
| 47 | Plugin Pop3 { |
|---|
| 48 | server1 'localhost' |
|---|
| 49 | port1 110 |
|---|
| 50 | user1 'michael' |
|---|
| 51 | password1 'secret' |
|---|
| 52 | Widget OS { |
|---|
| 53 | class 'Text' |
|---|
| 54 | expression '*** '.uname('sysname').' '.uname('release').' ***' |
|---|
| 55 | width 20 |
|---|
| 56 | align 'M' |
|---|
| 57 | speed 100 |
|---|
| 58 | update tick |
|---|
| 59 | Widget CPU { |
|---|
| 60 | class 'Text' |
|---|
| 61 | expression uname('machine') |
|---|
| 62 | prefix 'CPU ' |
|---|
| 63 | width 9 |
|---|
| 64 | align 'L' |
|---|
| 65 | update tick |
|---|
| 66 | Widget RAM { |
|---|
| 67 | class 'Text' |
|---|
| 68 | expression meminfo('MemTotal')/1024 |
|---|
| 69 | postfix ' MB RAM' |
|---|
| 70 | width 11 |
|---|
| 71 | precision 0 |
|---|
| 72 | align 'R' |
|---|
| 73 | update tick |
|---|
| 74 | Widget Busy { |
|---|
| 75 | class 'Text' |
|---|
| 76 | expression proc_stat::cpu('busy', 500) |
|---|
| 77 | prefix 'Busy' |
|---|
| 78 | postfix '%' |
|---|
| 79 | width 10 |
|---|
| 80 | precision 1 |
|---|
| 81 | align 'R' |
|---|
| 82 | update tick |
|---|
| 83 | Widget BusyBar { |
|---|
| 84 | class 'Bar' |
|---|
| 85 | expression proc_stat::cpu('busy', 500) |
|---|
| 86 | expression2 proc_stat::cpu('system', 500) |
|---|
| 87 | length 10 |
|---|
| 88 | direction 'E' |
|---|
| 89 | update tack |
|---|
| 90 | Widget Load { |
|---|
| 91 | class 'Text' |
|---|
| 92 | expression loadavg(1) |
|---|
| 93 | prefix 'Load' |
|---|
| 94 | postfix loadavg(1)>1.0?'!':' ' |
|---|
| 95 | width 10 |
|---|
| 96 | precision 1 |
|---|
| 97 | align 'R' |
|---|
| 98 | update tick |
|---|
| 99 | Widget LoadBar { |
|---|
| 100 | class 'Bar' |
|---|
| 101 | expression loadavg(1) |
|---|
| 102 | max 2.0 |
|---|
| 103 | length 10 |
|---|
| 104 | direction 'E' |
|---|
| 105 | update tack |
|---|
| 106 | Widget Disk { |
|---|
| 107 | class 'Text' |
|---|
| 108 | # disk.[rw]blk return blocks, we assume a blocksize of 512 |
|---|
| 109 | # to get the number in kB/s we would do blk*512/1024, which is blk/2 |
|---|
| 110 | # expression (proc_stat::disk('.*', 'rblk', 500)+proc_stat::disk('.*', 'wblk', 500))/2 |
|---|
| 111 | # with kernel 2.6, disk_io disappeared from /proc/stat but moved to /proc/diskstat |
|---|
| 112 | # therefore you have to use another function called 'diskstats': |
|---|
| 113 | expression diskstats('hd.', 'read_sectors', 500) + diskstats('hd.', 'write_sectors', 500) |
|---|
| 114 | prefix 'disk' |
|---|
| 115 | postfix ' ' |
|---|
| 116 | width 10 |
|---|
| 117 | precision 0 |
|---|
| 118 | align 'R' |
|---|
| 119 | update tick |
|---|
| 120 | Widget DiskBar { |
|---|
| 121 | class 'Bar' |
|---|
| 122 | #expression proc_stat::disk('.*', 'rblk', 500) |
|---|
| 123 | #expression2 proc_stat::disk('.*', 'wblk', 500) |
|---|
| 124 | # for kernel 2.6: |
|---|
| 125 | expression diskstats('hd.', 'read_sectors', 500) |
|---|
| 126 | expression2 diskstats('hd.', 'write_sectors', 500) |
|---|
| 127 | length 14 |
|---|
| 128 | direction 'E' |
|---|
| 129 | update tack |
|---|
| 130 | Widget Eth0 { |
|---|
| 131 | class 'Text' |
|---|
| 132 | expression (netdev('eth0', 'Rx_bytes', 500)+netdev('eth0', 'Tx_bytes', 500))/1024 |
|---|
| 133 | prefix 'eth0' |
|---|
| 134 | postfix ' ' |
|---|
| 135 | width 10 |
|---|
| 136 | precision 0 |
|---|
| 137 | align 'R' |
|---|
| 138 | update tick |
|---|
| 139 | Widget Eth0Bar { |
|---|
| 140 | class 'Bar' |
|---|
| 141 | expression netdev('eth0', 'Rx_bytes', 500) |
|---|
| 142 | expression2 netdev('eth0', 'Tx_bytes', 500) |
|---|
| 143 | length 14 |
|---|
| 144 | direction 'E' |
|---|
| 145 | update tack |
|---|
| 146 | Widget PPP { |
|---|
| 147 | class 'Text' |
|---|
| 148 | expression (ppp('Rx:0', 500)+ppp('Tx:0', 500)) |
|---|
| 149 | prefix 'PPP' |
|---|
| 150 | width 9 |
|---|
| 151 | precision 0 |
|---|
| 152 | align 'R' |
|---|
| 153 | update tick |
|---|
| 154 | Widget Temp { |
|---|
| 155 | class 'Text' |
|---|
| 156 | expression i2c_sensors('temp3_input')*1.0324-67 |
|---|
| 157 | prefix 'Temp' |
|---|
| 158 | width 9 |
|---|
| 159 | precision 1 |
|---|
| 160 | align 'R' |
|---|
| 161 | update tick |
|---|
| 162 | Widget TempBar { |
|---|
| 163 | class 'Bar' |
|---|
| 164 | expression i2c_sensors('temp3_input')*1.0324-67 |
|---|
| 165 | min 40 |
|---|
| 166 | max 80 |
|---|
| 167 | length 10 |
|---|
| 168 | direction 'E' |
|---|
| 169 | update tack |
|---|
| 170 | Widget MySQLtest1 { |
|---|
| 171 | class 'Text' |
|---|
| 172 | expression MySQL::query('SELECT id FROM table1') |
|---|
| 173 | width 20 |
|---|
| 174 | align 'R' |
|---|
| 175 | prefix 'MySQL test:' |
|---|
| 176 | update minute |
|---|
| 177 | Widget MySQLtest2 { |
|---|
| 178 | class 'Text' |
|---|
| 179 | expression MySQL::status() |
|---|
| 180 | width 20 |
|---|
| 181 | align 'M' |
|---|
| 182 | prefix 'Status: ' |
|---|
| 183 | update minute |
|---|
| 184 | Widget Uptime { |
|---|
| 185 | class 'Text' |
|---|
| 186 | expression uptime('%d days %H:%M:%S') |
|---|
| 187 | width 20 |
|---|
| 188 | align 'R' |
|---|
| 189 | prefix 'Up ' |
|---|
| 190 | update 1000 |
|---|
| 191 | # debugging widgets |
|---|
| 192 | Widget BarTest { |
|---|
| 193 | class 'Bar' |
|---|
| 194 | # test::bar(barno,maxval,startval,delta) - move a test value between 0 and max. |
|---|
| 195 | # delta= step to change value by each time it's read. |
|---|
| 196 | # barno - ten different test bar values can be set up, with barno=0..9 |
|---|
| 197 | # if delta=0, just returns the value of bar n instead of changing it. |
|---|
| 198 | expression test::bar(0,30,25,1) |
|---|
| 199 | expression2 test::bar(1,30,0,1) |
|---|
| 200 | length 6 |
|---|
| 201 | max 50 |
|---|
| 202 | direction 'E' |
|---|
| 203 | update 10 |
|---|
| 204 | Widget BarTestVal { |
|---|
| 205 | class 'Text' |
|---|
| 206 | expression test::bar(0,100,50,0) |
|---|
| 207 | prefix 'Test ' |
|---|
| 208 | width 9 |
|---|
| 209 | update 200 |
|---|
| 210 | Widget Karo { |
|---|
| 211 | class 'Icon' |
|---|
| 212 | speed 20 |
|---|
| 213 | Widget Squirrel { |
|---|
| 214 | class 'Icon' |
|---|
| 215 | speed 100 |
|---|
| 216 | Widget Test { |
|---|
| 217 | class 'Text' |
|---|
| 218 | expression '1234567890123456789012345678901234567890' |
|---|
| 219 | #expression '|' |
|---|
| 220 | width 40 |
|---|
| 221 | Layout Default { |
|---|
| 222 | Row1 { |
|---|
| 223 | Col1 'OS' |
|---|
| 224 | Row2 { |
|---|
| 225 | Col1 'CPU' |
|---|
| 226 | Col10 'RAM' |
|---|
| 227 | Row3 { |
|---|
| 228 | Col1 'Busy' |
|---|
| 229 | # Col10 'Rain' |
|---|
| 230 | Col11 'BusyBar' |
|---|
| 231 | Row4 { |
|---|
| 232 | Col1 'Load' |
|---|
| 233 | Col11 'LoadBar' |
|---|
| 234 | Row5 { |
|---|
| 235 | Col1 'Disk' |
|---|
| 236 | Col11 'DiskBar' |
|---|
| 237 | Row6 { |
|---|
| 238 | Col1 'Eth0' |
|---|
| 239 | Col11 'Eth0Bar' |
|---|
| 240 | Layout Test { |
|---|
| 241 | Row01.Col1 'Test' |
|---|
| 242 | Row02.Col1 'Test' |
|---|
| 243 | Row03.Col1 'Test' |
|---|
| 244 | Row04.Col1 'Test' |
|---|
| 245 | Row05.Col1 'Test' |
|---|
| 246 | Row06.Col1 'Test' |
|---|
| 247 | Row07.Col1 'Test' |
|---|
| 248 | Row08.Col1 'Test' |
|---|
| 249 | # Row09.Col1 'Test' |
|---|
| 250 | # Row10.Col1 'Test' |
|---|
| 251 | # Row11.Col1 'Test' |
|---|
| 252 | # Row12.Col1 'Test' |
|---|
| 253 | # Row13.Col1 'Test' |
|---|
| 254 | # Row14.Col1 'Test' |
|---|
| 255 | # Row15.Col1 'Test' |
|---|
| 256 | # Row16.Col1 'Test' |
|---|
| 257 | Display 'HD44780-winamp' |
|---|
| 258 | #Display 'Curses' |
|---|
| 259 | Layout 'Default' |
|---|
| 260 | #Layout 'L16x2' |
|---|
| 261 | #Layout 'L20x2' |
|---|
| 262 | Layout 'Test' |
|---|
| 263 | Variables { |
|---|
| 264 | tick 500 |
|---|
| 265 | tack 100 |
|---|
| 266 | minute 60000 |
|---|