Created
February 1, 2013 21:23
-
-
Save cmsj/4694242 to your computer and use it in GitHub Desktop.
Revisions
-
cmsj revised this gist
Mar 1, 2013 . No changes.There are no files selected for viewing
-
cmsj renamed this gist
Mar 1, 2013 . 1 changed file with 21 additions and 35 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,8 +18,11 @@ Display LCD2USB { # My actual hardware LCD Driver 'LCD2USB' Size '20x4' Icons 2 Contrast 220 Brightness 50 Bus '005' Device '003' } Display Curses { @@ -52,22 +55,6 @@ Widget LabelAllDisks { update seconds width 3 expression python::exec('lcd4linux_rotator', 'main', 'AllDisks key ' . alldisks) } Widget LabelDiskRW { @@ -77,15 +64,15 @@ Widget LabelDiskRW { class 'Icon' speed 400 Bitmap { Row1 '.....|.....|*....|.*...|..*..|...*.|....*|.....|.....' Row2 '.....|*....|**...|***..|****.|.****|..***|...**|....*' Row3 '.....|.....|*....|.*...|..*..|...*.|....*|.....|.....' Row4 '.....|.....|.....|.....|.....|.....|.....|.....|.....' Row5 '.....|.....|.....|.....|.....|.....|.....|.....|.....' Row6 '.....|.....|....*|...*.|..*..|.*...|*....|.....|.....' Row7 '.....|....*|...**|..***|.****|****.|***..|**...|*....' Row8 '.....|.....|....*|...*.|..*..|.*...|*....|.....|.....' } } Widget LabelRxTx { @@ -112,9 +99,9 @@ Widget DiskBar { class 'Bar' expression diskstats(disk_match, 'read_sectors', 500) expression2 diskstats(disk_match, 'write_sectors', 500) length 19 direction 'E' #style 'H' update tack } @@ -127,7 +114,7 @@ Widget NetBar { length 19 direction 'E' update tack #style 'H' } Widget BarAllDisks { @@ -136,7 +123,7 @@ Widget BarAllDisks { class 'Bar' update seconds length 17 #style 'H' direction 'E' min 0 max 100 @@ -148,7 +135,7 @@ Widget TextScroll { width 20 align 'M' update 20000 speed 130 expression python::exec('dailymail', 'main') } @@ -157,9 +144,8 @@ Widget TextScroll { Layout tenshu { # The Layout I use for my fileserver Row1 { Col1 'LabelDiskRW' Col2 'DiskBar' } Row2 { Col1 'LabelRxTx' -
cmsj created this gist
Feb 1, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,185 @@ # lcd4linux config ## Local config Variables { # This are useful substitutions for later tick 500 tack 100 seconds 2000 net_if 'br0' # Set this to the network interface to monitor disk_match 'sd.' # Set this to something that matches disks (sdX, hdX, mdX, etc) alldisks '/=/,srv=/srv,New=/srv/media/New' } ## Displays Display LCD2USB { # My actual hardware LCD Driver 'LCD2USB' Size '20x4' Backlight 1 Icons 5 # XXX: Set this based on how many Icons we actually use } Display Curses { # Show in a terminal for very quick testing Driver 'Curses' Size '20x4' } Display XWindow { # Show in an X11 window for testing. # Note that this is configured to replicate the 20x4 red-on-black LCD I own Driver 'X11' Size '100x32' Font '5x8' Pixel '4+1' Gap '-1x-1' Border 20 Buttons 0 Foreground 'ff0000ff' Background '000000ff' Basecolor '000000' Bordercolor '000000' } ## Labels Widget LabelAllDisks { # Rotating label for the disks I want to monitor space usage on class 'Text' update seconds width 3 expression python::exec('lcd4linux_rotator', 'main', 'AllDisks key ' . alldisks) width 3 } Widget LabelDisk { # Attempt at an icon vaguely like a hard disk class 'Icon' Bitmap { Row1 '*****' Row2 '*.*.*' Row3 '**.**' Row4 '*.*.*' Row5 '*.*.*' Row6 '**.**' Row7 '*.*.*' Row8 '*****' } } Widget LabelDiskRW { # Two arrows moving in opposite directions. # This is intended to be placed between an icon/word and a bar # widget to indicate which half of the widget is which direction class 'Icon' speed 400 Bitmap { Row1 '.....|.....|*....|.*...|..*..|...*.|....*|.....|.....' Row2 '.....|*....|**...|***..|****.|.****|..***|...**|....*' Row3 '.....|.....|*....|.*...|..*..|...*.|....*|.....|.....' Row4 '.....|.....|.....|.....|.....|.....|.....|.....|.....' Row5 '.....|.....|.....|.....|.....|.....|.....|.....|.....' Row6 '.....|.....|....*|...*.|..*..|.*...|*....|.....|.....' Row7 '.....|....*|...**|..***|.****|****.|***..|**...|*....' Row8 '.....|.....|....*|...*.|..*..|.*...|*....|.....|.....' } } Widget LabelRxTx { # Animated Rx/Tx label showing which relates to which half of a bar class 'Icon' speed 250 Bitmap { Row1 '****.|***..|**...|*....|.....|.....|....*|...**|..***|.****' Row2 '*...*|...*.|..*.*|.*.*.|*.*.*|.*.*.|*.*.*|.*.*.|*.*..|.*...' Row3 '****.|***..|**...|*...*|...*.|..*..|.*..*|*..**|..***|.****' Row4 '*...*|...*.|..*.*|.*.*.|*.*.*|.*.*.|*.*.*|.*.*.|*.*..|.*...' Row5 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....' Row6 '*****|****.|***.*|**.*.|*.*.*|.*.*.|*.*.*|.*.**|*.***|.****' Row7 '..*..|.*...|*....|....*|...*.|..*..|.*...|*....|....*|...*.' Row8 '..*..|.*...|*...*|...*.|..*.*|.*.*.|*.*..|.*...|*...*|...*.' } } ## Widgets Widget DiskBar { # Split bar widget that shows all the read/write activity on a given # set of disks (as defined earlier by 'disk_match') class 'Bar' expression diskstats(disk_match, 'read_sectors', 500) expression2 diskstats(disk_match, 'write_sectors', 500) length 18 direction 'E' style 'H' update tack } Widget NetBar { # Split bar widget that shows all the receive/transmit activity on a # given network interface (as defined earlier by 'net_if') class 'Bar' expression netdev(net_if, 'Rx_bytes', 500) expression2 netdev(net_if, 'Tx_bytes', 500) length 19 direction 'E' update tack style 'H' } Widget BarAllDisks { # Bar widget that rotates through the percentage usage of several # disks (as defined earlier by LabelAllDisks) class 'Bar' update seconds length 17 style 'H' direction 'E' min 0 max 100 expression path=python::exec('lcd4linux_rotator', 'main', 'AllDisks value') ; ((statfs(path, 'blocks') - statfs(path, 'bavail')) / statfs(path, 'blocks'))*100 } Widget TextScroll { class 'Text' width 20 align 'M' update 20000 speed 150 expression python::exec('dailymail', 'main') } ## Layouts Layout tenshu { # The Layout I use for my fileserver Row1 { Col1 'LabelDisk' Col2 'LabelDiskRW' Col3 'DiskBar' } Row2 { Col1 'LabelRxTx' Col2 'NetBar' } Row3 { Col1 'LabelAllDisks' Col4 'BarAllDisks' } Row4 { Col1 'TextScroll' } } ## Config selection ## Choose which output display to use ## and which layout #Display 'Curses' Display 'XWindow' #Display 'LCD2USB' Layout 'tenshu'