Jan Wagner zrewidował ten Gist 11 years ago. Przejdź do rewizji
1 file changed, 249 insertions, 1 deletion
lcd4linux.conf
| @@ -1 +1,249 @@ | |||
| 1 | - | . | |
| 1 | + | # $Id: lcd4linux.conf.sample 759 2007-02-04 05:55:58Z michael $ | |
| 2 | + | # $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/lcd4linux.conf.sample $ | |
| 3 | + | ||
| 4 | + | Plugin FIFO { | |
| 5 | + | fifopath '/tmp/lcd4linux.fifo' | |
| 6 | + | } | |
| 7 | + | ||
| 8 | + | Variables { | |
| 9 | + | tick 500 | |
| 10 | + | tack 100 | |
| 11 | + | minute 60000 | |
| 12 | + | } | |
| 13 | + | ||
| 14 | + | ||
| 15 | + | Display FW8888 { | |
| 16 | + | Driver 'FW8888' | |
| 17 | + | Size '16x2' | |
| 18 | + | Port '/dev/ttyS1' | |
| 19 | + | Speed 9600 | |
| 20 | + | #Bits '8' | |
| 21 | + | #Bootscreen '1234567890ABCDEF' | |
| 22 | + | } | |
| 23 | + | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + | Widget OS { | |
| 27 | + | class 'Text' | |
| 28 | + | expression '*** '.uname('sysname').' '.uname('release').' ***' | |
| 29 | + | width 16 | |
| 30 | + | align 'M' | |
| 31 | + | style 'bold' | |
| 32 | + | speed 50 | |
| 33 | + | update tick | |
| 34 | + | } | |
| 35 | + | ||
| 36 | + | Widget CPU { | |
| 37 | + | class 'Text' | |
| 38 | + | expression uname('machine') | |
| 39 | + | prefix 'CPU ' | |
| 40 | + | width 9 | |
| 41 | + | align 'L' | |
| 42 | + | style test::onoff(7)>0?'bold':'norm' | |
| 43 | + | update tick | |
| 44 | + | } | |
| 45 | + | ||
| 46 | + | ||
| 47 | + | Widget CPUinfo { | |
| 48 | + | class 'Text' | |
| 49 | + | expression cpuinfo('model name') | |
| 50 | + | prefix '' | |
| 51 | + | width 16 | |
| 52 | + | align 'M' | |
| 53 | + | speed 100 | |
| 54 | + | update tick | |
| 55 | + | } | |
| 56 | + | ||
| 57 | + | ||
| 58 | + | Widget RAM { | |
| 59 | + | class 'Text' | |
| 60 | + | expression meminfo('MemTotal')/1024 | |
| 61 | + | postfix ' MB RAM' | |
| 62 | + | width 11 | |
| 63 | + | precision 0 | |
| 64 | + | align 'R' | |
| 65 | + | update tick | |
| 66 | + | } | |
| 67 | + | ||
| 68 | + | Widget Busy { | |
| 69 | + | class 'Text' | |
| 70 | + | expression proc_stat::cpu('busy', 500) | |
| 71 | + | prefix 'Busy' | |
| 72 | + | postfix '%' | |
| 73 | + | width 9 | |
| 74 | + | precision 1 | |
| 75 | + | align 'R' | |
| 76 | + | update tick | |
| 77 | + | } | |
| 78 | + | ||
| 79 | + | Widget BusyBar { | |
| 80 | + | class 'Bar' | |
| 81 | + | expression proc_stat::cpu('busy', 500) | |
| 82 | + | expression2 proc_stat::cpu('system', 500) | |
| 83 | + | length 10 | |
| 84 | + | direction 'E' | |
| 85 | + | update tack | |
| 86 | + | } | |
| 87 | + | ||
| 88 | + | Widget Load { | |
| 89 | + | class 'Text' | |
| 90 | + | expression loadavg(1) | |
| 91 | + | prefix 'Load' | |
| 92 | + | postfix loadavg(1)>1.0?'!':' ' | |
| 93 | + | width 10 | |
| 94 | + | precision 1 | |
| 95 | + | align 'R' | |
| 96 | + | update tick | |
| 97 | + | } | |
| 98 | + | ||
| 99 | + | Widget LoadBar { | |
| 100 | + | class 'Bar' | |
| 101 | + | expression loadavg(1) | |
| 102 | + | max 2.0 | |
| 103 | + | length 10 | |
| 104 | + | direction 'E' | |
| 105 | + | update tack | |
| 106 | + | } | |
| 107 | + | ||
| 108 | + | ||
| 109 | + | Widget Disk { | |
| 110 | + | class 'Text' | |
| 111 | + | # disk.[rw]blk return blocks, we assume a blocksize of 512 | |
| 112 | + | # to get the number in kB/s we would do blk*512/1024, which is blk/2 | |
| 113 | + | # expression (proc_stat::disk('.*', 'rblk', 500)+proc_stat::disk('.*', 'wblk', 500))/2 | |
| 114 | + | # with kernel 2.6, disk_io disappeared from /proc/stat but moved to /proc/diskstat | |
| 115 | + | # therefore you have to use another function called 'diskstats': | |
| 116 | + | expression diskstats('hd.', 'read_sectors', 500) + diskstats('hd.', 'write_sectors', 500) | |
| 117 | + | prefix 'disk' | |
| 118 | + | postfix ' ' | |
| 119 | + | width 10 | |
| 120 | + | precision 0 | |
| 121 | + | align 'R' | |
| 122 | + | update tick | |
| 123 | + | } | |
| 124 | + | ||
| 125 | + | Widget DiskBar { | |
| 126 | + | class 'Bar' | |
| 127 | + | #expression proc_stat::disk('.*', 'rblk', 500) | |
| 128 | + | #expression2 proc_stat::disk('.*', 'wblk', 500) | |
| 129 | + | # for kernel 2.6: | |
| 130 | + | expression diskstats('hd.', 'read_sectors', 500) | |
| 131 | + | expression2 diskstats('hd.', 'write_sectors', 500) | |
| 132 | + | length 14 | |
| 133 | + | direction 'E' | |
| 134 | + | update tack | |
| 135 | + | } | |
| 136 | + | ||
| 137 | + | Widget Eth0 { | |
| 138 | + | class 'Text' | |
| 139 | + | expression (netdev('eth0', 'Rx_bytes', 500)+netdev('eth0', 'Tx_bytes', 500))/1024 | |
| 140 | + | prefix 'eth0' | |
| 141 | + | postfix ' ' | |
| 142 | + | width 10 | |
| 143 | + | precision 0 | |
| 144 | + | align 'R' | |
| 145 | + | update tick | |
| 146 | + | } | |
| 147 | + | ||
| 148 | + | Widget Eth0Bar { | |
| 149 | + | class 'Bar' | |
| 150 | + | expression netdev('eth0', 'Rx_bytes', 500) | |
| 151 | + | expression2 netdev('eth0', 'Tx_bytes', 500) | |
| 152 | + | length 14 | |
| 153 | + | direction 'E' | |
| 154 | + | update tack | |
| 155 | + | } | |
| 156 | + | ||
| 157 | + | Widget PPP { | |
| 158 | + | class 'Text' | |
| 159 | + | expression (ppp('Rx:0', 500)+ppp('Tx:0', 500)) | |
| 160 | + | prefix 'PPP' | |
| 161 | + | width 9 | |
| 162 | + | precision 0 | |
| 163 | + | align 'R' | |
| 164 | + | update tick | |
| 165 | + | } | |
| 166 | + | ||
| 167 | + | Widget Temp { | |
| 168 | + | class 'Text' | |
| 169 | + | expression i2c_sensors('temp_input3')*1.0324-67 | |
| 170 | + | prefix 'Temp' | |
| 171 | + | width 9 | |
| 172 | + | precision 1 | |
| 173 | + | align 'R' | |
| 174 | + | update tick | |
| 175 | + | } | |
| 176 | + | ||
| 177 | + | Widget TempBar { | |
| 178 | + | class 'Bar' | |
| 179 | + | expression i2c_sensors('temp_input3')*1.0324-67 | |
| 180 | + | min 40 | |
| 181 | + | max 80 | |
| 182 | + | length 10 | |
| 183 | + | direction 'E' | |
| 184 | + | update tack | |
| 185 | + | } | |
| 186 | + | ||
| 187 | + | Widget Uptime { | |
| 188 | + | class 'Text' | |
| 189 | + | expression uptime('%H:%M:%S') | |
| 190 | + | width 16 | |
| 191 | + | align 'R' | |
| 192 | + | prefix 'Up ' | |
| 193 | + | update 1000 | |
| 194 | + | } | |
| 195 | + | ||
| 196 | + | Widget CPU { | |
| 197 | + | class 'Text' | |
| 198 | + | expression uname('machine') | |
| 199 | + | prefix 'CPU ' | |
| 200 | + | width 9 | |
| 201 | + | align 'L' | |
| 202 | + | update tick | |
| 203 | + | } | |
| 204 | + | ||
| 205 | + | Widget fifo { | |
| 206 | + | class 'Text' | |
| 207 | + | expression fifo::read() | |
| 208 | + | width 16 | |
| 209 | + | align 'L' | |
| 210 | + | speed scroller | |
| 211 | + | update 500 | |
| 212 | + | } | |
| 213 | + | ||
| 214 | + | ||
| 215 | + | Widget BarTest { | |
| 216 | + | class 'Bar' | |
| 217 | + | # test::bar(barno,maxval,startval,delta) - move a test value between 0 and max. | |
| 218 | + | # delta= step to change value by each time it's read. | |
| 219 | + | # barno - ten different test bar values can be set up, with barno=0..9 | |
| 220 | + | # if delta=0, just returns the value of bar n instead of changing it. | |
| 221 | + | expression test::bar(0,30,25,1) | |
| 222 | + | expression2 test::bar(1,30,0,1) | |
| 223 | + | length 8 | |
| 224 | + | # max 50 | |
| 225 | + | direction 'E' | |
| 226 | + | update 10 | |
| 227 | + | } | |
| 228 | + | ||
| 229 | + | Widget BarTestVal { | |
| 230 | + | class 'Text' | |
| 231 | + | expression test::bar(0,100,50,0) | |
| 232 | + | prefix 'Test ' | |
| 233 | + | width 9 | |
| 234 | + | update 200 | |
| 235 | + | } | |
| 236 | + | ||
| 237 | + | Layout L16x2 { | |
| 238 | + | Row1 { | |
| 239 | + | Col1 'Busy' | |
| 240 | + | Col11 'BusyBar' | |
| 241 | + | } | |
| 242 | + | Row2 { | |
| 243 | + | Col1 'Uptime' | |
| 244 | + | } | |
| 245 | + | } | |
| 246 | + | ||
| 247 | + | ||
| 248 | + | Display 'FW8888' | |
| 249 | + | Layout 'L16x2' | |
waja zrewidował ten Gist 11 years ago. Przejdź do rewizji
1 file changed, 1 insertion
lcd4linux.conf(stworzono plik)
| @@ -0,0 +1 @@ | |||
| 1 | + | . | |