Code Monkey home page Code Monkey logo

mmm-kudos's Introduction

MMM-kudos

This is a module for the MagicMirror².

The module is based on the default compliment module. MMM-kudos displays a kudo out of a set of predefined ones. Depending on the current hour the used kudo set can be defined.

Using the module

To use this module, add the following configuration block to the modules array in the config/config.js file:

var config = {
    modules: [
        {
            module: 'MMM-kudos',
            position: "middle_center", // see https://github.com/MichMich/MagicMirror#configuration for possible values
            config: {
                // See below for configurable options
            }
        }
    ]
}

Configuration options

Option Description
hourmap A map which defines the start hours of kudos sets.
shrinkLimit Length of kudo at which a smaller font is used to display it.
classes Optional CSS classes used to display the kudo.
shrinkClasses Optional CSS classes used to shrink the kudo.
updateInterval How often does the kudo have to change? (Milliseconds)

Possible values: 1000 - 86400000
Default value: 30000 (30 seconds)
fadeSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 4000 (4 seconds)
kudos The list of kudos.

Possible values: An object with some arrays - the names are defined in the values of the hourmap object plus the default array anytime. See kudos configuration below.
Default value: See kudos configuration below.
remoteFile External file from which to load the kudos

Possible values: Path to a JSON file containing kudos, configured as per the value of the kudos configuration (see below).
Default value: null (Do not load from file)
config: {
  hourmap: {
     5: "morning",
    11: "lunch",
    15: "afternoon",
    19: "evening",
    23: "night",
  },
  shrinkLimit: 35,
  kudos: {
    anytime: [
      "Und jetzt einen Kaffee!",
      "Dem Kühnen lächeln die Götter zu!",
      "Herkules war auch mal schwach.",
    ],
    morning: [
      "Guten Morgen, Sonnenschein!",
      "Genieße den Tag",
      "Gut geschlafen?",
      "Der frühe Vogel ...",
    ],
    lunch: [
      "Mahlzeit!",
      "Gibt's was zu Essen?",
      "Wer kocht heute?",
      "Mittagsschlaf?",
    ],
    afternoon: [
      "Wow, sexy!",
      "Du siehst gut aus!",
      "Heute ist Dein Tag!",
      "Schon Feierabend?",
    ],
    evening: [
      "Eine Augenweide!",
      "Bettzeit?",
      "Was für ein Tag ...",
      "Es ist ein Genuß dich zu sehen!",
      "Wie war dein Tag?",
      "Meine Augen befinden sich bereits im Zustand seeliger Vorfreude!",
    ],
    night: [
      "Noch nicht müde?",
      "Nu aber ab ins Bett!",
      "Wird wohl wieder spät heute?",
      "Schlaf schön!",
      "Kannst du nicht schlafen?",
    ]
  },
  updateInterval: 30000,
  remoteFile: null,
  fadeSpeed: 4000
}

mmm-kudos's People

Contributors

thomo avatar

Watchers

James Cloos avatar Ap Mielke 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.