https://github.com/kewisch/mmm-page-greeting
MagicMirror² module for greeting the person in front of the mirror
https://github.com/kewisch/mmm-page-greeting
magicmirror magicmirror2
Last synced: 7 months ago
JSON representation
MagicMirror² module for greeting the person in front of the mirror
- Host: GitHub
- URL: https://github.com/kewisch/mmm-page-greeting
- Owner: kewisch
- Created: 2017-07-23T21:16:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-23T21:16:24.000Z (almost 9 years ago)
- Last Synced: 2025-02-09T06:41:53.089Z (over 1 year ago)
- Topics: magicmirror, magicmirror2
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MMM-page-greeting
This is a module for the [MagicMirror²](https://github.com/MichMich/MagicMirror/).
It displays a personalized greeting to the user and is intended to be used in
combination with the [MMM-pages](https://github.com/edward-shen/MMM-pages)
module. Each separate page is dedicated to a user.
## Installation
First, go to your MagicMirror modules folder:
cd ~/MagicMirror/modules
Then, clone this repository:
git clone https://github.com/kewisch/MMM-page-greeting.git
You can now continue with the module configuration.
## Using the Module
To use this module, install both this one and the
[MMM-pages](https://github.com/edward-shen/MMM-pages) module.
You can configure them by adding the following to your `config/config.js` file:
````javascript
modules: [
{
module: "MMM-page-greeting",
position: "top_bar", // This can be any of the regions
config: {
// The names must be in the same order as the modules
// array in the MMM-pages config
profiles: ["Fred", "Lucy"]
}
},
{
module: "MMM-pages",
config: {
modules: [
["DailyXKCD", ...], // Modules for Fred
["newsfeed", ...], // Modules for Lucy
],
excludes: ["clock", "calendar", "MMM-page-greeting"]
}
}
]
````
## Configuration Options
The following properties can be configured:
| Option | Description
| ---------------- | -----------
| `profiles` | A string array of users of the mirror. Can contain duplicate names if you would like multiple pages per user.
| `greetings` | The list of greetings. For possible and default values see _Greeting Configuration_ below.
| `classes` | Override the CSS classes of the div showing the greetings (default: `thin xlarge bright`)
### Greeting configuration
The `greetings` property contains an object with four arrays:
morning, afternoon, evening and
anytime. Based on the time of the day, the compliments will be
picked out of one of these arrays. The arrays contain one or multiple
compliments.
The special value `$USER` is replaced with the current user of the selected
page.
If use the currentweather is possible use a actual weather for set greetings.
The availables properties are:
* `day_sunny`
* `day_cloudy`
* `cloudy`
* `cloudy_windy`
* `showers`
* `rain`
* `thunderstorm`
* `snow`
* `fog`
* `night_clear`
* `night_cloudy`
* `night_showers`
* `night_rain`
* `night_thunderstorm`
* `night_snow`
* `night_alt_cloudy_windy`
#### Example use with currentweather module
````javascript
config: {
greetings: {
day_sunny: [
"What a great day, $USER!"
],
snow: [
"Snowball battle, $USER!"
],
rain: [
"Don't forget your umbrella, $USER"
]
}
}
````
#### Default Value
````javascript
config: {
greetings: {
anytime: [
"Hey there, $USER",
"Hello, $USER",
"What's up, $USER?"
],
morning: [
"Good morning, $USER",
"Enjoy your day, $USER",
"Rise and shine, $USER"
],
afternoon: [
"Good day, $USER",
"Enjoying your day, $USER?"
],
evening: [
"Good evening, $USER",
"How was your day, $USER?"
]
}
}
````