Skip to content

Snille/MMM-Profilepicture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMM-Profilepicture

A simple module to add a background picture to the selected profile. This module works well with the MMM-ProfileSwitcher module. Set the URL to the users picture, then set the class for each user on each instans of the module in your config.

Note: I'm new to the MagicMirror world and Node.js, this is my first real module. There are probably lot's of things that could have been done better. :)

Screen shots

Janes Profilepicture:

Jane

Johns Profilepicture:

John

Usage

Prerequisites

  • Requires MagicMirror v2.1.0
  • Install and run

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/Snille/MMM-Profilepicture.git

Add some config entries with the atleast the requierd options in your config.js file. Add the module one time for each user (with different URL:s for each user of course).

Configuration

	// Johns picture.
	{
		module: "MMM-Profilepicture",
		position: "fullscreen_below",
		// This will show the picture only for the "John" user.
		classes: "John"
		config: {
			// See below for configurable options
			url: "http://the-url-to-johns-picture"
		}
	},
	// Janes picture.
	{
		module: "MMM-Profilepicture",
		position: "fullscreen_below",
		// This will show the picture only for the "John" user.
		classes: "Jane"
		config: {
			// See below for configurable options
			url: "http://the-url-to-janes-picture"
		}
	},
	// And so on...

Options

Here are the configuration options to configure the module.

Option Description
opacity Transparency of the picture. 1.0 is not transperent at all

Default value: 0.2
maxWidth Maximum width of the picture..

Default value: 100%
maxHeight Maximum height of the picture.

Default value: 100%
updateInterval Picture refresh time in milliseconds (1000 * 60 * 5) = 5 min. false = no auto update

Default value: false
fadeSpeed Fade speed in milliseconds when updating the picture.

Default value: 800
id The id of this module, if you want to refresh only THIS modules picture remotely you need to set an ID (int) and then send "REFRESHPICTUREID (ID = the number here).

Default value: false
url The URL to the picture.

Requierd value: URL

All done. :)

About

A module for the MagicMirror 2 to add a background picture to the current profile.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published