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,15 +79,23 @@ module.exports = class Logger {
* @param {String} _message The message for your notification
*/
static displayNotification(_title, _message) {
notifier.notify(
{
title: _title,
message: _message,
if (process.platform === 'linux') {
freedesktopNotifier.createNotification({
summary: _title,
body: _message,
icon: path.join(__dirname, 'SGC.svg'),
sound: true,
wait: false
}
);
}).push();
} else {
notifier.notify(
{
title: _title,
message: _message,
icon: path.join(__dirname, 'SGC.svg'),
sound: true,
wait: false
}
);
}
}
/**
......
Supports Markdown
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