This is a module for the MagicMirror².
It displays a personalized greeting to the user and is intended to be used in combination with the MMM-pages module. Each separate page is dedicated to a user.
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.
To use this module, install both this one and the
MMM-pages module.
You can configure them by adding the following to your config/config.js
file:
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"]
}
}
]
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 ) |
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
config: {
greetings: {
day_sunny: [
"What a great day, $USER!"
],
snow: [
"Snowball battle, $USER!"
],
rain: [
"Don't forget your umbrella, $USER"
]
}
}
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?"
]
}
}