Commit baad40b7 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[FEATURE] hardwire the linux switch

parent eb45a890
......@@ -4,6 +4,7 @@ const logSymbols = require('log-symbols');
const timestamp = require('time-stamp');
const chalk = require('chalk');
const notifier = require('node-notifier');
const freedesktopNotifier = require('freedesktop-notifications');
const path = require('path');
const browserSync = require('browser-sync');
const {argv} = require('yargs');
......@@ -78,6 +79,13 @@ module.exports = class Logger {
* @param {String} _message The message for your notification
*/
static displayNotification(_title, _message) {
if (process.platform === 'linux') {
freedesktopNotifier.createNotification({
summary: _title,
body: _message,
icon: path.join(__dirname, 'SGC.svg'),
}).push();
} else {
notifier.notify(
{
title: _title,
......@@ -88,6 +96,7 @@ module.exports = class Logger {
}
);
}
}
/**
* Displays a BS notification
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment