-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlcd4linux.conf
1071 lines (960 loc) · 26.2 KB
/
lcd4linux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#-----------------------------------------------------------------------------------------------------------------------------------
#
# This my configuration file for lcd4linux (http://ssl.bulix.org/projects/lcd4linux/)
# and a hacked cheap AX206 picture frame (https://sourceforge.net/projects/dpf-ax/, https://forum.doozan.com/list.php?9)
# on a Helios 4 Open Source NAS running Armbian/Debian (https://wiki.kobol.io/).
#
# For lcd4linux widgets see http://ssl.bulix.org/projects/lcd4linux/wiki/Layout.
#
# You can always override layouts or displays defined here with
# lcd4linux [-Fv] -c "Display='$DRIVER'" -c "Layout='$LAYOUT'"
# e.g.
# lcd4linux -Fv -c "Display='XWindow'" -c "Layout='helios4'"
#
# This file needs a small helper script, mystatus.
#
# Limitations:
# - lcd4linux doesn't like defining to many constants, be careful, don't uncomment all colors
# - there seems to be a maximum of active 'exec's you can have (core dumps otherwise)
#
# Heinz ([email protected])
#
#-----------------------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------------------
# Global settings
#-----------------------------------------------------------------------------------------------------------------------------------
# Layout 'helios4'
Layout 'helios4_compact'
Display 'DPF'
Variables {
# These constants have an optional L_abel variant for display and an internal V_alue.
# Filesystems
V_FS1 '/'
V_FS2 '/backup'
V_FS3 '/nas'
V_FS4 '/mufu'
# Hard Drives
V_HDD1 '/dev/sda'
L_HDD1 'sda'
V_HDD2 '/dev/sdb'
L_HDD2 'sdb'
V_HDD3 '/dev/sdc'
L_HDD3 'sdc'
# Net device
V_LANDEV 'eth0'
# timer ticks
second 1000
minute 60 * second
# define some standard dimensions:
linesize 53 # max line length, for status lines etc.
width100 51 # full width after padding (border)
width050 24 # 1/2 of full width
width033 17 # 1/3 of full width
width025 12 # 1/4 of full width
width010 6 # 1/10 of full width
# define some colors; see http://www.uize.com/examples/sortable-color-table.html
# ToDo: use alpha channel
# (lcd4linux doesn't like defining to many constants, be careful, don't uncomment all colors)
# aliceblue 'f0f8ff'
# antiquewhite 'faebd7'
# aqua '00ffff'
# aquamarine '7fffd4'
# azure 'f0ffff'
# beige 'f5f5dc'
# bisque 'ffe4c4'
# black '000000'
# blanchedalmond 'ffebcd'
# blue '0000ff'
# blueviolet '8a2be2'
# brown 'a52a2a'
# burlywood 'deb887'
# cadetblue '5f9ea0'
# chartreuse '7fff00'
# chocolate 'd2691e'
# coral 'ff7f50'
# cornflowerblue '6495ed'
# cornsilk 'fff8dc'
# crimson 'dc143c'
# cyan '00ffff'
# darkblue '00008b'
# darkcyan '008b8b'
# darkgoldenrod 'b8860b'
# darkgray 'a9a9a9'
# darkgreen '006400'
# darkgrey 'a9a9a9'
# darkkhaki 'bdb76b'
# darkmagenta '8b008b'
# darkolivegreen '556b2f'
# darkorange 'ff8c00'
# darkorchid '9932cc'
# darkred '8b0000'
# darksalmon 'e9967a'
# darkseagreen '8fbc8f'
# darkslateblue '483d8b'
darkslategray '2f4f4f'
# darkslategrey '2f4f4f'
# darkturquoise '00ced1'
# darkviolet '9400d3'
# deeppink 'ff1493'
# deepskyblue '00bfff'
# dimgray '696969'
# dimgrey '696969'
# dodgerblue '1e90ff'
# firebrick 'b22222'
# floralwhite 'fffaf0'
# forestgreen '228b22'
# fuchsia 'ff00ff'
# gainsboro 'dcdcdc'
ghostwhite 'f8f8ff'
# gold 'ffd700'
# goldenrod 'daa520'
# gray '808080'
# green '008000'
# greenyellow 'adff2f'
# grey '808080'
# honeydew 'f0fff0'
# hotpink 'ff69b4'
# indianred 'cd5c5c'
# indigo '4b0082'
# ivory 'fffff0'
# khaki 'f0e68c'
# lavender 'e6e6fa'
# lavenderblush 'fff0f5'
# lawngreen '7cfc00'
# lemonchiffon 'fffacd'
# lightblue 'add8e6'
# lightcoral 'f08080'
# lightcyan 'e0ffff'
# lightgoldenrodyellow 'fafad2'
# lightgray 'd3d3d3'
# lightgreen '90ee90'
# lightgrey 'd3d3d3'
# lightpink 'ffb6c1'
# lightsalmon 'ffa07a'
# lightseagreen '20b2aa'
lightskyblue '87cefa'
lightslategray '778899'
# lightslategrey '778899'
# lightsteelblue 'b0c4de'
# lightyellow 'ffffe0'
# lime '00ff00'
# limegreen '32cd32'
# linen 'faf0e6'
# magenta 'ff00ff'
# maroon '800000'
# mediumaquamarine '66cdaa'
# mediumblue '0000cd'
# mediumorchid 'ba55d3'
# mediumpurple '9370db'
# mediumseagreen '3cb371'
# mediumslateblue '7b68ee'
# mediumspringgreen '00fa9a'
# mediumturquoise '48d1cc'
# mediumvioletred 'c71585'
# midnightblue '191970'
# mintcream 'f5fffa'
# mistyrose 'ffe4e1'
# moccasin 'ffe4b5'
# navajowhite 'ffdead'
# navy '000080'
# oldlace 'fdf5e6'
# olive '808000'
# olivedrab '6b8e23'
# orange 'ffa500'
# orangered 'ff4500'
# orchid 'da70d6'
# palegoldenrod 'eee8aa'
# palegreen '98fb98'
# paleturquoise 'afeeee'
# palevioletred 'db7093'
# papayawhip 'ffefd5'
# peachpuff 'ffdab9'
# peru 'cd853f'
# pink 'ffc0cb'
plum 'dda0dd'
# powderblue 'b0e0e6'
# purple '800080'
# red 'ff0000'
# rosybrown 'bc8f8f'
# royalblue '4169e1'
# saddlebrown '8b4513'
salmon 'fa8072'
# sandybrown 'f4a460'
# seagreen '2e8b57'
# seashell 'fff5ee'
# sienna 'a0522d'
silver 'c0c0c0'
# skyblue '87ceeb'
# slateblue '6a5acd'
# slategray '708090'
# slategrey '708090'
# snow 'fffafa'
# springgreen '00ff7f'
# steelblue '4682b4'
# tan 'd2b48c'
# teal '008080'
# thistle 'd8bfd8'
tomato 'ff6347'
# turquoise '40e0d0'
# violet 'ee82ee'
# wheat 'f5deb3'
# white 'ffffff'
# whitesmoke 'f5f5f5'
# yellow 'ffff00'
# yellowgreen '9acd32'
transparent 'ffffff00'
# standard colors (standard style):
# std_fg ghostwhite
# std_bg midnightblue
# std_fg_bar0 '72a8f9'
# std_fg_bar1 salmon
# std_bg_bar darkslategray
# std_fg_inverse darkslategray
# std_bg_inverse ghostwhite
# std_fg_area std_fg
# std_bg_area darkslategray
# std_fg_debug lightslategray
# std_bg_debug std_bg
std_bg ghostwhite
std_fg darkslategray
std_fg_bar0 lightskyblue
std_fg_bar1 plum
std_bg_bar silver
std_fg_inverse ghostwhite
std_bg_inverse darkslategray
std_fg_area std_fg
std_bg_area silver
std_fg_debug lightslategray
std_bg_debug std_bg
# To be set later by timers:
SyslogMsg 'Dummy'
TopMsg 'Dummy'
}
Display dpf {
driver 'DPF'
port 'usb0'
font '6x8'
orientation 2
backlight 4
foreground std_fg
background std_bg
basecolor std_bg
}
Display XWindow {
driver 'X11'
size '320x240'
font '6x8'
# pixel '2+1'
pixel '2+0'
gap '0x0'
foreground std_fg
background std_bg
basecolor std_bg
}
Display Image {
driver 'Image'
format 'PNG'
size '320x240'
font '6x8'
pixel '2+0'
gap '0x0'
foreground std_fg
background std_bg
basecolor std_bg
}
#-----------------------------------------------------------------------------------------------------------------------------------
# Widgets
#-----------------------------------------------------------------------------------------------------------------------------------
Widget System {
class 'Text'
expression uname('nodename') . (netinfo::ipaddr(V_LANDEV) ? ' ' . netinfo::ipaddr(V_LANDEV) : '') . ' ' . uname('machine') . ' ' . uname('release')
width linesize
align 'C'
background std_bg_inverse
foreground std_fg_inverse
}
Widget Time {
class 'Text'
expression strftime('%a, %d.%m.%Y %H:%M:%S', time()) . ' Up: ' . uptime('%d days %H:%M:%S')
width linesize
align 'C'
update 1 * second
background std_bg_inverse
foreground std_fg_inverse
}
Widget CPU {
class 'Text'
expression proc_stat::cpu('busy', 1 * second)
prefix 'CPU'
postfix '%'
width width033
precision 1
align 'R'
background transparent
update 1 * second
}
Widget CPUTemp {
class 'Text'
expression exec('cat /sys/class/thermal/thermal_zone0/temp', 10 * second) / 1000
postfix '°C'
width 5
precision 0
align 'R'
background transparent
update 10 * second
}
Widget CPUBar {
class 'Bar'
expression proc_stat::cpu('busy', 1 * second)
expression2 proc_stat::cpu('system', 1 * second)
length width050
direction 'E'
update 1 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
Widget Load {
class 'Text'
expression loadavg(1)
postfix loadavg(1) > 2.0 ? '!' : ''
prefix 'Load'
width width050
precision 1
align 'R'
background transparent
update 1 * second
}
Widget LoadBar {
class 'Bar'
expression loadavg(1) - 1
expression2 loadavg(2) - 1
max 4.0
length width050
direction 'E'
update 1 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
Widget Disk {
class 'Text'
expression (diskstats('sd[a-z]$', 'read_sectors', 1 * second) + diskstats('sd[a-z]$', 'write_sectors', 1 * second)) / 2 / 1024
prefix 'Disk I/O'
postfix ' MB/s'
width width050
precision 1
align 'R'
background transparent
update 1 * second
}
Widget DiskBar {
class 'Bar'
expression diskstats('sd[a-z]$', 'read_sectors', 1 * second) / 2 / 1024
expression2 diskstats('sd[a-z]$', 'write_sectors', 1 * second) / 2 / 1024
length width050
direction 'E'
update 1 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
Widget Netdev {
class 'Text'
expression (netdev(V_LANDEV, 'Rx_bytes', 1 * second) + netdev(V_LANDEV, 'Tx_bytes', 1 * second)) * 8 / 1024 / 1024
prefix V_LANDEV
postfix ' Mbit/s'
width width050
precision 1
align 'R'
background transparent
update 1 * second
}
Widget NetdevBar {
class 'Bar'
expression netdev(V_LANDEV, 'Rx_bytes', 1 * second) * 8 / 1024 / 1024
expression2 netdev(V_LANDEV, 'Tx_bytes', 1 * second) * 8 / 1024 / 1024
length width050
direction 'E'
update 1 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
Widget Memory {
class 'Text'
expression floor((meminfo('MemTotal') - meminfo('MemFree')) / 1024) . '/' . floor((meminfo('MemTotal') / 1024))
prefix 'Memory'
postfix ' MB'
width width050
align 'R'
background transparent
update 1 * second
}
Widget MemoryBar {
class 'Bar'
expression meminfo('MemTotal') - meminfo('MemFree')
expression2 meminfo('SwapTotal') - meminfo('SwapFree')
max meminfo('MemTotal')
length width050
direction 'E'
update 1 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
# Widget DVB {
# class 'Text'
# expression dvb('signal_strength') * 100
# prefix 'DVB Signal'
# postfix '%'
# width width050
# precision 1
# align 'R'
# update 1 * second
# }
#
# Widget DVBBar {
# class 'Bar'
# expression dvb('signal_strength')
# # expression2 dvb('snr')
# expression2 dvb('ber')
# min 0
# max 1
# length width050
# direction 'E'
# update 1 * second
# background std_bg_bar
# barcolor0 std_fg_bar0
# barcolor1 std_fg_bar1
# }
Widget HDDStatus1 {
class 'Text'
expression substr(exec('/sbin/hdparm -C ' . V_HDD1, 10 * second), 29)
prefix L_HDD1 . ' '
postfix ' ' . hddtemp(V_HDD1) . '°C'
width width050
align 'R'
update 10 * second
}
Widget HDDStatus2 {
class 'Text'
expression substr(exec('/sbin/hdparm -C ' . V_HDD2, 10 * second), 29)
prefix L_HDD2 .' '
postfix ' ' . hddtemp(V_HDD2) . '°C'
width width050
align 'R'
update 10 * second
}
Widget HDDStatus3 {
class 'Text'
expression substr(exec('/sbin/hdparm -C ' . V_HDD3, 10 * second), 29)
prefix L_HDD3. ' '
postfix ' ' . hddtemp(V_HDD3) . '°C'
width width050
align 'R'
update 10 * second
}
Widget FSSpace1 {
class 'Text'
expression (statfs(V_FS1, 'blocks') - statfs(V_FS1, 'bavail')) * statfs(V_FS1, 'bsize') / 1024 / 1024 / 1024
max floor(statfs(V_FS1, 'blocks') * statfs(V_FS1, 'bsize') / 1024 / 1024 / 1024)
prefix V_FS1
postfix '/' . floor(statfs(V_FS1, 'blocks') * statfs(V_FS1, 'bsize') / 1024 / 1024 / 1024) . ' GB'
width width050
precision 0
align 'R'
background transparent
update 10 * second
}
Widget FSSpace2 {
class 'Text'
expression (statfs(V_FS2, 'blocks') - statfs(V_FS2, 'bavail')) * statfs(V_FS2, 'bsize') / 1024 / 1024 / 1024
max floor(statfs(V_FS2, 'blocks') * statfs(V_FS2, 'bsize') / 1024 / 1024 / 1024)
prefix V_FS2
postfix '/' . floor(statfs(V_FS2, 'blocks') * statfs(V_FS2, 'bsize') / 1024 / 1024 / 1024) . ' GB'
width width050
precision 0
align 'R'
background transparent
update 10 * second
}
Widget FSSpace3 {
class 'Text'
expression (statfs(V_FS3, 'blocks') - statfs(V_FS3, 'bavail')) * statfs(V_FS3, 'bsize') / 1024 / 1024 / 1024
max floor(statfs(V_FS3, 'blocks') * statfs(V_FS3, 'bsize') / 1024 / 1024 / 1024)
prefix V_FS3
postfix '/' . floor(statfs(V_FS3, 'blocks') * statfs(V_FS3, 'bsize') / 1024 / 1024 / 1024) . ' GB'
width width050
precision 0
align 'R'
background transparent
update 10 * second
}
Widget FSSpace4 {
class 'Text'
expression (statfs(V_FS4, 'blocks') - statfs(V_FS4, 'bavail')) * statfs(V_FS4, 'bsize') / 1024 / 1024 / 1024
max floor(statfs(V_FS4, 'blocks') * statfs(V_FS4, 'bsize') / 1024 / 1024 / 1024)
prefix V_FS4
postfix '/' . floor(statfs(V_FS4, 'blocks') * statfs(V_FS4, 'bsize') / 1024 / 1024 / 1024) . ' GB'
width width050
precision 0
align 'R'
background transparent
update 10 * second
}
Widget FSSpaceBar1 {
class 'Bar'
expression statfs(V_FS1, 'blocks') - statfs(V_FS1, 'bfree')
expression2 statfs(V_FS1, 'blocks') - statfs(V_FS1, 'bavail')
max statfs(V_FS1, 'blocks')
length width050
direction 'E'
update 10 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
Widget FSSpaceBar2 {
class 'Bar'
expression statfs(V_FS2, 'blocks') - statfs(V_FS2, 'bfree')
expression1 statfs(V_FS2, 'blocks') - statfs(V_FS2, 'bavail')
max statfs(V_FS2, 'blocks')
length width050
direction 'E'
update 10 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
Widget FSSpaceBar3 {
class 'Bar'
expression statfs(V_FS3, 'blocks') - statfs(V_FS3, 'bfree')
expression2 statfs(V_FS3, 'blocks') - statfs(V_FS3, 'bavail')
max statfs(V_FS3, 'blocks')
length width050
direction 'E'
update 10 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
Widget FSSpaceBar4 {
class 'Bar'
expression statfs(V_FS4, 'blocks') - statfs(V_FS4, 'bfree')
expression2 statfs(V_FS4, 'blocks') - statfs(V_FS4, 'bavail')
max statfs(V_FS4, 'blocks')
length width050
direction 'E'
update 10 * second
background std_bg_bar
barcolor0 std_fg_bar0
barcolor1 std_fg_bar1
}
Widget ServicesTitle {
class 'Text'
expression 'Services'
width width100
align 'C'
background std_bg_inverse
foreground std_fg_inverse
}
Widget ApacheStatus {
class 'Text'
expression 'Apache '
width width050
postfix exec('/usr/local/bin/mystatus apache2', 10 * second)
update 10 * second
}
Widget BindDNSStatus {
class 'Text'
expression 'Bind DNS '
width width050
postfix exec('/usr/local/bin/mystatus bind9', 10 * second)
update 10 * second
}
Widget DDClientStatus {
class 'Text'
expression 'DDClient '
width width050
postfix exec('/usr/local/bin/mystatus ddclient', 10 * second)
update 10 * second
}
Widget DHCPStatus {
class 'Text'
expression 'DHCP '
width width050
postfix exec('/usr/local/bin/mystatus isc-dhcp-server', 10 * second)
update 10 * second
}
Widget HddtempStatus {
class 'Text'
expression 'HDDTemp '
width width050
postfix exec('/usr/local/bin/mystatus hddtemp', 10 * second)
update 10 * second
}
#Widget IWatchStatus {
# class 'Text'
# expression 'IWatch '
# width width050
# postfix exec('/usr/local/bin/mystatus iwatch', 10 * second)
# update 10 * second
#}
#Widget LLTDStatus {
# class 'Text'
# expression 'LLTD Responder '
# width width050
# postfix exec('/usr/local/bin/mystatus lld2d', 10 * second)
# update 10 * second
#}
#Widget LighttpdStatus {
# class 'Text'
# expression 'Lighttpd '
# width width050
# postfix exec('/usr/local/bin/mystatus lighttpd', 10 * second)
# update 10 * second
#}
Widget MiniDLNAStatus {
class 'Text'
expression 'MiniDLNA '
width width050
postfix exec('/usr/local/bin/mystatus minidlna', 10 * second)
update 10 * second
}
#Widget MotionStatus {
# class 'Text'
# expression 'Motion '
# width width050
# postfix exec('/usr/local/bin/mystatus motion', 10 * second)
# update 10 * second
#}
Widget MySQLStatus {
class 'Text'
expression 'MySQL '
width width050
postfix exec('/usr/local/bin/mystatus mysql', 10 * second)
update 10 * second
}
#Widget MythTVStatus {
# class 'Text'
# expression 'MythTV Backend '
# width width050
# postfix exec('/usr/local/bin/mystatus mythtv-backend', 10 * second)
# update 10 * second
#}
Widget OpenVPNStatus {
class 'Text'
expression 'OpenVPN '
width width050
postfix exec('/usr/local/bin/mystatus openvpn', 10 * second)
update 10 * second
}
Widget PostfixStatus {
class 'Text'
expression 'Postfix '
width width050
postfix exec('/usr/local/bin/mystatus postfix', 10 * second)
update 10 * second
}
Widget ProFTPStatus {
class 'Text'
expression 'ProFTP '
width width050
postfix exec('/usr/local/bin/mystatus proftpd', 10 * second)
update 10 * second
}
Widget SambaStatus {
class 'Text'
expression 'Samba '
width width050
postfix exec('/usr/local/bin/mystatus smbd', 10 * second)
update 10 * second
}
Widget SSHStatus {
class 'Text'
expression 'SSH (' . exec('/usr/bin/who | /usr/bin/wc -l', 10 * second) . ' Users)'
width width050
postfix exec('/usr/local/bin/mystatus ssh', 10 * second)
update 10 * second
}
Widget SWRAIDStatus {
class 'Text'
expression 'SW RAID '
width width050
# postfix strstr(exec('/bin/cat /proc/mdstat', 10 * second), '[UUU]') > 0 ? 'up' : 'alarm!'
postfix strstr(exec('/bin/cat /proc/mdstat', 10 * second), '[UU]') > 0 ? 'up' : 'alarm!'
update 10 * second
}
#Widget WebcamStatus {
# class 'Text'
# expression 'Webcam '
# width width050
# postfix exec('/usr/local/bin/mystatus webcam', 10 * second)
# update 10 * second
#}
Widget WebminStatus {
class 'Text'
expression 'Webmin '
width width050
postfix exec('/usr/local/bin/mystatus webmin', 10 * second)
update 10 * second
}
# the Syslog widgets may increase system load
Widget SyslogTitle {
class 'Text'
expression '/var/log/syslog'
width width100
align 'C'
foreground std_fg_inverse
background std_bg_inverse
}
Widget SetSyslogMsg {
class 'Timer'
expression SyslogMsg = exec('tail -n 1 /var/log/syslog', 4 * second)
active 1
update 10 * second
}
Widget Syslog1 {
class 'Text'
expression substr(SyslogMsg, 0 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 10 * second
}
Widget Syslog2 {
class 'Text'
expression substr(SyslogMsg, 1 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 10 * second
}
Widget Syslog3 {
class 'Text'
expression substr(SyslogMsg, 2 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 10 * second
}
Widget Syslog4 {
class 'Text'
expression substr(SyslogMsg, 3 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 10 * second
}
# Widget TopTitle {
# class 'Text'
# expression 'USER PID %CPU VSZ TIME COMMAND'
# width width100
# align 'L'
# background std_bg_inverse
# foreground std_fg_inverse
# }
Widget SetTopMsg {
class 'Timer'
# ps output must be exactly with100 (51) characters wide, including \n
# (the last field 's' ensures there are no shorter lines).
# /bin/ps -e -o "user:8,pid:5,pcpu:4,vsize:6,cputime:8,comm:12,s:1" --cols 51 --sort -pcpu
# mysql 1218 1.5 151696 00:03:26 mysqld S
expression TopMsg = exec('/bin/ps -e -o "user:8,pid:5,pcpu:4,vsize:6,cputime:8,comm:' . (width100 - 39) . ',s:1" --cols ' . width100 . ' --sort -pcpu | /usr/bin/tail -n"+2" | /usr/bin/head -5', 4 * second)
active 1
update 4 * second
}
Widget Top1 {
class 'Text'
expression substr(TopMsg, 0 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 4 * second
}
Widget Top2 {
class 'Text'
expression substr(TopMsg, 1 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 4 * second
}
Widget Top3 {
class 'Text'
expression substr(TopMsg, 2 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 4 * second
}
Widget Top4 {
class 'Text'
expression substr(TopMsg, 3 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 4 * second
}
Widget Top5 {
class 'Text'
expression substr(TopMsg, 4 * width100, width100)
width width100
align 'L'
foreground std_fg_area
background std_bg_area
update 4 * second
}
Widget Debug {
class 'Text'
# expression cfg('Layout')
expression '$Revision: 1.19 $ -- DPF Driver by hackfin/superelchi'
width linesize
align 'C'
foreground std_fg_debug
background std_bg_debug
}
Widget na {
class 'Text'
expression 'n/a'
width 3
align 'L'
}
Widget Bgnd {
class 'Image'
file '/usr/local/share/pictures/background/helios4-logo-320x240.png'
reload 0
inverted 0
visible 1
}
# Widget SetWebcamImg {
# class 'Timer'
# expression exec('/usr/bin/curl http://localhost:8083?action=snapshot 2> /dev/null | /usr/bin/convert jpg:- /tmp/webcam.png; echo ', 5 * second)
# active 1
# update 5 * second
# }
#
# widget Webcam {
# class 'Image'
# file '/tmp/webcam.png'
# reload 1
# update 5 * second
# inverted 0
# visible 1
# }
#-----------------------------------------------------------------------------------------------------------------------------------
# Layouts
#-----------------------------------------------------------------------------------------------------------------------------------
Layout helios4 {
layer 1 {
Row01.Col01 'System'
Row02.Col01 'Time'
Row04.Col02 'CPU'
Row04.Col21 'CPUTemp'
Row05.Col02 'CPUBar'
Row07.Col02 'Load'
Row08.Col02 'LoadBar'
Row10.Col02 'Memory'
Row11.Col02 'MemoryBar'
Row13.Col02 'Netdev'
Row14.Col02 'NetdevBar'
Row04.Col29 'Disk'
Row05.Col29 'DiskBar'
Row07.Col29 'HDDStatus1'
Row08.Col29 'HDDStatus2'
Row09.Col29 'HDDStatus3'
Row11.Col29 'FSSpace1'
Row12.Col29 'FSSpace2'
Row13.Col29 'FSSpace3'
Row14.Col29 'FSSpace4'
Row18.Col02 'ServicesTitle' # some are not set up yet
Row19.Col02 'ApacheStatus'
Row20.Col02 'DDClientStatus'
Row21.Col02 'MySQLStatus'
Row22.Col02 'HddtempStatus'
Row23.Col02 'PostfixStatus'
Row19.Col29 'MiniDLNAStatus'
Row20.Col29 'SambaStatus'
Row21.Col29 'SSHStatus'
Row22.Col29 'SWRAIDStatus'
# Row23.Col29 'WebminStatus'
Row25.Col02 'SyslogTitle'
Row26.Col02 'Syslog1'
Row27.Col02 'Syslog2'
Row28.Col02 'Syslog3'
Row29.Col02 'Syslog4'
# Row25.Col02 'TopTitle'
# Row26.Col02 'Top1'
# Row27.Col02 'Top2'
# Row28.Col02 'Top3'
# Row29.Col02 'Top4'
Row30.Col01 'Debug'
}
# Layer 2 {
# X1.Y1 'Bgnd'
# }
Timer1 'SetSyslogMsg'