Module for MagicMirror that emulates XDG-OPEN with the help of npmjs open package, but opening files/links is done via a XDG-OPEN
notification sent via the Magic Mirror Notification Mechanism.
Any issues, please report and pull requests are most welcome
Open up your terminal, navigate to /path/to/MagicMirror/modules
. Then type in:
git clone https://github.com/cybex-dev/MMM-Xdg-Open
cd MMM-Xdg-Open
npm install
Here is an example configuration with description. Put it in the MagicMirror/config/config.js
file:
{
module: "MMM-Xdg-Open",
hidden: true,
}
since the module assist with functionality and does not display any information, we are hiding the module with hidden
A notification XDG-OPEN
is received by this module via the Magic Mirror Notification Mechanism. This notification has a payload as follows:
{
protocol: "",
location: "",
port: "",
type: "",
}
The payload descriptions/purpose is as follows
Option | Description |
---|---|
protocol |
Protocol the resource uses, such as SMB , SSH , RTP , HTTP , etc. See IANA register for more information. |
location |
The address of the resource, if it is a directory, the directory is specified here, else if it is an IP address (IPv4/6), the full address is specified here along with the port option. |
port |
Port the resource is found at. If the resource is a file, then the port is ignored. |
type |
Type as defined in Avahi Service Types the first part of the service type e.g. the _ssh part of the full service name _ssh._tcp . The type name in this case will be ssh (without the underscore). |
See the Avahi Documentation and the Arch Wiki for information about Avahi operations and naming conventions, and the IANA register for service names and their corresponding ports.
Pull requests are welcome.
N/A