Code Monkey home page Code Monkey logo

mmm-magicmover's Introduction

MMM-MagicMover

A module for MagicMirror² to prevent screen burn-in.

Screen Burn-In Symbolization

Install

  1. Clone repository into the MagicMirror/modules/ folder.
cd ~/MagicMirror/modules
git clone https://github.com/Lavve/MMM-MagicMover
  1. Add the module to the MagicMirror config.js, preferabley before the other modules. If you want to use the default settings you can skip adding the config node.
{
  module: "MMM-MagicMover",
  config: {
    updateInterval: 10 * 60 * 1000,
    ignoredRegions: [],
    maxMove: 15,
    moveWholescreen: false,
  }
},

(Note that the 'position' and 'header' nodes are not used, and is obsolete even if added to config)

Configuration options

Configuration Default Type Description
updateInterval 10 * 60 * 1000 int Time in milliseconds before next movement
ignoredRegions [] array An array with regions that will not be affected by MMM-MagicMover. Possible values are the same used in config.js:

'top_bar', 'top_left', 'top_center', 'top_right', 'upper_third', 'middle_center', 'lower_third', 'bottom_left', 'bottom_center', 'bottom_right', 'bottom_bar', 'fullscreen_above' and 'fullscreen_below'.

You can still use the class names for each region, like '.region.top.center'.

Also the alert module modals are available for exluding:
'.ns-box' and '.ns-alert'.
maxMove 15 int Amount of pixels the container is moved based on default position
moveWholescreen 'false' boolean Move the whole display instead of moving each region independantly

Enable/disable/toggle MMM-MagicMover module

To enable/disable/toggle MMM-MagicMover from other modules use the following codes:

this.sendNotification('MAGIC_MOVER_ON', {});
this.sendNotification('MAGIC_MOVER_OFF', {});
this.sendNotification('MAGIC_MOVER_TOGGLE', {});

History

  • 3 March 2022: Major optimizations and clean up
  • 1 February 2022: Changed to same names for regions as used in config.js. Also reduced default movement from 20px to 15px.
  • 6 December 2021: Bug fixes and imporovements. Added notification settings

TODO

  • Use same names for regions as in config.js

Collaborate

Pull requests, translations and suggestions for improvements are more than welcome.

Developer commands

  • npm ci - Install devDependencies like ESLint.
  • npm run lint - Run linting and formatter checks.
  • npm run lint:fix - Fix linting and formatter issues.

Donations

🍻 Buy me a beer if you like my modules! ❤️

mmm-magicmover's People

Contributors

andysmithdev avatar dathbe avatar kristjanesperanto avatar lavve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mmm-magicmover's Issues

Changing branch name borks updates

Bad news. Changing the branch name from master to main prevents the use of git pull to update the module. Given that this is an entirely cosmetic change that requires users to delete the folder and reinstall it, I would recommend going back. Sorry for making you change it and change it back.

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.