Skip to content

A simple MagicMirror module to display stdout/stderr of a bash command (on a loop)

License

Notifications You must be signed in to change notification settings

mathew-fleisch/MMM-Bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module: Bash

A module for the MagicMirror that runs a bash command and returns the stderr and stdout back to the screen.

Setup

Clone the module into your modules folder:

cd ~/MagicMirror/modules
git clone https://github.com/mathew-fleisch/MMM-Bash
npm install

Configuration

{
  module: 'MMM-Bash',
  position: 'top_right',
  config: {
    bashDivId: "MMM_BASH",
    stdout: "Loading...",
    stderr: "or something went wrong :(",
    bashCommand: "uptime",
    bashCounter: 0,
    updateInterval: 5, // seconds
    fadeUpdate: 100, // 0-5000
  }
}

Styling

The template uses the class .Bash and passes the config.bashDivId value to the div's id field to enable multiple versions of this module to be easily styled in the same display. Add something similar to your css/custom.css file.

#MMM_BASH {
  position: absolute;
  bottom: -575px;
  left: -50px;
  text-align: right;
  color: #7274ae;
  font-size: 15px;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: -3px;
}
#MMM_BASH .bashCounter {
  font-size: 10px;
  display: none;
}

Example Usage

About

A simple MagicMirror module to display stdout/stderr of a bash command (on a loop)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published