A module for the MagicMirror that runs a bash command and returns the stderr and stdout back to the screen.
Clone the module into your modules folder:
cd ~/MagicMirror/modules
git clone https://github.com/mathew-fleisch/MMM-Bash
npm install
{
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
}
}
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;
}