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'); ...@@ -4,6 +4,7 @@ const logSymbols = require('log-symbols');
const timestamp = require('time-stamp'); const timestamp = require('time-stamp');
const chalk = require('chalk'); const chalk = require('chalk');
const notifier = require('node-notifier'); const notifier = require('node-notifier');
const freedesktopNotifier = require('freedesktop-notifications');
const path = require('path'); const path = require('path');
const browserSync = require('browser-sync'); const browserSync = require('browser-sync');
const {argv} = require('yargs'); const {argv} = require('yargs');
...@@ -78,15 +79,23 @@ module.exports = class Logger { ...@@ -78,15 +79,23 @@ module.exports = class Logger {
* @param {String} _message The message for your notification * @param {String} _message The message for your notification
*/ */
static displayNotification(_title, _message) { static displayNotification(_title, _message) {
notifier.notify( if (process.platform === 'linux') {
{ freedesktopNotifier.createNotification({
title: _title, summary: _title,
message: _message, body: _message,
icon: path.join(__dirname, 'SGC.svg'), icon: path.join(__dirname, 'SGC.svg'),
sound: true, }).push();
wait: false } else {
} notifier.notify(
); {
title: _title,
message: _message,
icon: path.join(__dirname, 'SGC.svg'),
sound: true,
wait: false
}
);
}
} }
/** /**
......
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