Giter Club home page Giter Club logo

fbinfogrid's Introduction

fbinfogrid

Display a configurable grid of information and images on a Raspberry Pi (or other GNU/Linux) framebuffer.

Screenshots

Clock, image carousel, and updating webcam snapshots... fbinfogrid screenshot 1

Simple network device monitoring... fbinfogrid network monitoring

A copy of the information grid may optionally be made available via HTTP which will refresh every minute.

fbinfogrid builds and runs successfully on an original Raspberry Pi Model A from 2013, so it should run fine on all modern platforms. It should work fine on any other GNU/Linux platorm that supports a standard framebuffer device and the Go language.

Usage

Type ./fbinfogrid -h for help.

E.g. ./fbinfogrid -config configs/demoSpans.json -http 8080

You may supply a config.json file in the working directory or you can use the -config option to specify a grid configuration file.

If any cell has "refreshsecs" defined to be > 0 then the program will not exit until it is killed, otherwise the program will end once the grid has been drawn unless there are multiple pages (see below).

Configuration

See the included JSON files in the configs folder for configuration examples.

Note that fbinfogrid takes the pixel dimensions of the specified framebuffer and uses them to calculate the layout (i.e. cell sizes) by simple division. There is no attempt made to intelligently 'flow' or fit the grid; you must ensure that the configuration you specify makes sense for your current framebuffer settings. You can use the standard fbset program to check and alter the characteristics of the framebuffer. Also, the image in the HTTP copy of the grid will have the same pixel dimensions as the framebuffer.

A configuration describes page(s) of cells...

Page

Page attributes are...

Type Compulsory Description
name N Page description, not displayed
rows Y No. of rows
cols Y No. of columns
fontfile N Path of a TTF font, defaults to supplied LeagueMono-Regular.ttf
durationmins N How many minutes to wait before moving to the next page (no default)

See demoTwoPages.json for a multiple-page example.

Cells

Every cell must have row, col, and celltype specified.

You may also specify rowspan and colspan for any cell; see demoSpans.json for an example. Note that the behaviour of overlapping cells is currently undefined.

Currently defined information cell types and associated attributes are...

Type Description fontpts refreshsecs scaling source text
carousel Slideshow of images N Y* Y ** N
datemonth eg. "2 Jan" Y Y N N N
day eg. "Mon" Y Y N N N
daydatemonth eg. "Mon 2 Jan" Y Y N N N
hostname eg. "raspipi01" Y N N N N
isalive Is a host reachable via TCP? Y Y* N Y* Y
localimage An image stored locally N Y Y Y* N
text Text that is never updated Y N N N Y*
time eg. "15:04" Y Y N N N
urlimage An image (JPEG/PNG) from a URL N Y Y Y* N

(* these attributes must be specified)

(** must specify a sources array - see demoCarousel.json)

Image cells that refresh (i.e. have a non-zero refreshsecs) reload the image on each refresh, so if the underlying file changes that change will appear on the next refresh.

Scaling may be one of "fill", "fit", or "resize" (default). Fill and fit maintain the aspect ratio of the image, so there may be some cropping or borders apparent; resize scales the image to exactly fit the cell, so there may be some distortion.

fbinfogrid's People

Contributors

smerrony avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.